1
1
mirror of https://github.com/mawww/kakoune.git synced 2024-12-19 01:11:36 +03:00

Fix Menu use of j/k keys when editing filter

This commit is contained in:
Maxime Coste 2014-07-22 18:39:04 +01:00
parent 3c021672d2
commit bc48d9260d

View File

@ -279,7 +279,7 @@ public:
} }
} }
else if (key == Key::Down or key == ctrl('i') or else if (key == Key::Down or key == ctrl('i') or
key == ctrl('n') or key == 'j') key == ctrl('n') or (not m_edit_filter and key == 'j'))
{ {
auto it = std::find_if(m_selected+1, m_choices.end(), match_filter); auto it = std::find_if(m_selected+1, m_choices.end(), match_filter);
if (it == m_choices.end()) if (it == m_choices.end())
@ -287,7 +287,7 @@ public:
select(it); select(it);
} }
else if (key == Key::Up or key == Key::BackTab or else if (key == Key::Up or key == Key::BackTab or
key == ctrl('p') or key == 'k') key == ctrl('p') or (not m_edit_filter and key == 'k'))
{ {
ChoiceList::const_reverse_iterator selected(m_selected+1); ChoiceList::const_reverse_iterator selected(m_selected+1);
auto it = std::find_if(selected+1, m_choices.rend(), match_filter); auto it = std::find_if(selected+1, m_choices.rend(), match_filter);