commit | a6f9e300161f4cb54713da22f65b261595e8e614 | [log] [tgz] |
---|---|---|
author | Bram Moolenaar <Bram@vim.org> | Thu Jul 28 21:51:37 2022 +0100 |
committer | Bram Moolenaar <Bram@vim.org> | Thu Jul 28 21:51:37 2022 +0100 |
tree | f0663fef4a680eeaa7826e6f0cb4143aa51c0c3e | |
parent | 4e677b9c40ccbc5f090971b31dc2fe07bf05541d [diff] [blame] |
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.
diff --git a/src/insexpand.c b/src/insexpand.c index 7339ce9..fc3eff0 100644 --- a/src/insexpand.c +++ b/src/insexpand.c
@@ -3501,7 +3501,7 @@ { 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.