diff options
author | James McCoy <jamessan@jamessan.com> | 2017-01-02 14:09:48 -0500 |
---|---|---|
committer | James McCoy <jamessan@jamessan.com> | 2017-01-09 20:23:41 -0500 |
commit | 492f2cfeff9a8ed295d2cbf3f4197a91654e07ca (patch) | |
tree | ade9f538d71baa31f1637a43101ffc46be350e63 /src/nvim/mark.c | |
parent | 282109c51b557bbd5d4fafb3f543613748831040 (diff) | |
download | rneovim-492f2cfeff9a8ed295d2cbf3f4197a91654e07ca.tar.gz rneovim-492f2cfeff9a8ed295d2cbf3f4197a91654e07ca.tar.bz2 rneovim-492f2cfeff9a8ed295d2cbf3f4197a91654e07ca.zip |
vim-patch:7.4.1925
Problem: Viminfo does not merge file marks properly.
Solution: Use a timestamp. Add the :clearjumps command.
https://github.com/vim/vim/commit/2d35899721da0e9359a9fe1059554f8c4ea7f0c1
Diffstat (limited to 'src/nvim/mark.c')
-rw-r--r-- | src/nvim/mark.c | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/src/nvim/mark.c b/src/nvim/mark.c index 6453c41415..bb5b8e8178 100644 --- a/src/nvim/mark.c +++ b/src/nvim/mark.c @@ -130,17 +130,17 @@ int setmark_pos(int c, pos_T *pos, int fnum) return OK; } - if (c > 'z') /* some islower() and isupper() cannot handle - characters above 127 */ - return FAIL; - if (islower(c)) { + if (ASCII_ISLOWER(c)) { i = c - 'a'; RESET_FMARK(curbuf->b_namedm + i, *pos, curbuf->b_fnum); return OK; } - if (isupper(c)) { - assert(c >= 'A' && c <= 'Z'); - i = c - 'A'; + if (ASCII_ISUPPER(c) || ascii_isdigit(c)) { + if (ascii_isdigit(c)) { + i = c - '0' + NMARKS; + } else { + i = c - 'A'; + } RESET_XFMARK(namedfm + i, *pos, fnum, NULL); return OK; } @@ -798,6 +798,13 @@ void ex_jumps(exarg_T *eap) MSG_PUTS("\n>"); } +void ex_clearjumps(exarg_T *eap) +{ + free_jumplist(curwin); + curwin->w_jumplistlen = 0; + curwin->w_jumplistidx = 0; +} + /* * print the changelist */ |