From 2a239efa80ba65ec2e7a059d4a3d9f3fa2572872 Mon Sep 17 00:00:00 2001 From: aryanrawlani28 Date: Thu, 23 Jul 2020 03:05:58 +0530 Subject: [PATCH] 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. --- gui/widgets/editable.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gui/widgets/editable.cpp b/gui/widgets/editable.cpp index 2849350fc92..1934056c34c 100644 --- a/gui/widgets/editable.cpp +++ b/gui/widgets/editable.cpp @@ -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: