Copy mode search improvements:

- Add styles for the search marking styles (copy-mode-match-style and
  copy-mode-current-match-style).

- Show the current match (the one with the cursor on it) in a different style.

- Copying without a selection will copy the current match if there is one.
This commit is contained in:
nicm
2020-05-16 15:11:52 +00:00
parent 80e52545a0
commit 2391fe23ab
5 changed files with 167 additions and 54 deletions

View File

@ -656,6 +656,22 @@ const struct options_table_entry options_table[] = {
.default_num = 1
},
{ .name = "copy-mode-match-style",
.type = OPTIONS_TABLE_STRING,
.scope = OPTIONS_TABLE_WINDOW,
.default_str = "bg=cyan,fg=black",
.flags = OPTIONS_TABLE_IS_STYLE,
.separator = ","
},
{ .name = "copy-mode-current-match-style",
.type = OPTIONS_TABLE_STRING,
.scope = OPTIONS_TABLE_WINDOW,
.default_str = "bg=magenta,fg=black",
.flags = OPTIONS_TABLE_IS_STYLE,
.separator = ","
},
{ .name = "main-pane-height",
.type = OPTIONS_TABLE_STRING,
.scope = OPTIONS_TABLE_WINDOW,