Issue 88 in vim: fn; jumps to top of document

38 views
Skip to first unread message

v...@googlecode.com

unread,
Oct 22, 2012, 10:56:56 AM10/22/12
to vim...@vim.org
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 88 by j.kenton...@gmail.com: fn; jumps to top of document
http://code.google.com/p/vim/issues/detail?id=88

What steps will reproduce the problem?
1. Open a text file with more than one line
2. Move the cursor to a line with more than one 'n' character
3. push fn;

What is the expected output? What do you see instead?

The cursor should be at the second 'n' character. Instead, the screen
blinks and the cursor jumps to the top of the document.

What version of the product are you using? On what operating system?

I'm using vim 7.3.709 on Arch Linux

Please provide any additional information below.

Issue appears first with 7.3.704


Ben Fritz

unread,
Oct 22, 2012, 12:43:26 PM10/22/12
to vim...@googlegroups.com, vim...@vim.org, codesite...@google.com, v...@googlecode.com
I verify this issue on Windows XP gvim 7.3.709. Vim additionally beeps when pressing ;. Indeed any other movement command like l or n shows similar behavior. After the initial fn, Vim seems to be waiting for further input, as if in operator-pending mode or something. My cursor goes from a full black box to a half-height black box.

This is the second issue reported due to recent patches which takes effect only for the specific character 'n' or 'N'.

Looking at patch 704, I notice that while the first bit of code added is within a check that the first character if a command is 'g', the second bit of code does not. Since patch 704 is supposed to fix the gn and gN commands only, this is suspect to me.

In other words, does the second bit of code added in patch 704, at line 1089 of normal.c, need to also check that ca.cmdchar == 'g'?

Charles Campbell

unread,
Oct 22, 2012, 12:51:15 PM10/22/12
to vim...@googlegroups.com
I can verify that this problem also occurs with Scientific-Linux7.1-709 .

Regards,
Chip Campbell

Ben Fritz

unread,
Oct 22, 2012, 1:00:27 PM10/22/12
to vim...@googlegroups.com, charles.e...@nasa.gov
On Monday, October 22, 2012 11:51:21 AM UTC-5, Charles Campbell wrote:
> v...@googlecode.com wrote:
>
>
> > What steps will reproduce the problem?
> > 1. Open a text file with more than one line
> > 2. Move the cursor to a line with more than one 'n' character
> > 3. push fn;
> >
> > What is the expected output? What do you see instead?
> >
> > The cursor should be at the second 'n' character. Instead, the screen
> > blinks and the cursor jumps to the top of the document.
> >
> > What version of the product are you using? On what operating system?
> >
> > I'm using vim 7.3.709 on Arch Linux
> >
> > Issue appears first with 7.3.704
> >
>
> I can verify that this problem also occurs with Scientific-Linux7.1-709 .
>

Interestingly enough, if instead of using "fn", I use ":normal! fn", the cursor movement works as expected without error. But adding a ';' to the normal command beeps and fails.

I.e. with the cursor at the beginning of the following line:

My new neighbor, Negative Nancy, is not very nice.

Pressing fn; will beep and move the cursor at the beginning of the line, as will typing :normal! fn; and hitting <Enter>. But doing :normal fn followed by ; will move the cursor to the start of the word "neighbor".

Ben Fritz

unread,
Oct 22, 2012, 1:05:21 PM10/22/12
to vim...@googlegroups.com, vim...@vim.org, codesite...@google.com, v...@googlecode.com
On Monday, October 22, 2012 11:43:27 AM UTC-5, Ben Fritz wrote:
>
> This is the second issue reported due to recent patches which takes effect only for the specific character 'n' or 'N'.
>

The first being when trying to do rn or rN, as reported here:

https://groups.google.com/d/topic/vim_dev/lk3haSrg8cY/discussion

Charles Campbell

unread,
Oct 22, 2012, 3:22:03 PM10/22/12
to vim...@googlegroups.com
Also,

dtn

doesn't work.

Regards,
C Campbell

v...@googlecode.com

unread,
Oct 22, 2012, 11:09:49 PM10/22/12
to vim...@vim.org
Updates:
Status: Fixed

Comment #1 on issue 88 by brammool...@gmail.com: fn; jumps to top of
document
http://code.google.com/p/vim/issues/detail?id=88

Patch 7.3.710 fixes this.

Reply all
Reply to author
Forward
0 new messages