diff options
author | KillTheMule <KillTheMule@users.noreply.github.com> | 2016-04-17 19:34:36 +0200 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2016-04-27 21:44:13 -0400 |
commit | 61e25f995c3434a159f0009d5066d284ff8aa816 (patch) | |
tree | b281351919be22c07c34a082caacfa5bb8e99aa7 /src/nvim/edit.c | |
parent | 2d5520fb256b281e7e32cb48f106e205fc494d76 (diff) | |
download | rneovim-61e25f995c3434a159f0009d5066d284ff8aa816.tar.gz rneovim-61e25f995c3434a159f0009d5066d284ff8aa816.tar.bz2 rneovim-61e25f995c3434a159f0009d5066d284ff8aa816.zip |
vim-patch:7.4.1296
Problem: Cursor changes column with up motion when the matchparen plugin
saves and restores the cursor position. (Martin Kunev)
Solution: Make sure curswant is updated before invoking the autocommand.
https://github.com/vim/vim/commit/f068dcafcfe0c8018e5a559c50769ca1364bd9a5
Applied manually.
Could reproduce the bug with vim/vim@4d8747c but not with vim/vim@2693ca2,
so it must have appeared inbetween. For discussion, see
https://groups.google.com/forum/#!msg/vim_dev/t2sdeFhkybs/WEtLJpCODQAJ
http://vim.1045645.n5.nabble.com/Cursor-behaviour-change-td5726895.html
Could not reproduce with current nvim master.
Diffstat (limited to 'src/nvim/edit.c')
-rw-r--r-- | src/nvim/edit.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/nvim/edit.c b/src/nvim/edit.c index 005c569561..26966b35c1 100644 --- a/src/nvim/edit.c +++ b/src/nvim/edit.c @@ -1359,6 +1359,9 @@ ins_redraw ( update_screen(0); } if (has_event(EVENT_CURSORMOVEDI)) { + // Make sure curswant is correct, an autocommand may call + // getcurpos() + update_curswant(); apply_autocmds(EVENT_CURSORMOVEDI, NULL, NULL, false, curbuf); } if (curwin->w_p_cole > 0) { |