From 11f7a6616b8d4636c8df513cd5626f7ca66017b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Sun, 28 Mar 2021 21:15:39 +0200 Subject: [PATCH] search: match_to_end_of_word(): we always extend the selection with at least one character --- search.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/search.c b/search.c index dd10ee6c..c4bc4a62 100644 --- a/search.c +++ b/search.c @@ -456,13 +456,11 @@ search_match_to_end_of_word(struct terminal *term, bool spaces_only) xassert(term->grid->rows[new_end.row] != NULL); + /* Find next word boundary */ new_end.row -= term->grid->view; selection_find_word_boundary_right(term, &new_end, spaces_only); new_end.row += term->grid->view; - if (new_end.row == old_end.row && new_end.col == old_end.col) - return; - struct coord pos = old_end; const struct row *row = term->grid->rows[pos.row];