Bug#774492: [vim] "c{motion}" temporary cancels 'linebreak' option for current line

Dmitry Alexandrov 321942 at gmail.com
Sat Jan 3 11:39:26 UTC 2015


Package: vim
Version: 2:7.4.488-3
Severity: normal

When the 'linebreak' option (visually break long lines at spaces only 
rather than at a middle of a word) is set "c{motion}" command (but not 
"d" or "x" or "i") cause current real line to be re-flowed like as the 
'linebreak' is not set.

This affects both GVim and terminal Vim with the minimal configuration 
('number' for the sake of demonstration):

   $ vim -u NONE -U NONE -N '+set linebreak' '+set number'

Suppose a buffer is 70-character-wide and looks like:

   1 “Free software” means software that respects users' freedom and
     community. Roughly, it means that the users have the freedom to
     run, copy, distribute, study, change and improve the software.
     Thus, “free software” is a matter of liberty, not price. To
     understand the concept, you should think of “free” as in “free
     speech,” not as in “free beer”.

Now if I press "c" and some motion in any cursor position (for example, 
"cl" in 1,1) buffer would look like:

   1 Free software” means software that respects users' freedom and commu
     nity. Roughly, it means that the users have the freedom to run, copy
     , distribute, study, change and improve the software. Thus, “free so
     ftware” is a matter of liberty, not price. To understand the concept
     , you should think of “free” as in “free speech,” not as in “free be
     er”.

When I leave the insert mode and continue edition, as the buffer is 
redrawn, it returns to the proper look until the next "c{motion}".

I’ve tested other Vim versions available at snapshots.debian.org [0]: 
the first problematic is 7.4.481-1, so the last unaffected is 7.4.430-1.

[0]: http://snapshot.debian.org/binary/vim/

--- System information. ---
Architecture: amd64
Kernel:       Linux 3.2.0-4-amd64

Debian Release: 8.0
   500 trusty          ppa.launchpad.net
   500 testing         www.deb-multimedia.org
   500 testing         security.debian.org
   500 stable          deb.i2p2.no
   500 oneiric         ppa.launchpad.net
  1995 oneiric         ppa.launchpad.net
    10 unstable        snapshot.debian.org

--- Package information. ---
Depends               (Version) | Installed
===============================-+-================
vim-common      (= 2:7.4.430-1) | 2:7.4.488-3
vim-runtime     (= 2:7.4.430-1) | 2:7.4.488-3
libacl1           (>= 2.2.51-8) | 2.2.52-2
libc6                 (>= 2.15) |
libgpm2             (>= 1.20.4) |
libselinux1           (>= 1.32) |
libtinfo5                       |


Package's Recommends field is empty.

Suggests         (Version) | Installed
==========================-+-===========
ctags                      |
vim-doc                    | 2:7.4.488-3
vim-scripts                | 20130814



--- Output from package bug script ---

--- real paths of main Vim binaries ---
/usr/bin/vi is /usr/bin/vim.gtk
/usr/bin/vim is /usr/bin/vim.gtk
/usr/bin/gvim is /usr/bin/vim.gtk



More information about the pkg-vim-maintainers mailing list