mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
vim-patch:8.1.1350: "W" for wrapping not shown when more than 99 matches
Problem: "W" for wrapping not shown when more than 99 matches.
Solution: Adjust check for length. (Masato Nishihata, closes vim/vim#4388)
dc6855af97
This commit is contained in:
parent
68202520c6
commit
2d567ac47e
@ -4286,7 +4286,7 @@ static void search_stat(int dirc, pos_T *pos,
|
|||||||
}
|
}
|
||||||
|
|
||||||
len = STRLEN(t);
|
len = STRLEN(t);
|
||||||
if (show_top_bot_msg && len + 3 < SEARCH_STAT_BUF_LEN) {
|
if (show_top_bot_msg && len + 2 < SEARCH_STAT_BUF_LEN) {
|
||||||
STRCPY(t + len, " W");
|
STRCPY(t + len, " W");
|
||||||
len += 2;
|
len += 2;
|
||||||
}
|
}
|
||||||
|
@ -40,12 +40,20 @@ func! Test_search_stat()
|
|||||||
let g:a = execute(':unsilent :norm! n')
|
let g:a = execute(':unsilent :norm! n')
|
||||||
let stat = '\[>99/>99\]'
|
let stat = '\[>99/>99\]'
|
||||||
call assert_match(pat .. stat, g:a)
|
call assert_match(pat .. stat, g:a)
|
||||||
|
call cursor(line('$'), 1)
|
||||||
|
let g:a = execute(':unsilent :norm! n')
|
||||||
|
let stat = '\[1/>99\] W'
|
||||||
|
call assert_match(pat .. stat, g:a)
|
||||||
|
|
||||||
" 5) Many matches
|
" 5) Many matches
|
||||||
call cursor(1, 1)
|
call cursor(1, 1)
|
||||||
let g:a = execute(':unsilent :norm! n')
|
let g:a = execute(':unsilent :norm! n')
|
||||||
let stat = '\[2/>99\]'
|
let stat = '\[2/>99\]'
|
||||||
call assert_match(pat .. stat, g:a)
|
call assert_match(pat .. stat, g:a)
|
||||||
|
call cursor(1, 1)
|
||||||
|
let g:a = execute(':unsilent :norm! N')
|
||||||
|
let stat = '\[>99/>99\] W'
|
||||||
|
call assert_match(pat .. stat, g:a)
|
||||||
|
|
||||||
" 6) right-left
|
" 6) right-left
|
||||||
if exists("+rightleft")
|
if exists("+rightleft")
|
||||||
|
Loading…
Reference in New Issue
Block a user