summaryrefslogtreecommitdiff
path: root/src/undo.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2015-02-17 13:43:40 +0100
committerBram Moolenaar <Bram@vim.org>2015-02-17 13:43:40 +0100
commitf65aad5554f1d1f972f0bd38059da70e3cdf4c87 (patch)
tree728f338d2e0f292611ad375e724aaa27d9f74bb8 /src/undo.c
parentbe20f9fa5da001258a40a5f01e38befac4ebfe80 (diff)
downloadvim-git-f65aad5554f1d1f972f0bd38059da70e3cdf4c87.tar.gz
updated for version 7.4.634v7.4.634
Problem: Marks are not restored after redo + undo. Solution: Fix the way marks are restored. (Olaf Dabrunz)
Diffstat (limited to 'src/undo.c')
-rw-r--r--src/undo.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/undo.c b/src/undo.c
index 24dcf0548..034d16c14 100644
--- a/src/undo.c
+++ b/src/undo.c
@@ -2847,11 +2847,14 @@ u_undoredo(undo)
* restore marks from before undo/redo
*/
for (i = 0; i < NMARKS; ++i)
+ {
if (curhead->uh_namedm[i].lnum != 0)
- {
curbuf->b_namedm[i] = curhead->uh_namedm[i];
+ if (namedm[i].lnum != 0)
curhead->uh_namedm[i] = namedm[i];
- }
+ else
+ curhead->uh_namedm[i].lnum = 0;
+ }
if (curhead->uh_visual.vi_start.lnum != 0)
{
curbuf->b_visual = curhead->uh_visual;