Saturday, October 8, 2016

Weird behaviour with the 'gN' command

Hi,

I am facing a very strange behaviour with the 'gN' command...
It's quite difficult to describe, so let me explain how to reproduce it instead....
First, enter the following text in Vim:
test test test test
test test test test
test test test test
test
test test test

Put the cursor on the first character of the first line and search for 'test\ntest' (with '/').
Then, select the current match with the 'gN' command. It should work as expected.
Get back to normal mode and hit 'n' to go to the next occurence of the searched pattern, hit 'gN' again, everything should still just work as expected.
Get back to normal mode and hit 'n' again. Now, when you hit 'gN' Vim selects the previous match, not the current one...

Notes:
I have reproduced this with vim 7.4.576 (on Debian Jessie) and with 8.0.3 (on Debian Stretch). I have in both cases launched Vim with the -N -u NONE options.

++
Osman

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment