aboutsummaryrefslogtreecommitdiff
path: root/search.c
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2020-10-09 17:44:23 +0000
committerDaniel Eklöf <daniel@ekloef.se>2020-10-09 17:44:23 +0000
commit49f4b3da64d45cee04295ce005ff0399fcfeebe2 (patch)
tree307eba129b6e0fdf8a921e9c9107cd91dd944fcf /search.c
parentxmalloc: add xwcsdup() (diff)
config: add ‘[default].word-delimiters’
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
Diffstat (limited to 'search.c')
-rw-r--r--search.c3
1 files changed, 2 insertions, 1 deletions
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;
}