Skip to content

Commit f068dca

Browse files
committed
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.
1 parent 4d8747c commit f068dca

2 files changed

Lines changed: 7 additions & 0 deletions

File tree

src/edit.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1611,7 +1611,12 @@ ins_redraw(
16111611
# endif
16121612
# ifdef FEAT_AUTOCMD
16131613
if (has_cursormovedI())
1614+
{
1615+
/* Make sure curswant is correct, an autocommand may call
1616+
* getcurpos(). */
1617+
update_curswant();
16141618
apply_autocmds(EVENT_CURSORMOVEDI, NULL, NULL, FALSE, curbuf);
1619+
}
16151620
# endif
16161621
# ifdef FEAT_CONCEAL
16171622
if (curwin->w_p_cole > 0)

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -747,6 +747,8 @@ static char *(features[]) =
747747

748748
static int included_patches[] =
749749
{ /* Add new patch number below this line */
750+
/**/
751+
1296,
750752
/**/
751753
1295,
752754
/**/

0 commit comments

Comments
 (0)