summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohannes Altmanninger <aclopte@gmail.com>2024-03-12 20:34:06 +0100
committerMaxime Coste <mawww@kakoune.org>2024-03-15 21:54:59 +1100
commit24d719bf13473f6c3ebd0a5ef8d2296954ca38ab (patch)
tree714933d5d75af3710ee31173bf1adde384ec995a /src
parentbdca6760fef968586736a291b5b7bd0ad5f62c17 (diff)
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
Diffstat (limited to 'src')
-rw-r--r--src/terminal_ui.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/terminal_ui.cc b/src/terminal_ui.cc
index db967976..3ad95e40 100644
--- a/src/terminal_ui.cc
+++ b/src/terminal_ui.cc
@@ -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;