config: add 'indicate-when-selecting'

This allows disabling the caret style mouse cursor when the Shift key
is held.
This commit is contained in:
Craig Barnes 2020-08-03 01:53:16 +01:00
parent 91da76656c
commit 7422719e5b
6 changed files with 13 additions and 2 deletions

View file

@ -520,6 +520,9 @@ parse_section_cursor(const char *key, const char *value, struct config *conf,
else if (strcmp(key, "hide-when-typing") == 0)
conf->cursor.hide_when_typing = str_to_bool(value);
else if (strcmp(key, "indicate-when-selecting") == 0)
conf->cursor.indicate_when_selecting = str_to_bool(value);
else if (strcmp(key, "color") == 0) {
char *value_copy = strdup(value);
const char *text = strtok(value_copy, " ");
@ -1249,6 +1252,7 @@ config_load(struct config *conf, const char *conf_path, bool errors_are_fatal)
.style = CURSOR_BLOCK,
.blink = false,
.hide_when_typing = false,
.indicate_when_selecting = true,
.color = {
.text = 0,
.cursor = 0,