Merge remote-tracking branch 'arrufat/fix-crash-menu-small-window'
This commit is contained in:
commit
be5547ffd0
|
@ -1073,6 +1073,9 @@ void TerminalUI::menu_show(ConstArrayView<DisplayLine> items,
|
||||||
const LineCount height = is_search ?
|
const LineCount height = is_search ?
|
||||||
1 : (min<LineCount>(max_height, div_round_up(item_count, m_menu.columns)));
|
1 : (min<LineCount>(max_height, div_round_up(item_count, m_menu.columns)));
|
||||||
|
|
||||||
|
if (height == 0)
|
||||||
|
return;
|
||||||
|
|
||||||
const ColumnCount maxlen = (m_menu.columns > 1 and item_count > 1) ?
|
const ColumnCount maxlen = (m_menu.columns > 1 and item_count > 1) ?
|
||||||
max_width / m_menu.columns - 1 : max_width;
|
max_width / m_menu.columns - 1 : max_width;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user