NCursesUI: info_show do not require previous call to info_hide

This commit is contained in:
Maxime Coste 2013-11-19 19:50:54 +00:00
parent 44b0957e10
commit b90594353c

View File

@ -680,7 +680,12 @@ void NCursesUI::info_show(const String& title, const String& content,
DisplayCoord anchor, ColorPair colors, DisplayCoord anchor, ColorPair colors,
MenuStyle style) MenuStyle style)
{ {
kak_assert(m_info_win == nullptr); if (m_info_win)
{
wredrawln(stdscr, (int)window_pos(m_info_win).line,
(int)window_size(m_info_win).line);
delwin(m_info_win);
}
const String& info_box = style == MenuStyle::Inline ? const String& info_box = style == MenuStyle::Inline ?
content : make_info_box(title, content, m_dimensions.column); content : make_info_box(title, content, m_dimensions.column);