aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/mark.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/mark.c')
-rw-r--r--src/nvim/mark.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/nvim/mark.c b/src/nvim/mark.c
index 4ded438f52..cfc702f189 100644
--- a/src/nvim/mark.c
+++ b/src/nvim/mark.c
@@ -127,6 +127,7 @@ int setmark_pos(int c, pos_T *pos, int fnum)
return OK;
}
if (isupper(c)) {
+ assert(c >= 'A' && c <= 'Z');
i = c - 'A';
namedfm[i].fmark.mark = *pos;
namedfm[i].fmark.fnum = fnum;
@@ -1179,7 +1180,7 @@ void set_last_cursor(win_T *win)
win->w_buffer->b_last_cursor = win->w_cursor;
}
-#if defined(EXITFREE) || defined(PROTO)
+#if defined(EXITFREE)
void free_all_marks(void)
{
int i;
@@ -1219,13 +1220,15 @@ int read_viminfo_filemark(vir_T *virp, int force)
}
} else if (VIM_ISDIGIT(*str))
fm = &namedfm[*str - '0' + NMARKS];
- else
+ else { // is uppercase
+ assert(*str >= 'A' && *str <= 'Z');
fm = &namedfm[*str - 'A'];
+ }
if (fm != NULL && (fm->fmark.mark.lnum == 0 || force)) {
str = skipwhite(str + 1);
- fm->fmark.mark.lnum = getdigits(&str);
+ fm->fmark.mark.lnum = getdigits_long(&str);
str = skipwhite(str);
- fm->fmark.mark.col = getdigits(&str);
+ fm->fmark.mark.col = getdigits_int(&str);
fm->fmark.mark.coladd = 0;
fm->fmark.fnum = 0;
str = skipwhite(str);