Skip to content

Commit 0db1d4d

Browse files
To fix "ESC only works if a line is selected" in Save Gumps
gumps/File_gump.cc + Newfile_gump.cc In character_input, return false not true to notify Gump_manager that character_input has not been handled
1 parent 2429293 commit 0db1d4d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

gumps/File_gump.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -606,7 +606,7 @@ bool File_gump::mouse_up(
606606
bool File_gump::character_input(int chr, int unicode, bool shift_pressed) {
607607
ignore_unused_variable_warning(unicode);
608608
if (!focus) { // Text field?
609-
return true;
609+
return false;
610610
}
611611
switch (chr) {
612612
case SDLK_RETURN: // If only 'Save', do it.

gumps/Newfile_gump.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -817,7 +817,7 @@ bool Newfile_gump::character_input(int chr, int unicode, bool shift_pressed) {
817817

818818
// Are we selected on some text?
819819
if (selected == -3) {
820-
return true;
820+
return false;
821821
}
822822

823823
switch (chr) {

0 commit comments

Comments
 (0)