mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-15 22:05:24 -05:00
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
This commit is contained in:
parent
8aba25a477
commit
49f4b3da64
8 changed files with 36 additions and 20 deletions
3
search.c
3
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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue