rkitover/vimpager

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

mralusw opened this issue · 3 comments

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.

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

ls.txt

I can reproduce this.

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.