diff options
author | ZyX <kp-pav@yandex.ru> | 2015-06-28 08:06:16 +0300 |
---|---|---|
committer | ZyX <kp-pav@yandex.ru> | 2015-10-08 21:59:53 +0300 |
commit | 200e62efebe8e87fc612218b675b74def57519f1 (patch) | |
tree | 6aa90a5522f5ef70a9eb3b6d8edb10a477c171a7 /src/nvim/misc1.c | |
parent | 9ab08c82569d57fad29da95dc776ae288300903e (diff) | |
download | rneovim-200e62efebe8e87fc612218b675b74def57519f1.tar.gz rneovim-200e62efebe8e87fc612218b675b74def57519f1.tar.bz2 rneovim-200e62efebe8e87fc612218b675b74def57519f1.zip |
shada: Add support for dumping/restoring bufs changes and win jumps
Diffstat (limited to 'src/nvim/misc1.c')
-rw-r--r-- | src/nvim/misc1.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/nvim/misc1.c b/src/nvim/misc1.c index a4ebdca091..1f1b5c2aa9 100644 --- a/src/nvim/misc1.c +++ b/src/nvim/misc1.c @@ -2053,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 { @@ -2073,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. */ @@ -2094,7 +2094,7 @@ static void changed_common(linenr_T lnum, colnr_T col, linenr_T lnume, long xtra } } curbuf->b_changelist[curbuf->b_changelistlen - 1] = - curbuf->b_last_change.mark; + curbuf->b_last_change; /* The current window is always after the last change, so that "g," * takes you back to it. */ curwin->w_changelistidx = curbuf->b_changelistlen; |