From: Hirohito Higashi Date: Sun, 22 Mar 2026 17:00:46 +0000 (+0000) Subject: patch 9.2.0226: No 'incsearch' highlighting support for :uniq X-Git-Tag: v9.2.0226^0 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=48137e4e48f103f27b4486e9dea18f5d073972fe;p=thirdparty%2Fvim.git 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 Signed-off-by: Christian Brabandt --- diff --git a/src/ex_getln.c b/src/ex_getln.c index 917e67529b..65bd8ccc8f 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 0000000000..9e6433ac5e --- /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 0000000000..6a5b3a91a0 --- /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 a35f380a84..725d08b59a 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, "\") + + call term_sendkeys(buf, ':uniq! /on') + call VerifyScreenDump(buf, 'Test_incsearch_uniq_02', {}) + call term_sendkeys(buf, "\") + + 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 5b2396b3cd..f5693b6a7f 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, /**/