aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/mark.c
diff options
context:
space:
mode:
authorJames McCoy <jamessan@jamessan.com>2017-01-09 22:31:45 -0500
committerGitHub <noreply@github.com>2017-01-09 22:31:45 -0500
commit9fcf6d577fa712d2ce420012c53a687cc9f7301d (patch)
treee76756bff3c08f33aca515ac90c76046bf11d61c /src/nvim/mark.c
parentb260004d65ab55838cce9442a29e4f10941c5f51 (diff)
parent8f32c04df4a181a2773da3d5e0fcd36ff84a25d8 (diff)
downloadrneovim-9fcf6d577fa712d2ce420012c53a687cc9f7301d.tar.gz
rneovim-9fcf6d577fa712d2ce420012c53a687cc9f7301d.tar.bz2
rneovim-9fcf6d577fa712d2ce420012c53a687cc9f7301d.zip
Merge pull request #5862 from jamessan/vim-aa3b15d
vim-patch:aa3b15d,82af871,7.4.1925,c95a302
Diffstat (limited to 'src/nvim/mark.c')
-rw-r--r--src/nvim/mark.c21
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
*/