mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-05 04:06:08 -05:00
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
15 lines
252 B
C
15 lines
252 B
C
#include "misc.h"
|
|
|
|
#include <wctype.h>
|
|
|
|
bool
|
|
isword(wchar_t wc, bool spaces_only, const wchar_t *delimiters)
|
|
{
|
|
if (spaces_only)
|
|
return iswgraph(wc);
|
|
|
|
if (wcschr(delimiters, wc) != NULL)
|
|
return false;
|
|
|
|
return iswgraph(wc);
|
|
}
|