diff src/optionstr.c @ 22721:92a100fc5e17 v8.2.1909

patch 8.2.1909: number of status line items is limited to 80 Commit: https://github.com/vim/vim/commit/8133cc6bf454eb90bb0868f7cf806fce5c0c9fe6 Author: Bram Moolenaar <Bram@vim.org> Date: Mon Oct 26 21:05:27 2020 +0100 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 https://github.com/vim/vim/issues/7181)
author Bram Moolenaar <Bram@vim.org>
date Mon, 26 Oct 2020 21:15:06 +0100
parents 9bb1c984c4da
children 8152b7daebad
line wrap: on
line diff
--- a/src/optionstr.c
+++ b/src/optionstr.c
@@ -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;