diff options
Diffstat (limited to 'src/nvim/spellsuggest.c')
-rw-r--r-- | src/nvim/spellsuggest.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/nvim/spellsuggest.c b/src/nvim/spellsuggest.c index 436599bb13..ed1ba972d5 100644 --- a/src/nvim/spellsuggest.c +++ b/src/nvim/spellsuggest.c @@ -413,9 +413,9 @@ int spell_check_sps(void) f = SPS_FAST; } else if (strcmp(buf, "double") == 0) { f = SPS_DOUBLE; - } else if (strncmp(buf, S_LEN("expr:")) != 0 - && strncmp(buf, S_LEN("file:")) != 0 - && (strncmp(buf, S_LEN("timeout:")) != 0 + } else if (strncmp(buf, "expr:", 5) != 0 + && strncmp(buf, "file:", 5) != 0 + && (strncmp(buf, "timeout:", 8) != 0 || (!ascii_isdigit(buf[8]) && !(buf[8] == '-' && ascii_isdigit(buf[9]))))) { f = -1; @@ -543,7 +543,7 @@ void spell_suggest(int count) msg_row = Rows - 1; // for when 'cmdheight' > 1 lines_left = Rows; // avoid more prompt char *fmt = _("Change \"%.*s\" to:"); - if (cmdmsg_rl && strncmp(fmt, S_LEN("Change")) == 0) { + if (cmdmsg_rl && strncmp(fmt, "Change", 6) == 0) { // And now the rabbit from the high hat: Avoid showing the // untranslated message rightleft. fmt = ":ot \"%.*s\" egnahC"; @@ -792,7 +792,7 @@ static void spell_find_suggest(char *badptr, int badlen, suginfo_T *su, int maxc for (char *p = sps_copy; *p != NUL;) { copy_option_part(&p, buf, MAXPATHL, ","); - if (strncmp(buf, S_LEN("expr:")) == 0) { + if (strncmp(buf, "expr:", 5) == 0) { // Evaluate an expression. Skip this when called recursively, // when using spellsuggest() in the expression. if (!expr_busy) { @@ -800,10 +800,10 @@ static void spell_find_suggest(char *badptr, int badlen, suginfo_T *su, int maxc spell_suggest_expr(su, buf + 5); expr_busy = false; } - } else if (strncmp(buf, S_LEN("file:")) == 0) { + } else if (strncmp(buf, "file:", 5) == 0) { // Use list of suggestions in a file. spell_suggest_file(su, buf + 5); - } else if (strncmp(buf, S_LEN("timeout:")) == 0) { + } else if (strncmp(buf, "timeout:", 8) == 0) { // Limit the time searching for suggestions. spell_suggest_timeout = atoi(buf + 8); } else if (!did_intern) { |