diff options
author | Bram Moolenaar <bram@vim.org> | 2013-01-17 18:34:05 +0100 |
---|---|---|
committer | Bram Moolenaar <bram@vim.org> | 2013-01-17 18:34:05 +0100 |
commit | 4f8cfe5bd83c3966867b904eb357f8e33a1042b0 (patch) | |
tree | 53271f503c8611c6ec464ad2d6bc2aeba34c40af | |
parent | 971ef66de0d1b8616db2e0a40ab86253f62deb36 (diff) | |
download | vim-4f8cfe5bd83c3966867b904eb357f8e33a1042b0.tar.gz |
Problem: Cursor is at the wrong location and below the end of the file
after doing substitutions with confirm flag: %s/x/y/c
(Dominique Pelle)
Solution: Update the cursor position. (Christian Brabandt & Dominique)
-rw-r--r-- | src/ex_cmds.c | 6 | ||||
-rw-r--r-- | src/version.c | 2 |
2 files changed, 8 insertions, 0 deletions
diff --git a/src/ex_cmds.c b/src/ex_cmds.c index 712ba4ff..acb4da28 100644 --- a/src/ex_cmds.c +++ b/src/ex_cmds.c @@ -5200,6 +5200,12 @@ outofmem: EMSG2(_(e_patnotf2), get_search_pat()); } +#ifdef FEAT_FOLDING + if (do_ask && hasAnyFolding(curwin)) + /* Cursor position may require updating */ + changed_window_setting(); +#endif + vim_free(regmatch.regprog); } diff --git a/src/version.c b/src/version.c index f071eb96..8b9a2414 100644 --- a/src/version.c +++ b/src/version.c @@ -726,6 +726,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 772, +/**/ 771, /**/ 770, |