From fe0061c6093aac817ed6061b75868a97a116d9c0 Mon Sep 17 00:00:00 2001 From: Girish Palya Date: Wed, 10 Sep 2025 04:12:16 -0400 Subject: [PATCH] patch 9.1.1752: tests: need another test for v9.1.1750 behaviour Problem: tests: No test when deleting text after autocompletion with preinsert did complete an entry Solution: Verify, that after deletion autocompletion does not reinsert the deleted text. Note: the actual issue was fixed with v9.1.1750. (Girish Palya) Pre v9.1.1750 behaviour: When autocomplete is enabled with *preinsert*, deleting text after selecting a longer match could cause unintended reinsertion, e.g.: - Matches available: "foo" and "foobar". - User selects "foobar" with Ctrl-N - User deletes characters back to "foo". - Autocomplete then incorrectly re-inserts "bar", preventing deletion past "foo". v9.1.1750 removes the unwanted reinsertion so text can be deleted correctly. closes: #18259 Signed-off-by: Girish Palya Signed-off-by: Christian Brabandt --- src/testdir/test_ins_complete.vim | 6 ++++++ src/version.c | 2 ++ 2 files changed, 8 insertions(+) diff --git a/src/testdir/test_ins_complete.vim b/src/testdir/test_ins_complete.vim index 193775d1ce..a5e7a8b81c 100644 --- a/src/testdir/test_ins_complete.vim +++ b/src/testdir/test_ins_complete.vim @@ -5642,6 +5642,12 @@ func Test_autocomplete_completeopt_preinsert() call feedkeys($"cwch\\n.n.", 'tx') call assert_equal(repeat(['changed'], 3), getline(1, 3)) + " Select a match and delete up to text equal to another match + %delete + call setline(1, ["foobar", "foo"]) + call feedkeys("Go\", 'tx') + call DoTest("f\\\\\\", 'foo', 3) + %delete _ let &l:undolevels = &l:undolevels normal! ifoo diff --git a/src/version.c b/src/version.c index c74490c3ea..7c186513b3 100644 --- a/src/version.c +++ b/src/version.c @@ -724,6 +724,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 1752, /**/ 1751, /**/