0
0
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:
Bram Moolenaar
2020-10-26 21:05:27 +01:00
parent c8970b9464
commit 8133cc6bf4
10 changed files with 164 additions and 117 deletions

View File

@@ -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;