search: fix 4/6 keys in unit screen

develop
lethosor 2018-04-05 10:08:07 -04:00
parent 868c032578
commit 1badadf535
2 changed files with 9 additions and 4 deletions

@ -38,6 +38,7 @@ changelog.txt uses a syntax similar to RST, with a few special sequences:
## Fixes ## Fixes
- `liquids`: fixed "range" command to default to 1 for dimensions consistently - `liquids`: fixed "range" command to default to 1 for dimensions consistently
- `search`: fixed 4/6 keys in unit screen search
================================================================================ ================================================================================
# 0.44.09-r1 # 0.44.09-r1

@ -1154,7 +1154,8 @@ private:
bool should_check_input(set<df::interface_key> *input) bool should_check_input(set<df::interface_key> *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))) (!in_entry_mode() && input->count(interface_key::UNITVIEW_PRF_PROF)))
{ {
if (!in_entry_mode()) if (!in_entry_mode())
@ -1165,11 +1166,14 @@ private:
*cursor_pos = 0; *cursor_pos = 0;
clear_search(); clear_search();
reset_all(); reset_all();
return false;
} }
else else
input->clear(); // Ignore cursor keys when typing {
// Ignore cursor keys when typing
return false; input->erase(interface_key::STANDARDSCROLL_LEFT);
input->erase(interface_key::STANDARDSCROLL_RIGHT);
}
} }
return true; return true;