Bug with rnu and linebreak

84 views
Skip to first unread message

Nazri Ramliy

unread,
Nov 24, 2014, 8:58:29 PM11/24/14
to vim_dev
Here's how to reproduce in a 120 columns, 69 rows terminal:

foo.txt:
--8<--
............ := []......{
...........(

`{"hello":".................................","......":{"......":{":.....":"............................",":.........":"..",":....":"....","........":.,"....":{":.....":"...................",":.........":"..",":....":"....","........":.,"............":"...................","..":.,"....":"...
...."},"..":.,".......":"...... ...
......","..":{":.........":".."}}},".......":"..."}`,
.........(),
...........(),
...........(),
),
}

if !............(".......", ., ............, ...........) {
.......("....... .... ... ... ......")
}
if !............("........", ., ............., ............) {
.......("........ .... ... ... ......")
}
-->8--

vi -u NONE -c 'set nocp rnu linebreak' foo.txt

Line 3 is redrawn with 'nolinebreak' when doing either of these two:
- Go to line 10, then do y5j
- Visual-line-select lines 10 to 15, hit y

nazri

Christian Brabandt

unread,
Nov 25, 2014, 1:33:09 AM11/25/14
to vim...@googlegroups.com
Isn't that the same bug, you reported last week at
https://groups.google.com/d/msg/vim_dev/qORtSGBSnkc/o3pMwJ1Z1A4J
(Bug 2)?

Best,
Christian

Nazri Ramliy

unread,
Nov 25, 2014, 7:22:05 AM11/25/14
to vim_dev
No I don't think it's the same bug since this bug is still
reproducible after applying the two patches that you submitted for
fixing Bug 1 and Bug 2 that I reported last week.

nazri

Christian Brabandt

unread,
Nov 25, 2014, 4:14:02 PM11/25/14
to vim_dev
Hi Nazri!
You are a good tester ;)

That bug you reported actually is the same, just that the mentioned
patch does not fix it for your situation. (since I forgot to reset the
linebreak for the couple of times, where the screen is redrawn. That
should be fixed with this patch).

Here is an update. Please test with that patch (should apply cleanly on
top of master).

Bram, this patch replaces the one I created earlier in:
https://groups.google.com/forum/#!msg/vim_dev/kv5kg0fZxRQ/1grx0E-XlIUJ

Best,
Christian
--
Eine schöne Frau gefällt den Augen, eine gute dem Herzen, die eine ist
ein Kleinod, die andere ein Schatz.
-- Napoleon I. Bonaparte
linebreak_bug.diff

Nazri Ramliy

unread,
Nov 26, 2014, 2:17:06 AM11/26/14
to vim_dev
On Wed, Nov 26, 2014 at 5:13 AM, Christian Brabandt <cbl...@256bit.org> wrote:
> That bug you reported actually is the same, just that the mentioned
> patch does not fix it for your situation. (since I forgot to reset the
> linebreak for the couple of times, where the screen is redrawn. That
> should be fixed with this patch).
>
> Here is an update. Please test with that patch (should apply cleanly on
> top of master).

Tested, with this result:

>> Line 3 is redrawn with 'nolinebreak' when doing either of these two:
>> - Go to line 10, then do y5j
Still buggy.

>> - Visual-line-select lines 10 to 15, hit y
Bug fixed.

Just to be sure that I applied your patch on top of the latest vim:

~/code/vim
$ hg log --limit 1
changeset: 6393:661e95466448
tag: tip
user: Bram Moolenaar <br...@vim.org>
date: Sun Nov 23 15:57:49 2014 +0100
summary: Added tag v7-4-527 for changeset 2bb019eb60ca

~/code/vim
$ md5sum src/normal.c
dbde3ee4100f800b865e278ef81d6d99 src/normal.c

:ver
VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Nov 26 2014 15:11:20)
Included patches: 1-527

nazri

Christian Brabandt

unread,
Nov 26, 2014, 2:36:21 AM11/26/14
to vim...@googlegroups.com, Nazri Ramliy
Am 2014-11-26 08:17, schrieb Nazri Ramliy:
> On Wed, Nov 26, 2014 at 5:13 AM, Christian Brabandt
> <cbl...@256bit.org> wrote:
>> That bug you reported actually is the same, just that the mentioned
>> patch does not fix it for your situation. (since I forgot to reset the
>> linebreak for the couple of times, where the screen is redrawn. That
>> should be fixed with this patch).
>>
>> Here is an update. Please test with that patch (should apply cleanly
>> on
>> top of master).
>
> Tested, with this result:
>
>>> Line 3 is redrawn with 'nolinebreak' when doing either of these two:
>>> - Go to line 10, then do y5j
> Still buggy.
>
>>> - Visual-line-select lines 10 to 15, hit y
> Bug fixed.

Sorry, I missed one part. Please check again.

Thanks.

Best,
Christian
linebreak_bug.diff

Nazri Ramliy

unread,
Nov 26, 2014, 9:12:30 AM11/26/14
to Christian Brabandt, vim_dev
On Wed, Nov 26, 2014 at 3:36 PM, Christian Brabandt <cbl...@256bit.org> wrote:
> Sorry, I missed one part. Please check again.

Looks good :)

Thanks for looking into this.

nazri.

Bram Moolenaar

unread,
Nov 27, 2014, 7:26:32 AM11/27/14
to Christian Brabandt, vim_dev

Christian wrote:

> Hi Nazri!
>
> On Di, 25 Nov 2014, Nazri Ramliy wrote:
>
> > On Tue, Nov 25, 2014 at 2:33 PM, Christian Brabandt <cbl...@256bit.org> wrote:
> > > Am 2014-11-25 02:58, schrieb Nazri Ramliy:
> > > Isn't that the same bug, you reported last week at
> > > https://groups.google.com/d/msg/vim_dev/qORtSGBSnkc/o3pMwJ1Z1A4J
> > > (Bug 2)?
> >
> > No I don't think it's the same bug since this bug is still
> > reproducible after applying the two patches that you submitted for
> > fixing Bug 1 and Bug 2 that I reported last week.
>
> You are a good tester ;)
>
> That bug you reported actually is the same, just that the mentioned
> patch does not fix it for your situation. (since I forgot to reset the
> linebreak for the couple of times, where the screen is redrawn. That
> should be fixed with this patch).
>
> Here is an update. Please test with that patch (should apply cleanly on
> top of master).
>
> Bram, this patch replaces the one I created earlier in:
> https://groups.google.com/forum/#!msg/vim_dev/kv5kg0fZxRQ/1grx0E-XlIUJ

OK, I'll add a note on the todo item.

--
An SQL statement walks into a bar. He approaches two tables
and says, "Mind if I join you?"

/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
Reply all
Reply to author
Forward
0 new messages