diff options
author | watiko <service@mail.watiko.net> | 2016-01-14 12:43:07 +0900 |
---|---|---|
committer | watiko <service@mail.watiko.net> | 2016-02-01 03:47:09 +0900 |
commit | 40149a9dbf475ad1d0dec9a9494a32c26a6536ce (patch) | |
tree | f54bed2f697f3a01fa225eb3efdfb9fa86aa5efe /src/nvim/undo.c | |
parent | 2f52ae18e75a85af78b78587d5b44b6d8d4814b7 (diff) | |
download | rneovim-40149a9dbf475ad1d0dec9a9494a32c26a6536ce.tar.gz rneovim-40149a9dbf475ad1d0dec9a9494a32c26a6536ce.tar.bz2 rneovim-40149a9dbf475ad1d0dec9a9494a32c26a6536ce.zip |
vim-patch:7.4.634
Problem: Marks are not restored after redo + undo.
Solution: Fix the way marks are restored. (Olaf Dabrunz)
https://github.com/vim/vim/commit/f65aad5554f1d1f972f0bd38059da70e3cdf4c87
https://github.com/vim/vim/commit/35e7594dd429f7a8a06cefd61c3e8d48b9bd74e2
Diffstat (limited to 'src/nvim/undo.c')
-rw-r--r-- | src/nvim/undo.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/nvim/undo.c b/src/nvim/undo.c index 6b60f95f22..b8cdffcda0 100644 --- a/src/nvim/undo.c +++ b/src/nvim/undo.c @@ -2222,12 +2222,17 @@ static void u_undoredo(int undo) /* * restore marks from before undo/redo */ - for (i = 0; i < NMARKS; ++i) + for (i = 0; i < NMARKS; ++i) { if (curhead->uh_namedm[i].mark.lnum != 0) { free_fmark(curbuf->b_namedm[i]); curbuf->b_namedm[i] = curhead->uh_namedm[i]; + } + if (namedm[i].mark.lnum != 0) { curhead->uh_namedm[i] = namedm[i]; + } else { + curhead->uh_namedm[i].mark.lnum = 0; } + } if (curhead->uh_visual.vi_start.lnum != 0) { curbuf->b_visual = curhead->uh_visual; curhead->uh_visual = visualinfo; |