From 4fbd763c1a2b1a0579d68d125a6d7ae798dd03f3 Mon Sep 17 00:00:00 2001 From: lethosor Date: Fri, 29 Jan 2021 00:28:32 -0500 Subject: [PATCH] Also cancel 'k' search when hotkeys (F1 - Shift-F8) are pressed --- plugins/search.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/search.cpp b/plugins/search.cpp index 7b791dc7f..9ecae6460 100644 --- a/plugins/search.cpp +++ b/plugins/search.cpp @@ -1956,7 +1956,9 @@ public: end_entry_mode(); return false; } - if (cursor_key_pressed(input, in_entry_mode())) + bool hotkey_pressed = + input->lower_bound(interface_key::D_HOTKEY1) != input->upper_bound(interface_key::D_HOTKEY16); + if (cursor_key_pressed(input, in_entry_mode()) || hotkey_pressed) { end_entry_mode(); clear_search();