1
1
mirror of https://github.com/mawww/kakoune.git synced 2024-12-18 08:51:46 +03:00

Fix NCursesUI::m_items not being empty after a resize

Fixes #435
This commit is contained in:
Maxime Coste 2015-10-13 13:40:04 +01:00
parent 2d7e99da98
commit e5240ba4ff

View File

@ -630,6 +630,7 @@ void NCursesUI::menu_show(ConstArrayView<DisplayLine> items,
return; return;
const int item_count = items.size(); const int item_count = items.size();
m_items.clear(); // make sure it is empty
m_items.reserve(item_count); m_items.reserve(item_count);
CharCount longest = 0; CharCount longest = 0;
const CharCount maxlen = min((int)maxsize.column-2, 200); const CharCount maxlen = min((int)maxsize.column-2, 200);