Bug#642432: vim 'C' command on empty last line inserts on previous line instead.

September 22nd, 2011 - 11:50 am ET by Michael ODonnell | Report spam
Package: vim
Severity: normal

Dear Maintainer,

To reproduce:

- Create or edit a multi-line file with a last line that's empty.
- Position cursor on that empty last line.
- Note that the 'C' command erroneously deletes the current line and
instead changes to insert mode at the beginning of the previous line.

I have two systems (x86 and an x86_64) that exhibit this
problem, both being fairly standard, very current Debian
systems. When Vim starts up it announces the following:

VIM - Vi IMproved
version 7.3.280
by Bram Moolenaar et al.
Modified by pkg-vim-maintainers@lists.alioth.debian.org

...and the Vim packages I have onboard are:

ii vim-common 2:7.3.280-1 Vi IMproved - Common files
ii vim-doc 2:7.3.280-1 Vi IMproved - HTML documentation
ii vim-full 2:7.2.130-1 Vi IMproved - enhanced vi editor (transitional package)
ii vim-gnome 2:7.3.280-1 Vi IMproved - enhanced vi editor - with GNOME2 GUI
ii vim-gtk 2:7.3.280-1 Vi IMproved - enhanced vi editor - with GTK2 GUI
ii vim-gui-common 2:7.3.280-1 Vi IMproved - Common GUI files
ii vim-python 2:7.2.130-1 Vi IMproved - enhanced vi editor (transitional package)
ii vim-runtime 2:7.3.280-1 Vi IMproved - Runtime files
ii vim-scripts 20110813 plugins for vim, adding bells and whistles
ii vim-tiny 2:7.3.280-1 Vi IMproved - enhanced vi editor - compact version

Note that on another, older Debian machine with Vim version 7.2.445
and also on a very current Ubuntu system the 'C' command works as expected.

I have tried this:

- with and without "finish" (unquoted) in my ~/.vimrc and ~/.exrc

- with and without a ~/.vimrc and an ~/.exrc present

- with and without a ~/.vim directory in my home dir.

- with and without the -u NONE trick. (also -u /dev/null)

- after deleting /usr/share/vim*

- logged in as root and also as various non-root users

- executing the full-blown version and also vim.tiny

- in an xterm spawned by a local X session, on the console
/dev/tty1 and while connected remotely via SSH

...but can always trivially reproduce the problem, so I'm
wondering if this is maybe specific to the Debian version...?



Debian Release: wheezy/sid
APT prefers testing
APT policy: (990, 'testing'), (500, 'unstable')
Architecture: i386 (i686)

Kernel: Linux 3.0.0 (SMP w/2 CPU cores)
Locale: LANG=en_US, LC_CTYPE=en_US (charmap=ISO-8859-1)
Shell: /bin/sh linked to /bin/bash



To UNSUBSCRIBE, email to debian-bugs-dist-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
email Follow the discussionReplies 1 replyReplies Make a reply

Replies

#1 James Vega
September 22nd, 2011 - 09:10 pm ET | Report spam

tag 642432 confirmed fixed-upstream
thanks

On Thu, Sep 22, 2011 at 11:42:16AM -0400, Michael O'Donnell wrote:
To reproduce:

- Create or edit a multi-line file with a last line that's empty.
- Position cursor on that empty last line.
- Note that the 'C' command erroneously deletes the current line and
instead changes to insert mode at the beginning of the previous line.



Thanks for the report! I've sent a patch upstream, which will be
available in the next upload.

James
GPG Key: 1024D/61326D40 2003-09-02 James Vega






To UNSUBSCRIBE, email to
with a subject of "unsubscribe". Trouble? Contact

Similar topics