From 49f4b3da64d45cee04295ce005ff0399fcfeebe2 Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Fri, 9 Oct 2020 19:44:23 +0200 Subject: config: add ‘[default].word-delimiters’ MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This option lets the user configure which characters act as word delimiters when selecting text. This affects both “double clicking”, and ‘ctrl-w’ in scrollback search mode. Closes #156 --- search.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'search.c') diff --git a/search.c b/search.c index 551d21ba..0f1b4610 100644 --- a/search.c +++ b/search.c @@ -10,6 +10,7 @@ #define LOG_MODULE "search" #define LOG_ENABLE_DBG 0 #include "log.h" +#include "config.h" #include "grid.h" #include "input.h" #include "misc.h" @@ -368,7 +369,7 @@ search_match_to_end_of_word(struct terminal *term, bool spaces_only) bool done = false; for (; end_col < term->cols; end_col++) { wchar_t wc = row->cells[end_col].wc; - if (wc == 0 || (!first && !isword(wc, spaces_only))) { + if (wc == 0 || (!first && !isword(wc, spaces_only, term->conf->word_delimiters))) { done = true; break; } -- cgit v1.3