diff options
author | Bram Moolenaar <Bram@vim.org> | 2015-12-31 22:27:55 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2015-12-31 22:27:55 +0100 |
commit | c21d67e33c1b42a492e04788cbb14a23a6724e39 (patch) | |
tree | 2e6d28f98e82d2217f4a7582d9856b9285b2c0ef /src | |
parent | 06b0734d9cd2f39d4c12c7fd89a100eadbe5be78 (diff) |
patch 7.4.1015v7.4.1015
Problem: The column is not restored properly when the matchparen plugin is
used in Insert mode and the cursor is after the end of the line.
Solution: Set the curswant flag. (Christian Brabandt). Also fix
highlighting the match of the character before the cursor.
Diffstat (limited to 'src')
-rw-r--r-- | src/eval.c | 9 | ||||
-rw-r--r-- | src/version.c | 2 |
2 files changed, 10 insertions, 1 deletions
diff --git a/src/eval.c b/src/eval.c index 8b972dfe78..1abb62059c 100644 --- a/src/eval.c +++ b/src/eval.c @@ -10183,6 +10183,7 @@ f_cursor(argvars, rettv) #ifdef FEAT_VIRTUALEDIT long coladd = 0; #endif + int set_curswant = TRUE; rettv->vval.v_number = -1; if (argvars[1].v_type == VAR_UNKNOWN) @@ -10198,7 +10199,10 @@ f_cursor(argvars, rettv) coladd = pos.coladd; #endif if (curswant >= 0) + { curwin->w_curswant = curswant - 1; + set_curswant = FALSE; + } } else { @@ -10231,7 +10235,7 @@ f_cursor(argvars, rettv) mb_adjust_cursor(); #endif - curwin->w_set_curswant = TRUE; + curwin->w_set_curswant = set_curswant; rettv->vval.v_number = 0; } @@ -17524,7 +17528,10 @@ f_setpos(argvars, rettv) { curwin->w_cursor = pos; if (curswant >= 0) + { curwin->w_curswant = curswant - 1; + curwin->w_set_curswant = FALSE; + } check_cursor(); rettv->vval.v_number = 0; } diff --git a/src/version.c b/src/version.c index 699a7f6cb3..1e9dabd6b3 100644 --- a/src/version.c +++ b/src/version.c @@ -742,6 +742,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 1015, +/**/ 1014, /**/ 1013, |