diff options
| author | Marc André Tanner <mat@brain-dump.org> | 2016-02-03 12:32:46 +0100 |
|---|---|---|
| committer | Marc André Tanner <mat@brain-dump.org> | 2016-02-03 16:22:44 +0100 |
| commit | 9803932e3d702e2cdc654501d9fd4cb2c7fac491 (patch) | |
| tree | ad20c93f2e1066fcb1cae11241e43bbb6f7d292d /text-objects.c | |
| parent | b4f1609e637dba2405c7c8de0dcdc86e2fac0752 (diff) | |
| download | vis-9803932e3d702e2cdc654501d9fd4cb2c7fac491.tar.gz vis-9803932e3d702e2cdc654501d9fd4cb2c7fac491.tar.xz | |
text-object: fix bugs in outer word `aw` implementation
Diffstat (limited to 'text-objects.c')
| -rw-r--r-- | text-objects.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/text-objects.c b/text-objects.c index a85d70f..c9a60d3 100644 --- a/text-objects.c +++ b/text-objects.c @@ -126,7 +126,7 @@ Filerange text_object_word(Text *txt, size_t pos) { } else { /* on a single character */ r.start = pos; - r.end = text_char_next(txt, pos); + r.end = text_word_start_next(txt, pos); } } else if (isboundry(prev)) { /* at start of a word */ @@ -157,7 +157,7 @@ Filerange text_object_word_outer(Text *txt, size_t pos) { if (isspace((unsigned char)c)) { /* middle of two words, include leading white space */ r.start = text_char_next(txt, text_word_end_prev(txt, pos)); - r.end = text_word_end_next(txt, pos); + r.end = text_char_next(txt, text_word_end_next(txt, pos)); } else if (isboundry(prev) && isboundry(next)) { if (isboundry(c)) { r.start = text_char_next(txt, text_word_end_prev(txt, pos)); |
