mirror of
https://github.com/neovim/neovim.git
synced 2026-08-28 10:01:49 +00:00
vim-patch:9.1.2069: Search wrap indicator not shown w/out 'shm-S' (#37332)
Problem: when shortmess doesn't have 'S', backward search wrap doesn't
show the "W" before count. forward search works fine but
backward fails because the position check logic is backwards -
it checks if cursor < pos instead of using the existing
wrapped flag.
Solution: Use sia->sa_wrapped flag that searchit() already sets
correctly (glepnir).
fixes: vim/vim#5280
closes: vim/vim#19138
ccb7b43365
Co-authored-by: glepnir <glephunter@gmail.com>
This commit is contained in:
@@ -67,10 +67,17 @@ describe('search stat', function()
|
||||
{1:~ }|*5
|
||||
/foo [1/2] |
|
||||
]])
|
||||
feed('n')
|
||||
screen:expect([[
|
||||
if |
|
||||
{13:^+-- 2 lines: foo·············}|
|
||||
endif |
|
||||
|
|
||||
{1:~ }|*5
|
||||
/foo W [1/2] |
|
||||
]])
|
||||
feed('n')
|
||||
-- Note: there is an intermediate state where the search stat disappears.
|
||||
feed('n')
|
||||
screen:expect_unchanged(true)
|
||||
feed('n')
|
||||
screen:expect_unchanged(true)
|
||||
end)
|
||||
|
||||
@@ -163,7 +170,7 @@ describe('search stat', function()
|
||||
{10:^test} |
|
||||
|
|
||||
{1:~ }|*7
|
||||
/\<test\> [1/1] |
|
||||
/\<test\> W [1/1] |
|
||||
]])
|
||||
|
||||
feed('N')
|
||||
@@ -171,7 +178,7 @@ describe('search stat', function()
|
||||
{10:^test} |
|
||||
|
|
||||
{1:~ }|*7
|
||||
?\<test\> [1/1] |
|
||||
?\<test\> W [1/1] |
|
||||
]])
|
||||
|
||||
command('set shm+=S')
|
||||
@@ -205,7 +212,7 @@ describe('search stat', function()
|
||||
Mainmainmainmmmain{10:^mAin} |
|
||||
|
|
||||
{1:~ }|*7
|
||||
/mAin [1/1] |
|
||||
/mAin W [1/1] |
|
||||
]])
|
||||
end)
|
||||
end)
|
||||
|
||||
Reference in New Issue
Block a user