rkitover / vimpager

Use Vim as PAGER
http://www.vim.org/scripts/script.php?script_id=1723
Other
774 stars 72 forks source link

search gets stuck (must move cursor manually for 'n' to work) #258

Open mralusw opened 3 years ago

mralusw commented 3 years ago
MANPAGER=vimpager man ls
# type '/list' to start search, than 'n' a couple of times

I think it's because the pager tries to be too smart about placing the cursor, instead of putting it exactly on the search occurrence (or at least the exact line). In my case, the cursor starts off about 5 lines from the bottom (which is not a search occurrence), and stays there no matter how many times I press n. If I scroll manually (down arrow), the search starts moving again.

In any case, placing the cursor anywhere else but on the search occurrence makes searching frequent patterns kind of difficult, as there is no visual feedback when pressing n.

mralusw commented 3 years ago

Attaching offending file. Also, this is Debian vim 2:8.1.0875-5 amd64, and the terminal is rows 34; columns 131

ls.txt

rkitover commented 3 years ago

I can reproduce this.

rkitover commented 3 years ago

It's been many years since I worked on the vimscript for this, and a lot of it is from the original less.vim, it's going to take me a while to figure this one out, but I'll try.