mirror of
https://github.com/vim/vim.git
synced 2025-09-25 03:54:15 -04:00
patch 8.2.1909: number of status line items is limited to 80
Problem: Number of status line items is limited to 80. Solution: Dynamically allocate the arrays. (Rom Grk, closes #7181)
This commit is contained in:
@@ -571,11 +571,10 @@ valid_filetype(char_u *val)
|
||||
static char *
|
||||
check_stl_option(char_u *s)
|
||||
{
|
||||
int itemcnt = 0;
|
||||
int groupdepth = 0;
|
||||
static char errbuf[80];
|
||||
|
||||
while (*s && itemcnt < STL_MAX_ITEM)
|
||||
while (*s)
|
||||
{
|
||||
// Check for valid keys after % sequences
|
||||
while (*s && *s != '%')
|
||||
@@ -583,8 +582,6 @@ check_stl_option(char_u *s)
|
||||
if (!*s)
|
||||
break;
|
||||
s++;
|
||||
if (*s != '%' && *s != ')')
|
||||
++itemcnt;
|
||||
if (*s == '%' || *s == STL_TRUNCMARK || *s == STL_MIDDLEMARK)
|
||||
{
|
||||
s++;
|
||||
@@ -627,8 +624,6 @@ check_stl_option(char_u *s)
|
||||
return N_("E540: Unclosed expression sequence");
|
||||
}
|
||||
}
|
||||
if (itemcnt >= STL_MAX_ITEM)
|
||||
return N_("E541: too many items");
|
||||
if (groupdepth != 0)
|
||||
return N_("E542: unbalanced groups");
|
||||
return NULL;
|
||||
|
Reference in New Issue
Block a user