odeke-em / vim

Automatically exported from code.google.com/p/vim
0 stars 0 forks source link

word wrapping messed up when entering Insert mode with 'c' or 's' #312

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. set linebreak
2. Fill the line with words until it wraps, make sure that the first character 
in the wrapped word could still fit on the previous line.
3. Move to anywhere on (one of) the continuation lines.
4. Press 's' to enter Insert mode.

What is the expected output? What do you see instead?
Expected: line breaking prior to the cursor location does not change; word 
wrapping remains legible.
Actual: line breaks before the cursor are recomputed, and do not honor word 
boundaries any more.

What version of the product are you using? On what operating system?
Vim 7.4.473 on Ubuntu Linux.
For context, vim 7.4.52 on Mint Linux does not have this problem.

Please provide any additional information below.

* When entering Insert mode the cursor seems to move with the text, i.e. keep 
its location relative to the insert point.
* After quitting Insert mode (Esc) the lines of text remain the same, but the 
cursor seems to move to the screen location where it would supposedly have been 
had the text layout not changed.
* Outside of Insert mode, hitting Ctrl-L would cause the paragraph to rearrange 
correctly. The cursor would align with the text that has just been edited.
* This happens in both Vim and Gvim in the exact same way, so not a terminal 
issue.
* Happens regardless of the value of showbreak.
* This may be related to the breakindent feature, which is present in my buggy 
version (7.4.473) but not the good version (7.4.52).

Attaching screenshots before clicking 's', after clicking it, after pressing 
Esc to quit Insert mode, and after pressing Ctrl-L to rearrange the paragraph.

Original issue reported on code.google.com by gilad.ar...@gmail.com on 9 Jan 2015 at 7:13

Attachments:

GoogleCodeExporter commented 9 years ago
> Vim 7.4.473

IIRC correctly there have been fixes in this regard lately.
Can you try the current version / hg tip?

Original comment by dhahler@gmail.com on 9 Jan 2015 at 11:01

GoogleCodeExporter commented 9 years ago
Please check the patches provided and report back whether they work. Find the 
patches here: https://groups.google.com/d/msg/vim_dev/Bh0Nd321JYE/be9Cfu9DLmcJ
(I think, you only need the second patch, but please test and report back).

Original comment by chrisbr...@googlemail.com on 10 Jan 2015 at 12:09

GoogleCodeExporter commented 9 years ago
Fixed by 7.4.576 
https://code.google.com/p/vim/source/detail?r=749fc929da45d07efc5352dd8a0c00f8ed
9f2163
closing

Original comment by chrisbr...@googlemail.com on 14 Jan 2015 at 6:41

GoogleCodeExporter commented 9 years ago
Verified with 7.4.580, problem is gone. Thanks!

Original comment by gilad.ar...@gmail.com on 15 Jan 2015 at 10:03