Skip to content

Commit 66b550f

Browse files
committed
Add terminal_info_inline_borders option
1 parent 5e0f9a2 commit 66b550f

File tree

4 files changed

+9
-2
lines changed

4 files changed

+9
-2
lines changed

doc/pages/options.asciidoc

+4
Original file line numberDiff line numberDiff line change
@@ -385,6 +385,10 @@ are exclusively available to built-in options.
385385
set the maximum allowable width of an info box. set to zero for
386386
no limit.
387387

388+
*terminal_info_inline_borders*:::
389+
if *yes* or *true*, borders will be drawn around info boxes with the
390+
*inline* style.
391+
388392
[[startup-info]]
389393
*startup_info_version* `int`::
390394
_default_ 0 +

src/main.cc

+2-1
Original file line numberDiff line numberDiff line change
@@ -603,7 +603,8 @@ void register_options()
603603
" terminal_shift_function_key int\n"
604604
" terminal_padding_char codepoint\n"
605605
" terminal_padding_fill bool\n"
606-
" terminal_info_max_width int\n",
606+
" terminal_info_max_width int\n"
607+
" terminal_info_inline_borders bool\n",
607608
UserInterface::Options{});
608609
reg.declare_option("modelinefmt", "format string used to generate the modeline",
609610
"%val{bufname} %val{cursor_line}:%val{cursor_char_column} {{context_info}} {{mode_info}} - %val{client}@[%val{session}]"_str);

src/terminal_ui.cc

+2-1
Original file line numberDiff line numberDiff line change
@@ -1320,7 +1320,7 @@ void TerminalUI::info_show(const DisplayLine& title, const DisplayLineList& cont
13201320
m_info.face = face;
13211321
m_info.style = style;
13221322

1323-
const bool framed = style == InfoStyle::Prompt or style == InfoStyle::Modal;
1323+
const bool framed = style == InfoStyle::Prompt or style == InfoStyle::Modal or m_info_inline_borders;
13241324
const bool assisted = style == InfoStyle::Prompt and m_assistant.size() != 0;
13251325

13261326
DisplayCoord max_size = m_dimensions;
@@ -1576,6 +1576,7 @@ void TerminalUI::set_ui_options(const Options& options)
15761576
m_padding_fill = find("terminal_padding_fill").map(to_bool).value_or(false);
15771577

15781578
m_info_max_width = find("terminal_info_max_width").map(str_to_int_ifp).value_or(0);
1579+
m_info_inline_borders = find("terminal_info_inline_borders").map(to_bool).value_or(false);
15791580
}
15801581

15811582
}

src/terminal_ui.hh

+1
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,7 @@ private:
175175

176176
ColumnCount m_status_len = 0;
177177
ColumnCount m_info_max_width = 0;
178+
bool m_info_inline_borders = false;
178179
};
179180

180181
}

0 commit comments

Comments
 (0)