mirror of
https://github.com/tmux/tmux.git
synced 2026-07-24 01:30:32 +00:00
Add highlighting to the current line.
This commit is contained in:
@@ -1388,7 +1388,9 @@ const struct options_table_entry options_table[] = {
|
||||
.type = OPTIONS_TABLE_STRING,
|
||||
.scope = OPTIONS_TABLE_WINDOW|OPTIONS_TABLE_PANE,
|
||||
.default_str = "#[align=right]"
|
||||
"#{?exit_status_present,#[bg=themeyellow](#{exit_status}),}",
|
||||
"#{?exit_status_present,#[bg=themeyellow]#[fg=themeblack]"
|
||||
"#{?exit_status_current,#[fg=themewhite],}(#{exit_status})"
|
||||
"#[bg=themeyellow]#[fg=themeblack],}",
|
||||
.text = "Format of OSC 133 exit status in copy mode."
|
||||
},
|
||||
|
||||
|
||||
3
tmux.1
3
tmux.1
@@ -5784,6 +5784,9 @@ The format is expanded with
|
||||
and
|
||||
.Ql exit_status_present ,
|
||||
which is set only when the OSC 133 end-of-output marker includes a status.
|
||||
The
|
||||
.Ql exit_status_current
|
||||
format is set when the cursor is on the command line.
|
||||
.Pp
|
||||
.It Ic copy\-mode\-position\-style Ar style
|
||||
Set the style of the position indicator in copy mode.
|
||||
|
||||
@@ -6046,6 +6046,7 @@ window_copy_write_line(struct window_mode_entry *wme,
|
||||
else
|
||||
content_sx = sx;
|
||||
backing_y = hsize - data->oy + py;
|
||||
current = (py == data->cy);
|
||||
|
||||
screen_write_cursormove(ctx, 0, py, 0);
|
||||
|
||||
@@ -6065,7 +6066,6 @@ window_copy_write_line(struct window_mode_entry *wme,
|
||||
style_apply(&cur_ln_gc, oo,
|
||||
"copy-mode-current-line-number-style", ft);
|
||||
cur_ln_gc.flags |= GRID_FLAG_NOPALETTE;
|
||||
current = (py == data->cy);
|
||||
absolute = backing_y + 1;
|
||||
if (data->lines != NULL && backing_y < data->line_count)
|
||||
absolute = data->lines[backing_y].source_line + 1;
|
||||
@@ -6143,6 +6143,7 @@ window_copy_write_line(struct window_mode_entry *wme,
|
||||
status_line->exit_status_present) {
|
||||
format_add(ft, "exit_status", "%hhu", status_line->exit_status);
|
||||
format_add(ft, "exit_status_present", "1");
|
||||
format_add(ft, "exit_status_current", "%d", current);
|
||||
value = options_get_string(oo, "copy-mode-exit-status-format");
|
||||
if (*value != '\0') {
|
||||
exit_status = format_expand(ft, value);
|
||||
|
||||
Reference in New Issue
Block a user