Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions doc/pages/options.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -385,6 +385,10 @@ are exclusively available to built-in options.
set the maximum allowable width of an info box. set to zero for
no limit.

*terminal_cursor_native*:::
if *yes* or *true*, use native terminal cursor visibility control
instead of Kakoune's cursor management (defaults to *false*)

[[startup-info]]
*startup_info_version* `int`::
_default_ 0 +
Expand Down
1 change: 1 addition & 0 deletions src/main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -604,6 +604,7 @@ void register_options()
" terminal_shift_function_key int\n"
" terminal_padding_char codepoint\n"
" terminal_padding_fill bool\n"
" terminal_cursor_native bool\n"
" terminal_info_max_width int\n",
UserInterface::Options{});
reg.declare_option("modelinefmt", "format string used to generate the modeline",
Expand Down
7 changes: 7 additions & 0 deletions src/terminal_ui.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1574,6 +1574,13 @@ void TerminalUI::set_ui_options(const Options& options)

m_padding_char = find("terminal_padding_char").map([](StringView s) { return s.column_length() < 1 ? ' ' : s[0_char]; }).value_or(Codepoint{'~'});
m_padding_fill = find("terminal_padding_fill").map(to_bool).value_or(false);

bool new_cursor_native = find("terminal_cursor_native").map(to_bool).value_or(false);
if (new_cursor_native != m_cursor_native)
{
m_cursor_native = new_cursor_native;
write(STDOUT_FILENO, m_cursor_native ? "\033[?25h" : "\033[?25l");
}

m_info_max_width = find("terminal_info_max_width").map(str_to_int_ifp).value_or(0);
}
Expand Down
1 change: 1 addition & 0 deletions src/terminal_ui.hh
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ private:

Codepoint m_padding_char = '~';
bool m_padding_fill = false;
bool m_cursor_native = false;

bool m_dirty = false;

Expand Down
Loading