diff options
Diffstat (limited to 'text-motions.c')
| -rw-r--r-- | text-motions.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/text-motions.c b/text-motions.c index fd3e99a..18e727f 100644 --- a/text-motions.c +++ b/text-motions.c @@ -70,11 +70,9 @@ static size_t find_prev(Text *txt, size_t pos, const char *s, bool line) { if (!s) return pos; size_t len = strlen(s), matched = len - 1; - Iterator it, sit; + Iterator it = text_iterator_get(txt, pos), sit; if (len == 0) return pos; - pos += len; - it = text_iterator_get(txt, pos); for (char c; text_iterator_byte_prev(&it, &c); ) { if (c == s[matched]) { if (matched == 0) |
