mirror of
https://github.com/vim/vim.git
synced 2025-09-25 03:54:15 -04:00
patch 9.0.0444: trying to declare g:variable gives confusing error
Problem: Trying to declare g:variable gives confusing error. Solution: Give a better error message. (closes #11108)
This commit is contained in:
@@ -1031,12 +1031,16 @@ get_lval(
|
||||
{
|
||||
char_u *tp = skipwhite(p + 1);
|
||||
|
||||
if (is_scoped_variable(name))
|
||||
{
|
||||
semsg(_(e_cannot_use_type_with_this_variable_str), name);
|
||||
return NULL;
|
||||
}
|
||||
if (tp == p + 1 && !quiet)
|
||||
{
|
||||
semsg(_(e_white_space_required_after_str_str), ":", p);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (!SCRIPT_ID_VALID(current_sctx.sc_sid))
|
||||
{
|
||||
semsg(_(e_using_type_not_in_script_context_str), p);
|
||||
|
Reference in New Issue
Block a user