Skip to content

Commit

Permalink
Handle "Escape" in MainWindow
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeremy Wootten committed Dec 11, 2023
1 parent 0d91a93 commit b6fadfa
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
2 changes: 2 additions & 0 deletions src/MainWindow.vala
Original file line number Diff line number Diff line change
Expand Up @@ -653,7 +653,9 @@ namespace Scratch {
if (search_revealer.get_child_revealed ()) {
var fetch_action = Utils.action_from_group (ACTION_SHOW_FIND, actions);
fetch_action.set_state (false);
document_view.current_document.source_view.grab_focus ();
}

break;
}

Expand Down
6 changes: 0 additions & 6 deletions src/Widgets/SearchBar.vala
Original file line number Diff line number Diff line change
Expand Up @@ -497,9 +497,6 @@ namespace Scratch.Widgets {
case "Down":
search_next ();
return true;
case "Escape":
text_view.grab_focus ();
return true;
case "Tab":
if (search_entry.is_focus) {
replace_entry.grab_focus ();
Expand All @@ -524,9 +521,6 @@ namespace Scratch.Widgets {
case "Down":
search_next ();
return true;
case "Escape":
text_view.grab_focus ();
return true;
case "Tab":
if (replace_entry.is_focus) {
search_entry.grab_focus ();
Expand Down

0 comments on commit b6fadfa

Please sign in to comment.