(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:
Ali El Gariani 2007-05-11 18:20:05 +00:00
parent 12df53d98a
commit f0d7c0bf2c

View file

@ -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_);
}
}