diff options
| author | Marc André Tanner <mat@brain-dump.org> | 2014-09-10 20:50:10 +0200 |
|---|---|---|
| committer | Marc André Tanner <mat@brain-dump.org> | 2014-09-10 20:52:18 +0200 |
| commit | 16bd3ede6241a4790246ad7fcbde21e8c1d626a0 (patch) | |
| tree | a05383c6320c9bdfbd19f43a1a99d183a713069c /text-motions.h | |
| parent | da3c41bca0f1b697f7a0eb364ca736ba8b30dbc8 (diff) | |
| download | vis-16bd3ede6241a4790246ad7fcbde21e8c1d626a0.tar.gz vis-16bd3ede6241a4790246ad7fcbde21e8c1d626a0.tar.xz | |
text-motions: fix no match case of text_find_char_{next,prev}
These functions should return the original position in case no
match was found.
Diffstat (limited to 'text-motions.h')
| -rw-r--r-- | text-motions.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/text-motions.h b/text-motions.h index 84f6ecc..e549402 100644 --- a/text-motions.h +++ b/text-motions.h @@ -16,7 +16,8 @@ size_t text_char_next(Text*, size_t pos); size_t text_char_prev(Text*, size_t pos); /* find the given substring either in forward or backward direction. - * does not wrap around at file start / end. */ + * does not wrap around at file start / end. if no match is found return + * original position */ size_t text_find_char_next(Text*, size_t pos, const char *s, size_t len); size_t text_find_char_prev(Text*, size_t pos, const char *s, size_t len); |
