1
1
mirror of https://github.com/mawww/kakoune.git synced 2024-07-14 16:10:24 +03:00

Add terminal_info_inline_borders option

This commit is contained in:
Caleb Heuer 2023-11-16 17:10:37 -07:00
parent 374a7a8c99
commit 161b9e741a
4 changed files with 9 additions and 2 deletions

View File

@ -381,6 +381,10 @@ are exclusively available to built-in options.
set the maximum allowable width of an info box. set to zero for
no limit.
*terminal_info_inline_borders*:::
if *yes* or *true*, borders will be drawn around info boxes with the
*inline* style.
[[startup-info]]
*startup_info_version* `int`::
_default_ 0 +

View File

@ -600,7 +600,8 @@ void register_options()
" terminal_shift_function_key int\n"
" terminal_padding_char codepoint\n"
" terminal_padding_fill bool\n"
" terminal_info_max_width int\n",
" terminal_info_max_width int\n"
" terminal_info_inline_borders bool\n",
UserInterface::Options{});
reg.declare_option("modelinefmt", "format string used to generate the modeline",
"%val{bufname} %val{cursor_line}:%val{cursor_char_column} {{context_info}} {{mode_info}} - %val{client}@[%val{session}]"_str);

View File

@ -1300,7 +1300,7 @@ void TerminalUI::info_show(const DisplayLine& title, const DisplayLineList& cont
m_info.face = face;
m_info.style = style;
const bool framed = style == InfoStyle::Prompt or style == InfoStyle::Modal;
const bool framed = style == InfoStyle::Prompt or style == InfoStyle::Modal or m_info_inline_borders;
const bool assisted = style == InfoStyle::Prompt and m_assistant.size() != 0;
DisplayCoord max_size = m_dimensions;
@ -1555,6 +1555,7 @@ void TerminalUI::set_ui_options(const Options& options)
m_padding_fill = find("terminal_padding_fill").map(to_bool).value_or(false);
m_info_max_width = find("terminal_info_max_width").map(str_to_int_ifp).value_or(0);
m_info_inline_borders = find("terminal_info_inline_borders").map(to_bool).value_or(false);
}
}

View File

@ -175,6 +175,7 @@ private:
ColumnCount m_status_len = 0;
ColumnCount m_info_max_width = 0;
bool m_info_inline_borders = false;
};
}