all repos — fluxbox @ 85a44db6c60fd70d968ee79696e4d06aa359e4bf

custom fork of the fluxbox windowmanager

reset typeahead when adding/removing items in the menu
Mark Tiefenbruck mark@fluxbox.org
commit

85a44db6c60fd70d968ee79696e4d06aa359e4bf

parent

5119ded37434bbc94f0d3c663f0d670f37438583

1 files changed, 3 insertions(+), 0 deletions(-)

jump to
M src/FbTk/Menu.ccsrc/FbTk/Menu.cc

@@ -243,6 +243,8 @@ Menuitems::iterator it = menuitems.begin() + index;

MenuItem *item = (*it); if (item) { + if (!m_matches.empty()) + resetTypeAhead(); menuitems.erase(it); // avoid O(n^2) algorithm with removeAll() if (index != menuitems.size())

@@ -511,6 +513,7 @@ if (m_need_update)

updateMenu(); m_type_ahead.reset(); + m_matches.clear(); menu.window.showSubwindows(); menu.window.show();