diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2019-09-13 19:32:06 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-09-13 19:32:06 -0700 |
commit | 9cf8cf605d85ec043d4e39f73ac42c7482c6f901 (patch) | |
tree | b0a8ec8985c5bdfb1882ee847ff64b42c98d3e0a /src/nvim/spell.c | |
parent | 427cf16e44d047c14e0ca1b95eb09fc8b8eb2f3d (diff) | |
parent | 6aae0e7c943267d2109ae20ec5086791c3b94a5e (diff) | |
download | rneovim-9cf8cf605d85ec043d4e39f73ac42c7482c6f901.tar.gz rneovim-9cf8cf605d85ec043d4e39f73ac42c7482c6f901.tar.bz2 rneovim-9cf8cf605d85ec043d4e39f73ac42c7482c6f901.zip |
Merge #11015 from justinmk/getdigits
getdigits: introduce `strict`, `def` parameters
Diffstat (limited to 'src/nvim/spell.c')
-rw-r--r-- | src/nvim/spell.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/nvim/spell.c b/src/nvim/spell.c index 0cde781fc3..724a0332bc 100644 --- a/src/nvim/spell.c +++ b/src/nvim/spell.c @@ -2706,18 +2706,20 @@ int spell_check_sps(void) f = 0; if (ascii_isdigit(*buf)) { s = buf; - sps_limit = getdigits_int(&s); - if (*s != NUL && !ascii_isdigit(*s)) + sps_limit = getdigits_int(&s, true, 0); + if (*s != NUL && !ascii_isdigit(*s)) { f = -1; - } else if (STRCMP(buf, "best") == 0) + } + } else if (STRCMP(buf, "best") == 0) { f = SPS_BEST; - else if (STRCMP(buf, "fast") == 0) + } else if (STRCMP(buf, "fast") == 0) { f = SPS_FAST; - else if (STRCMP(buf, "double") == 0) + } else if (STRCMP(buf, "double") == 0) { f = SPS_DOUBLE; - else if (STRNCMP(buf, "expr:", 5) != 0 - && STRNCMP(buf, "file:", 5) != 0) + } else if (STRNCMP(buf, "expr:", 5) != 0 + && STRNCMP(buf, "file:", 5) != 0) { f = -1; + } if (f == -1 || (sps_flags != 0 && f != 0)) { sps_flags = SPS_BEST; |