diff options
author | Bram Moolenaar <Bram@vim.org> | 2020-04-20 22:42:32 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2020-04-20 22:42:32 +0200 |
commit | 1966c248814d5195edcd1208ed0e51e664a61283 (patch) | |
tree | 473348747676a70ed53b2ef8de16ae085121d878 /src/menu.c | |
parent | 2c7f8c574f1f8723d59adca3fec8fb89c41cf8c9 (diff) | |
download | vim-git-1966c248814d5195edcd1208ed0e51e664a61283.tar.gz |
patch 8.2.0613: Vim9: no check for space before #commentv8.2.0613
Problem: Vim9: no check for space before #comment.
Solution: Add space checks.
Diffstat (limited to 'src/menu.c')
-rw-r--r-- | src/menu.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/menu.c b/src/menu.c index 38b4fd8af..b01792594 100644 --- a/src/menu.c +++ b/src/menu.c @@ -2680,7 +2680,7 @@ ex_menutranslate(exarg_T *eap UNUSED) /* * ":menutrans clear": clear all translations. */ - if (STRNCMP(arg, "clear", 5) == 0 && ends_excmd(*skipwhite(arg + 5))) + if (STRNCMP(arg, "clear", 5) == 0 && ends_excmd2(arg, skipwhite(arg + 5))) { tp = (menutrans_T *)menutrans_ga.ga_data; for (i = 0; i < menutrans_ga.ga_len; ++i) @@ -2703,7 +2703,9 @@ ex_menutranslate(exarg_T *eap UNUSED) to = skipwhite(arg); *arg = NUL; arg = menu_skip_part(to); - if (arg == to) + if (arg == to || ends_excmd2(eap->arg, from) + || ends_excmd2(eap->arg, to) + || !ends_excmd2(eap->arg, skipwhite(arg))) emsg(_(e_invarg)); else { |