diff options
| author | Marc André Tanner <mat@brain-dump.org> | 2016-02-03 12:45:48 +0100 |
|---|---|---|
| committer | Marc André Tanner <mat@brain-dump.org> | 2016-02-03 16:22:44 +0100 |
| commit | 42da6e75c05cf1f184e4d45601bb5ed0679e40bd (patch) | |
| tree | 6fc6466a6fb95b43fd64eafc64fffb278d16bdf7 /text-motions.h | |
| parent | 9803932e3d702e2cdc654501d9fd4cb2c7fac491 (diff) | |
| download | vis-42da6e75c05cf1f184e4d45601bb5ed0679e40bd.tar.gz vis-42da6e75c05cf1f184e4d45601bb5ed0679e40bd.tar.xz | |
text-motion: export custom word motion functions
Diffstat (limited to 'text-motions.h')
| -rw-r--r-- | text-motions.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/text-motions.h b/text-motions.h index 32e4a1f..b1388c8 100644 --- a/text-motions.h +++ b/text-motions.h @@ -76,6 +76,13 @@ size_t text_word_end_next(Text*, size_t pos); size_t text_word_end_prev(Text*, size_t pos); size_t text_word_start_next(Text*, size_t pos); size_t text_word_start_prev(Text*, size_t pos); +/* + * More general versions of the above, define your own word boundaries. + */ +size_t text_customword_start_next(Text*, size_t pos, int (*isboundry)(int)); +size_t text_customword_start_prev(Text*, size_t pos, int (*isboundry)(int)); +size_t text_customword_end_next(Text*, size_t pos, int (*isboundry)(int)); +size_t text_customword_end_prev(Text*, size_t pos, int (*isboundry)(int)); /* TODO: implement the following semantics * A sentence is defined as ending at a '.', '!' or '?' followed by either the * end of a line, or by a space or tab. Any number of closing ')', ']', '"' |
