mirror of
https://github.com/vim/vim.git
synced 2025-09-30 04:44:14 -04:00
patch 8.2.0637: incsearch highlighting does not work for ":sort!"
Problem: Incsearch highlighting does not work for ":sort!". Solution: Skip over the exclamation point. (closes #5983)
This commit is contained in:
@@ -249,7 +249,9 @@ do_incsearch_highlighting(int firstc, int *search_delim, incsearch_state_T *is_s
|
|||||||
}
|
}
|
||||||
else if (STRNCMP(cmd, "sort", MAX(p - cmd, 3)) == 0)
|
else if (STRNCMP(cmd, "sort", MAX(p - cmd, 3)) == 0)
|
||||||
{
|
{
|
||||||
// skip over flags
|
// skip over ! and flags
|
||||||
|
if (*p == '!')
|
||||||
|
p = skipwhite(p + 1);
|
||||||
while (ASCII_ISALPHA(*(p = skipwhite(p))))
|
while (ASCII_ISALPHA(*(p = skipwhite(p))))
|
||||||
++p;
|
++p;
|
||||||
if (*p == NUL)
|
if (*p == NUL)
|
||||||
|
9
src/testdir/dumps/Test_incsearch_sort_02.dump
Normal file
9
src/testdir/dumps/Test_incsearch_sort_02.dump
Normal file
@@ -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&|s|o|r|t|!| |/|o|n> @59
|
@@ -1136,11 +1136,14 @@ func Test_incsearch_sort_dump()
|
|||||||
" the 'ambiwidth' check.
|
" the 'ambiwidth' check.
|
||||||
sleep 100m
|
sleep 100m
|
||||||
|
|
||||||
" Need to send one key at a time to force a redraw.
|
|
||||||
call term_sendkeys(buf, ':sort ni u /on')
|
call term_sendkeys(buf, ':sort ni u /on')
|
||||||
call VerifyScreenDump(buf, 'Test_incsearch_sort_01', {})
|
call VerifyScreenDump(buf, 'Test_incsearch_sort_01', {})
|
||||||
call term_sendkeys(buf, "\<Esc>")
|
call term_sendkeys(buf, "\<Esc>")
|
||||||
|
|
||||||
|
call term_sendkeys(buf, ':sort! /on')
|
||||||
|
call VerifyScreenDump(buf, 'Test_incsearch_sort_02', {})
|
||||||
|
call term_sendkeys(buf, "\<Esc>")
|
||||||
|
|
||||||
call StopVimInTerminal(buf)
|
call StopVimInTerminal(buf)
|
||||||
call delete('Xis_sort_script')
|
call delete('Xis_sort_script')
|
||||||
endfunc
|
endfunc
|
||||||
|
@@ -746,6 +746,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
637,
|
||||||
/**/
|
/**/
|
||||||
636,
|
636,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user