mirror of
https://github.com/vim/vim.git
synced 2026-05-28 00:21:37 +02:00
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 <h.east.727@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
committed by
Christian Brabandt
parent
e147b635fc
commit
48137e4e48
+1
-1
@@ -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
|
||||
|
||||
+9
@@ -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
|
||||
+9
@@ -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
|
||||
@@ -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
|
||||
|
||||
@@ -734,6 +734,8 @@ static char *(features[]) =
|
||||
|
||||
static int included_patches[] =
|
||||
{ /* Add new patch number below this line */
|
||||
/**/
|
||||
226,
|
||||
/**/
|
||||
225,
|
||||
/**/
|
||||
|
||||
Reference in New Issue
Block a user