patch 9.2.0226: No 'incsearch' highlighting support for :uniq

Commit: 
https://github.com/vim/vim/commit/48137e4e48f103f27b4486e9dea18f5d073972fe
Author: Hirohito Higashi <[email protected]>
Date:   Sun Mar 22 17:00:46 2026 +0000

    patch 9.2.0226: No 'incsearch' highlighting support for :uniq
    
    Problem:  No 'incsearch' highlighting support for :uniq
    Solution: Add :uniq support (Hirohito Higashi)
    
    closes: #19780
    
    Signed-off-by: Hirohito Higashi <[email protected]>
    Signed-off-by: Christian Brabandt <[email protected]>

diff --git a/src/ex_getln.c b/src/ex_getln.c
index 917e67529..65bd8ccc8 100644
--- a/src/ex_getln.c
+++ b/src/ex_getln.c
@@ -245,7 +245,7 @@ parse_pattern_and_range(
     // Skip over the range to find the command.
     cmd = skip_range(ea.cmd, TRUE, NULL);
 
-    if (vim_strchr((char_u *)"sgvl", *cmd) == NULL)
+    if (vim_strchr((char_u *)"sgvlu", *cmd) == NULL)
        return FALSE;
 
     // Skip over command name to find pattern separator
diff --git a/src/testdir/dumps/Test_incsearch_uniq_01.dump 
b/src/testdir/dumps/Test_incsearch_uniq_01.dump
new file mode 100644
index 000000000..9e6433ac5
--- /dev/null
+++ b/src/testdir/dumps/Test_incsearch_uniq_01.dump
@@ -0,0 +1,9 @@
+|a+0&#ffffff0|n|o|t|h|e|r| |o+1&&|n|e+0&&| |2| @56
+|t|h|a|t| |o+0&#ffff4012|n|e+0&#ffffff0| |3| @59
+|t|h|e| |o+0&#ffff4012|n|e+0&#ffffff0| |1| @60
+|~+0#4040ff13&| @68
+|~| @68
+|~| @68
+|~| @68
+|~| @68
+|:+0#0000000&|u|n|i|q| |/|o|n> @60
diff --git a/src/testdir/dumps/Test_incsearch_uniq_02.dump 
b/src/testdir/dumps/Test_incsearch_uniq_02.dump
new file mode 100644
index 000000000..6a5b3a91a
--- /dev/null
+++ b/src/testdir/dumps/Test_incsearch_uniq_02.dump
@@ -0,0 +1,9 @@
+|a+0&#ffffff0|n|o|t|h|e|r| |o+1&&|n|e+0&&| |2| @56
+|t|h|a|t| |o+0&#ffff4012|n|e+0&#ffffff0| |3| @59
+|t|h|e| |o+0&#ffff4012|n|e+0&#ffffff0| |1| @60
+|~+0#4040ff13&| @68
+|~| @68
+|~| @68
+|~| @68
+|~| @68
+|:+0#0000000&|u|n|i|q|!| |/|o|n> @59
diff --git a/src/testdir/test_search.vim b/src/testdir/test_search.vim
index a35f380a8..725d08b59 100644
--- a/src/testdir/test_search.vim
+++ b/src/testdir/test_search.vim
@@ -1319,6 +1319,31 @@ func Test_incsearch_sort_dump()
   call StopVimInTerminal(buf)
 endfunc
 
+" Similar to Test_incsearch_sort_dump() for :uniq
+func Test_incsearch_uniq_dump()
+  CheckOption incsearch
+  CheckScreendump
+
+  call writefile([
+       \ 'set incsearch hlsearch scrolloff=0',
+       \ 'call setline(1, ["another one 2", "that one 3", "the one 1"])',
+       \ ], 'Xis_uniq_script', 'D')
+  let buf = RunVimInTerminal('-S Xis_uniq_script', {'rows': 9, 'cols': 70})
+  " Give Vim a chance to redraw to get rid of the spaces in line 2 caused by
+  " the 'ambiwidth' check.
+  sleep 100m
+
+  call term_sendkeys(buf, ':uniq /on')
+  call VerifyScreenDump(buf, 'Test_incsearch_uniq_01', {})
+  call term_sendkeys(buf, "\<Esc>")
+
+  call term_sendkeys(buf, ':uniq! /on')
+  call VerifyScreenDump(buf, 'Test_incsearch_uniq_02', {})
+  call term_sendkeys(buf, "\<Esc>")
+
+  call StopVimInTerminal(buf)
+endfunc
+
 " Similar to Test_incsearch_substitute_dump() for :vimgrep famiry
 func Test_incsearch_vimgrep_dump()
   CheckOption incsearch
diff --git a/src/version.c b/src/version.c
index 5b2396b3c..f5693b6a7 100644
--- a/src/version.c
+++ b/src/version.c
@@ -734,6 +734,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    226,
 /**/
     225,
 /**/

-- 
-- 
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 [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/vim_dev/E1w4MOF-000jW6-Hv%40256bit.org.

Raspunde prin e-mail lui