mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
vim-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 vim/vim#5983)
333015a46e
This commit is contained in:
parent
ea03032018
commit
cc484928d5
@ -339,7 +339,10 @@ static bool do_incsearch_highlighting(int firstc, incsearch_state_T *s,
|
|||||||
p_magic = false;
|
p_magic = false;
|
||||||
}
|
}
|
||||||
} 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++;
|
||||||
}
|
}
|
||||||
|
@ -743,11 +743,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
|
||||||
|
Loading…
Reference in New Issue
Block a user