diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2019-08-30 17:42:48 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2019-08-30 17:42:48 +0000 |
| commit | 42714c51a9840e434ecd9e9f34e49e721dfd58ea (patch) | |
| tree | 767828b986607566e5d1b0561c2d0df026af5c9e | |
| parent | render: draw (cursor) bar using the same thickness as underlines (diff) | |
search: fix distance to prev word calculation when final cursor was 0
| -rw-r--r-- | search.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -267,7 +267,7 @@ distance_prev_word(const struct terminal *term) } assert(cursor == 0 || iswspace(term->search.buf[cursor])); - if (iswspace(term->search.buf[cursor])) + if (cursor > 0 && iswspace(term->search.buf[cursor])) cursor++; return term->search.cursor - cursor; |
