Fix bug #9071
(MP chat: DEL at end of line removes previous character instead of doing nothing) Now always erase the next character only.
This commit is contained in:
parent
12df53d98a
commit
f0d7c0bf2c
1 changed files with 1 additions and 4 deletions
|
@ -500,10 +500,7 @@ void textbox::handle_event(const SDL_Event& event)
|
|||
if(is_selection()) {
|
||||
erase_selection();
|
||||
} else {
|
||||
if(cursor_ == (int)text_.size()) {
|
||||
text_.resize(text_.size()-1);
|
||||
--cursor_;
|
||||
} else {
|
||||
if(cursor_ < (int)text_.size()) {
|
||||
text_.erase(text_.begin()+cursor_);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue