Run Vim like this:
vim -N -u NONE -c 'set virtualedit=all'
Enter the following text:
<tabulation>1
See how cursor position relative to tabulation affects placement of incremented/decremented number:
" "|" designates cursor position
| 1
" <ctrl-x> gives this (OK)
| 0
" moving cursor to the right before pressing <ctrl-x> moves number (not OK)
| -1
| -2
| -3
" etc.
Virtual space seems to be counted as if it was a real character.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, .![]()
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.![]()
—
You are receiving this because you are subscribed to this thread.
—
You are receiving this because you are subscribed to this thread.
2016-8-2(Tue) 0:21:40 UTC+9 Bram Moolenaar:
> Hirohito Higashi wrote:
>
> [...]
>
> > > this almost works, except that after incrementing/decrementing ml_get()
> > > still returns the wrong line. I don't know why yet.
> > >
> > > On the other hand, one could argue, that the number shouldn't be
> > > incremented/decremented at all if the cursor is actually not on a
> > > number, so you could even consider the successful increment to be a bug.
> >
> > ChrisB>
> > Your patch is a good hint for me. Thanks!
> >
> > I wrote a patch with a test.
> > Please check and include this.
>
> Thanks!
This issue is in the todo list yet.
> Patch to fix increment/decrement not working properly when 'virtualedit' is
> set. (Hirohito Higashi, 2016 Aug 1, #923)
You said "Thanks!" a year and a half ago.
Perhaps you forgot to include my patch? :-)
I attached the updated patch.
Thank you for your consideration.
--
Best regards,
Hirohito Higashi (h_east)
Was this fixed? There is mention of a fix, thus I suspect it was fixed.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.![]()
Just checked on Vim 8.2.909, the bug is still there. I guess the patch wasn't applied.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.![]()
The patch is here: https://groups.google.com/d/msg/vim_dev/eCtwsQw0f7I/Of_20pacBgAJ
Can you try to apply it and see if this works? It also contains a test to fix this.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.![]()
It doesn't work and the test fails. Here is the patch updated to cleanly apply on 2d4070d: fix_increment_with_virtualedit_updated.txt (github doesn't like .patch extension...).
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.![]()
fix_increment_with_virtualedit_updated.txt (github doesn't like .patch extension...).
That file contains ANSI escape sequences and I could not apply it. I have a suspicion, that the problem is the #ifdef FEAT_VIRTUALEDIT. That feature has been graduated to be always included as of 8.1.826, so I suspect the patch is actually not really included.
I'll applied it locally, and the test seems to pass and also the original bug report at the top also seems to be fixed. Please check, PR coming in just a minute. I also notice the help mentions, not available when compiled without the |+virtualedit| feature, so I also updated the help documents slightly.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.![]()
Sorry, I don't know why git uses external diff even when output is redirected. I tested your branch and can confirm that it fixes the issue and the new test passes.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.![]()
Sorry, I don't know why git uses external diff even
you might need --no-ext-diff argument for git.
thanks for confirming it works.! 👍
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.![]()
you might need
--no-ext-diffargument for git.
I need it to stop using external diff with redirection precisely because I forget about adding --no-ext-diff :)
Thanks for the fix.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.![]()
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.![]()
Since the issue was fixed, then this todo item is no longer relevant:
As for the question:
Was this fixed?
Yes, it was. I can't reproduce on master.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.![]()