diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2015-10-16 01:54:07 -0400 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2015-10-16 01:54:07 -0400 |
commit | 3a970e57dfd48f090f8ccc21567b7974e13d4c68 (patch) | |
tree | 5aeaf1cd7a85c17b29276eee88e9881f56ea134c /src/nvim/misc1.c | |
parent | a3f048ee06dea15490d7b874d295c3fc850cdc51 (diff) | |
parent | db6cba7d5759e02379005702c7a9d760137f4389 (diff) | |
download | rneovim-3a970e57dfd48f090f8ccc21567b7974e13d4c68.tar.gz rneovim-3a970e57dfd48f090f8ccc21567b7974e13d4c68.tar.bz2 rneovim-3a970e57dfd48f090f8ccc21567b7974e13d4c68.zip |
Merge pull request #2506 from ZyX-I/shada
Replace viminfo with ShaDa files
Diffstat (limited to 'src/nvim/misc1.c')
-rw-r--r-- | src/nvim/misc1.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/nvim/misc1.c b/src/nvim/misc1.c index 8407198b13..1f1b5c2aa9 100644 --- a/src/nvim/misc1.c +++ b/src/nvim/misc1.c @@ -2042,8 +2042,7 @@ static void changed_common(linenr_T lnum, colnr_T col, linenr_T lnume, long xtra /* set the '. mark */ if (!cmdmod.keepjumps) { - curbuf->b_last_change.lnum = lnum; - curbuf->b_last_change.col = col; + RESET_FMARK(&curbuf->b_last_change, ((pos_T) {lnum, col, 0}), 0); /* Create a new entry if a new undo-able change was started or we * don't have an entry yet. */ @@ -2054,7 +2053,7 @@ static void changed_common(linenr_T lnum, colnr_T col, linenr_T lnume, long xtra /* Don't create a new entry when the line number is the same * as the last one and the column is not too far away. Avoids * creating many entries for typing "xxxxx". */ - p = &curbuf->b_changelist[curbuf->b_changelistlen - 1]; + p = &curbuf->b_changelist[curbuf->b_changelistlen - 1].mark; if (p->lnum != lnum) add = TRUE; else { @@ -2074,7 +2073,7 @@ static void changed_common(linenr_T lnum, colnr_T col, linenr_T lnume, long xtra /* changelist is full: remove oldest entry */ curbuf->b_changelistlen = JUMPLISTSIZE - 1; memmove(curbuf->b_changelist, curbuf->b_changelist + 1, - sizeof(pos_T) * (JUMPLISTSIZE - 1)); + sizeof(curbuf->b_changelist[0]) * (JUMPLISTSIZE - 1)); FOR_ALL_TAB_WINDOWS(tp, wp) { /* Correct position in changelist for other windows on * this buffer. */ |