From 198529525c788f51babcd425ea7dcdb4d8125c04 Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Tue, 3 Dec 2019 19:16:05 +0100 Subject: selection: break out isword() to a new file --- selection.c | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) (limited to 'selection.c') diff --git a/selection.c b/selection.c index b77dc64a..bbe990d7 100644 --- a/selection.c +++ b/selection.c @@ -15,6 +15,7 @@ #include "async.h" #include "grid.h" +#include "misc.h" #include "render.h" #include "vt.h" @@ -222,27 +223,6 @@ selection_cancel(struct terminal *term) } } -static bool -isword(wint_t c, bool spaces_only) -{ - if (spaces_only) - return !iswspace(c); - - switch (c) { - default: return !iswspace(c); - - case L'{': case L'}': - case L'[': case L']': - case L'(': case L')': - case L'`': - case L'\'': - case L'"': - case L',': case L'.': - case L':': case L';': - return false; - } -} - void selection_mark_word(struct terminal *term, int col, int row, bool spaces_only, uint32_t serial) -- cgit v1.3