if(selection_active)
erase_selection();
else if(edit_pos>0)
- {
- text.erase(--edit_pos, 1);
- check_view_range();
- rebuild();
- }
+ erase(edit_pos-1, 1);
}
else if(key==Input::KEY_DELETE)
{
if(selection_active)
erase_selection();
else
- text.erase(edit_pos, 1);
+ erase(edit_pos, 1);
}
else if(key==Input::KEY_ENTER && multiline)
- {
- text.insert(edit_pos++, "\n");
- check_view_range();
- rebuild();
- }
+ insert(edit_pos, "\n");
else if(key==Input::KEY_END)
{
unsigned row, col;
{
if(selection_active)
erase_selection();
- text.insert(edit_pos, StringCodec::encode<StringCodec::Utf8>(StringCodec::ustring(1, ch)));
- ++edit_pos;
- rebuild();
+ insert(edit_pos, StringCodec::encode<StringCodec::Utf8>(StringCodec::ustring(1, ch)));
return true;
}