patch 9.1.1228: completion: current position column wrong after got a match

Commit: 
https://github.com/vim/vim/commit/5753084042e17d794627d77e4300def031ce5498
Author: glepnir <glephun...@gmail.com>
Date:   Fri Mar 21 17:16:21 2025 +0100

    patch 9.1.1228: completion: current position column wrong after got a match
    
    Problem:  The current_pos.col was incorrectly updated to the length of
              the matching text. This will cause the next search to start
              from the wrong position.
    Solution: current_pos has already been updated in search_str_in_line and
              does not need to be changed (glepnir)
    
    closes: #16941
    
    Signed-off-by: glepnir <glephun...@gmail.com>
    Signed-off-by: Christian Brabandt <c...@256bit.org>

diff --git a/src/search.c b/src/search.c
index 2698358c0..abd74416d 100644
--- a/src/search.c
+++ b/src/search.c
@@ -5392,7 +5392,6 @@ search_for_fuzzy_match(
                                }
 
                                *len = next_word_end - *ptr;
-                               current_pos.col = *len;
                            }
                        }
                        *pos = current_pos;
diff --git a/src/testdir/test_ins_complete.vim 
b/src/testdir/test_ins_complete.vim
index 88d1c1661..7b180a64e 100644
--- a/src/testdir/test_ins_complete.vim
+++ b/src/testdir/test_ins_complete.vim
@@ -2963,6 +2963,10 @@ func Test_complete_fuzzy_collect()
   call feedkeys("Sh\<C-X>\<C-K>\<C-N>\<C-N>\<CR>\<Esc>0", 'tx!')
   call assert_equal('think', getline(line('.') - 1))
 
+  call setline(1, ['foo bar fuzzy', 'completefuzzycollect'])
+  call feedkeys("Gofuzzy\<C-X>\<C-N>\<C-N>\<C-N>\<C-Y>\<Esc>0", 'tx!')
+  call assert_equal('completefuzzycollect', getline('.'))
+
   bw!
   bw!
   set dict&
diff --git a/src/version.c b/src/version.c
index 8739da0d3..18bf939a0 100644
--- a/src/version.c
+++ b/src/version.c
@@ -704,6 +704,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1228,
 /**/
     1227,
 /**/

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
To view this discussion visit 
https://groups.google.com/d/msgid/vim_dev/E1tvfG3-006yaE-NE%40256bit.org.

Raspunde prin e-mail lui