vim-patch:7.4.634

Problem:    Marks are not restored after redo + undo.
Solution:   Fix the way marks are restored. (Olaf Dabrunz)

f65aad5554
35e7594dd4
This commit is contained in:
watiko
2016-01-14 12:43:07 +09:00
parent 2f52ae18e7
commit 40149a9dbf
5 changed files with 33 additions and 3 deletions

View File

@@ -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];
curhead->uh_namedm[i] = 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;