GUI: Always mark editable as dirty when press home or end
- Before, the implementation used to fetch this value based on setCaretPos. - That would return true only if string needed scrolling. - Thus, the small issue arised that 2 chars would be wobbled together. This commit fixes that.
This commit is contained in:
parent
ed71d58b55
commit
2a239efa80
1 changed files with 4 additions and 2 deletions
|
@ -163,8 +163,9 @@ bool EditableWidget::handleKeyDown(Common::KeyState state) {
|
|||
case Common::KEYCODE_DOWN:
|
||||
case Common::KEYCODE_END:
|
||||
// Move caret to end
|
||||
dirty = setCaretPos(_editString.size());
|
||||
setCaretPos(_editString.size());
|
||||
forcecaret = true;
|
||||
dirty = true;
|
||||
break;
|
||||
|
||||
case Common::KEYCODE_LEFT:
|
||||
|
@ -188,8 +189,9 @@ bool EditableWidget::handleKeyDown(Common::KeyState state) {
|
|||
case Common::KEYCODE_UP:
|
||||
case Common::KEYCODE_HOME:
|
||||
// Move caret to start
|
||||
dirty = setCaretPos(0);
|
||||
setCaretPos(0);
|
||||
forcecaret = true;
|
||||
dirty = true;
|
||||
break;
|
||||
|
||||
case Common::KEYCODE_v:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue