0
0
mirror of https://github.com/vim/vim.git synced 2025-11-16 23:24:03 -05:00

patch 9.0.0102: reading past end of line with insert mode completion

Problem:    Reading past end of line with insert mode completion.
Solution:   Check text length.
This commit is contained in:
Bram Moolenaar
2022-07-28 21:51:37 +01:00
parent 4e677b9c40
commit a6f9e30016
3 changed files with 11 additions and 1 deletions

View File

@@ -3501,7 +3501,7 @@ ins_comp_get_next_word_or_line(
{
char_u *tmp_ptr = ptr;
if (compl_status_adding())
if (compl_status_adding() && compl_length <= (int)STRLEN(tmp_ptr))
{
tmp_ptr += compl_length;
// Skip if already inside a word.