On Fr, 19 Sep 2014, Christian Brabandt wrote:
> On Fr, 19 Sep 2014, Bram Moolenaar wrote:
>
> >
> > Nazri Ramliy wrote:
> >
> > > Attached is a patch that adds a failing test that should show the
> > > buggy behavior on the following text:
> > >
> > > -- 8< --
> > > +REMOVE: This text must not be deleted
> > > +REMOVE: aaaaaaa...repeat until linebreak kicks in...aaaaaaaaaaa....
> > > +-- >8 --
> > >
> > > With linebreak set and doing a character-wise visual selection on both
> > > the "REMOVE: " characters (including the single whitespaces) will
> > > select more than both of the "REMOVE: " characters.
> >
> > The test writes the ".ok" file, that's not the right way to do this.
> >
> > Christian, did you already look into fixing this?
>
> No, I thought this was just about a missing test. I'll look into it next
> week.
This is ... complicated.
Here is a visual representation of what happens:
,-----------------,
| 1 BAR: xxxx |
| 2 BAR: |
| xxxxxxxxxxxxx |
`----------------´
(now visually block-select the BAR: (including the following
whitespace). You'll notice, that the visual selection extends till the
end of the window.
The problem is, when linebreak is set, win_lbr_chartabsize() will select
the complete whitespace until the end of the screen line, this is, so
that the linebreak feature works and the rest of the text is drawn on
the next line (and also moving around works as expected).
I have no idea how to fix it. I played around in function win_update()
where wp->w_old_cursor_lcol is set, but this has obviously problems when
moving around with the cursor.
Best,
Christian
--
Wie man sein Kind nicht nennen sollte:
Klaas Nost