commit 70e580c0028ef2eec5c457d6950c9b8804a00532
parent 1ee74172c234ee3d0d0da65aed52f895ed6f13ca
Author: Benno Schulenberg <bensberg@telfort.nl>
Date: Thu, 7 Aug 2025 15:23:04 +0200
completion: don't stop looking for candidates one byte too early
This fixes https://savannah.gnu.org/bugs/?67405.
Reported-by: Ivan Vorontsov <ivrntsv@yandex.ru>
Bug existed since version 2.7.2, since word completion was introduced.
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/text.c b/src/text.c
@@ -3165,7 +3165,7 @@ void complete_a_word(void)
/* Run through all of the lines in the buffer, looking for shard. */
while (pletion_line != NULL) {
- ssize_t threshold = strlen(pletion_line->data) - shard_length - 1;
+ ssize_t threshold = strlen(pletion_line->data) - shard_length;
/* The point where we can stop searching for shard. */
completionstruct *some_word;
char *completion;