From 1badadf53527057722a2a6e54949c48c3a3570ad Mon Sep 17 00:00:00 2001 From: lethosor Date: Thu, 5 Apr 2018 10:08:07 -0400 Subject: [PATCH] search: fix 4/6 keys in unit screen --- docs/changelog.txt | 1 + plugins/search.cpp | 12 ++++++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/docs/changelog.txt b/docs/changelog.txt index 80a3cf92f..c87ab4cbb 100644 --- a/docs/changelog.txt +++ b/docs/changelog.txt @@ -38,6 +38,7 @@ changelog.txt uses a syntax similar to RST, with a few special sequences: ## Fixes - `liquids`: fixed "range" command to default to 1 for dimensions consistently +- `search`: fixed 4/6 keys in unit screen search ================================================================================ # 0.44.09-r1 diff --git a/plugins/search.cpp b/plugins/search.cpp index 80dcc0f61..1e919572b 100644 --- a/plugins/search.cpp +++ b/plugins/search.cpp @@ -1154,7 +1154,8 @@ private: bool should_check_input(set *input) { - if (input->count(interface_key::CURSOR_LEFT) || input->count(interface_key::CURSOR_RIGHT) || + if (input->count(interface_key::STANDARDSCROLL_LEFT) || + input->count(interface_key::STANDARDSCROLL_RIGHT) || (!in_entry_mode() && input->count(interface_key::UNITVIEW_PRF_PROF))) { if (!in_entry_mode()) @@ -1165,11 +1166,14 @@ private: *cursor_pos = 0; clear_search(); reset_all(); + return false; } else - input->clear(); // Ignore cursor keys when typing - - return false; + { + // Ignore cursor keys when typing + input->erase(interface_key::STANDARDSCROLL_LEFT); + input->erase(interface_key::STANDARDSCROLL_RIGHT); + } } return true;