mirror of
https://github.com/vim/vim.git
synced 2025-09-24 03:44:06 -04:00
patch 9.1.0226: Not able to assign enum values to an enum static variable
Problem: Not able to assign enum values to an enum static variable (zzzyxwvut) Solution: Make it work (Yegappan Lakshmanan) related: #14224 closes: #14329 Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
committed by
Christian Brabandt
parent
059aeac2be
commit
abedca96ef
@@ -2056,6 +2056,11 @@ early_ret:
|
||||
if (enum_parse_values(eap, cl, line, &classmembers,
|
||||
&num_enum_values, &enum_end) == FAIL)
|
||||
break;
|
||||
|
||||
if (enum_end)
|
||||
// Add the enum "values" class variable.
|
||||
enum_add_values_member(cl, &classmembers, num_enum_values,
|
||||
&type_list);
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -2368,9 +2373,9 @@ early_ret:
|
||||
|
||||
vim_free(theline);
|
||||
|
||||
if (success && is_enum)
|
||||
// Add the enum "values" class variable.
|
||||
enum_add_values_member(cl, &classmembers, num_enum_values, &type_list);
|
||||
if (success && is_enum && num_enum_values == 0)
|
||||
// Empty enum statement. Add an empty "values" class variable
|
||||
enum_add_values_member(cl, &classmembers, 0, &type_list);
|
||||
|
||||
/*
|
||||
* Check a few things
|
||||
|
Reference in New Issue
Block a user