vim-patch:8.1.2348: :const cannot be followed by "| endif"

Problem:    :const cannot be followed by "| endif".
Solution:   Check following command for :const. (closes vim/vim#5269)
            Also fix completion after :const.
8f76e6b12b
This commit is contained in:
Jan Edmund Lazo
2019-11-26 20:05:52 -05:00
parent d697690e24
commit f196ab87a1
5 changed files with 14 additions and 1 deletions

View File

@@ -2872,7 +2872,7 @@ void set_context_for_expression(expand_T *xp, char_u *arg, cmdidx_T cmdidx)
int c;
char_u *p;
if (cmdidx == CMD_let) {
if (cmdidx == CMD_let || cmdidx == CMD_const) {
xp->xp_context = EXPAND_USER_VARS;
if (vim_strpbrk(arg, (char_u *)"\"'+-*/%.=!?~|&$([<>,#") == NULL) {
/* ":let var1 var2 ...": find last space. */