0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

patch 8.2.1286: Vim9: No error when using a type to a window variable

Problem:    Vim9: No error when using a type to a window variable
Solution:   Recognize the syntax and give an error. (closes #6521)
This commit is contained in:
Bram Moolenaar
2020-07-23 21:14:43 +02:00
parent b8070e3173
commit 43e969d3f9
3 changed files with 19 additions and 0 deletions

View File

@@ -3324,6 +3324,14 @@ find_ex_command(
return eap->cmd;
}
}
// Recognize using a type for a w:, b:, t: or g: variable:
// "w:varname: number = 123".
if (eap->cmd[1] == ':' && *p == ':')
{
eap->cmdidx = CMD_eval;
return eap->cmd;
}
}
#endif