mirror of
https://github.com/mawww/kakoune.git
synced 2024-09-11 13:00:41 +03:00
Fix off-by-two error in max size of frameless infoboxes
Framed info boxes need one cell for the border and one for inner space padding. That's 4 extra columns when counting both sides. Frameless boxes have neither border nor padding so 0 columns here. Closes #5106
This commit is contained in:
parent
bdca6760fe
commit
24d719bf13
@ -1311,7 +1311,7 @@ void TerminalUI::info_show(const DisplayLine& title, const DisplayLineList& cont
|
||||
max_size.line -= m_menu.size.line;
|
||||
|
||||
const auto max_content_width = (m_info_max_width > 0 ? std::min(max_size.column, m_info_max_width) : max_size.column) -
|
||||
(framed ? 4 : 2) -
|
||||
(framed ? 4 : 0) -
|
||||
(assisted ? m_assistant[0].column_length() : 0);
|
||||
if (max_content_width <= 0)
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user