Dominique, On Fr, 07 Nov 2014, Christian Brabandt wrote:
> On Do, 06 Nov 2014, Dominique Pellé wrote:
> > Valgrind detects a bug in Vim-7.4.507 when doing:
> >
> > $ valgrind vim -c ':setfiletype c' -c 'call feedkeys("i// foo\<CR>\<Esc>")'
>
> While I do not see that error with valgrind, I noticed that the cursor
> now moved too much in the other direction. I'll check the patch later
> when I am on the bus (I'll have much time later on the bus because of
> the railway strike these days in Germany).
Could you please check this patch?
Thanks.
Best,
Christian
--
Wer zuerst im Bilde auf seinen Horizont die Zielpunkte des
mannigfaltigen Spiels waagrechter Linien bannte, erfand das Prinzip
der Perspektive.
-- Goethe, Maximen und Reflektionen, Nr. 1131
--
--
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.
diff --git a/src/edit.c b/src/edit.c
--- a/src/edit.c
+++ b/src/edit.c
@@ -6918,6 +6918,8 @@ stop_insert(end_insert_pos, esc, nomove)
curwin->w_cursor = tpos;
else
{
+ /* reset tpos, could have been invalidated in the loop above */
+ tpos = curwin->w_cursor;
tpos.col++;
if (cc != NUL && gchar_pos(&tpos) == NUL)
++curwin->w_cursor.col; /* put cursor back on the NUL */