On Do, 19 Mär 2015, Christian Brabandt wrote:
> Hi Nazri!
>
> On Fr, 13 Mär 2015, Nazri Ramliy wrote:
>
> > On Fri, Mar 13, 2015 at 3:58 AM, Christian Brabandt <[email protected]>
> > wrote:
> > > Also further testing shows, this seems only to happen, as long as the
> > > number column is smaller than the showbreak chars. I can't explain that.
> >
> > I think it happens if the following conditions are true:
> >
> > 1. The line is long such that it fills the whole screen when wrapped
> > 2. The number column is visible either via 'nu' or 'rnu'
> > 3. 'showbreak' is set
> >
> > The number of "off by one" count depends on the number of characters
> > set in 'showbreak' - if showbreak is set to 'x' then we'll see one
> > character wrongly draw to the right of the cursor after going to the
> > end of the line by doing $.
> >
> > The following demonstrates this:
> >
> > $ echo $LINES $COLUMNS
> > 69 120
> >
> > $ for i in `seq 1 $LINES`; do for j in `seq 1 $(($COLUMNS - 2))`; do
> > if [ $i -eq $LINES -a $j -eq $((COLUMNS - 2)) ]; then break; fi; echo
> > -n a; done;done > a.txt
> >
> > $ vim -u NONE a.txt
> > Now everything is okay - and we can see that the whole 'aaa...' line
> > almost fill the screen.
> >
> > Now go to the last character by hitting $.
> >
> > set nu
> > " The line number 1 is drawn in the first row and the text shifted to
> > the right by 9 characters,
> > " and the cursor is still shown to be at the last character.
> >
> > set showbreak=x
> > " Now we see the problem - notice that the cursor looks like it's one
> > character off to the left of the last one
> >
> > set showbreak=xx
> > " Cursor looks like it's two character to the left of the last one
> >
> > When doing 'rb' (replace currect character with b) we'll see that the
> > last character is changed to b (it's not where the cursor is).
> >
> > I hope this helps you on your quest to fix this bug :)
>
> I think I found a patch, but need to verify more closely and try to add
> a test. (I found and fixed the numberwidth problem while trying to fix
> this). So will post a patch later this week.
I thought I fixed that one, but the test case I created still does not
work and I am running out of ideas currently. So I have to leave that
aside for now.
Best,
Christian
--
Für ein paar Groschen kann man viel Freundlichkeit und guten Willen
kaufen.
-- Johann Peter Hebel
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.