diff --git a/src/ncurses_ui.cc b/src/ncurses_ui.cc index f91d20c2..edcd1bd3 100644 --- a/src/ncurses_ui.cc +++ b/src/ncurses_ui.cc @@ -437,6 +437,12 @@ void NCursesUI::check_resize(bool force) if (char* csr = tigetstr((char*)"csr")) putp(tparm(csr, (long)0, (long)ws.ws_row)); + + if (not m_items.empty()) + { + auto items = std::move(m_items); + menu_show(items, m_menu_anchor, m_menu_fg, m_menu_bg, m_menu_style); + } } else kak_assert(false); @@ -618,6 +624,8 @@ void NCursesUI::menu_show(ConstArrayView items, m_menu_fg = fg; m_menu_bg = bg; + m_menu_style = style; + m_menu_anchor = anchor; if (style == MenuStyle::Prompt) anchor = CharCoord{m_status_on_top ? 0_line : m_dimensions.line, 0}; diff --git a/src/ncurses_ui.hh b/src/ncurses_ui.hh index ad51c8e2..97b3f41c 100644 --- a/src/ncurses_ui.hh +++ b/src/ncurses_ui.hh @@ -91,6 +91,8 @@ private: Vector m_items; Face m_menu_fg; Face m_menu_bg; + CharCoord m_menu_anchor; + MenuStyle m_menu_style; int m_selected_item = 0; int m_menu_columns = 1; LineCount m_menu_top_line = 0;