• R/O
  • SSH

vim: Commit

Mirror of the Vim source from https://github.com/vim/vim


Commit MetaInfo

Revisione7d64a3fffe4cca2a9012c98eef3e9d2936c2b82 (tree)
Time2024-01-18 05:15:03
AuthorChristian Brabandt <cb@256b...>
CommiterChristian Brabandt

Log Message

patch 9.1.0039: too vague errors for 'listchars'/'fillchars'

Commit: https://github.com/vim/vim/commit/6a8d2e1634f8f0d7463a2786dbcbe0f38dd287a7
Author: zeertzjq <zeertzjq@outlook.com>
Date: Wed Jan 17 20:54:49 2024 +0100

patch 9.1.0039: too vague errors for 'listchars'/'fillchars'
Problem: too vague errors for 'listchars'/'fillchars'
Solution: Include the field name in error message.
(zeertzjq)
related: neovim/neovim#27050
closes: #13877
Co-authored-by: Cole Frankenhoff <cole.nhf@gmail.com>
Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>

Change Summary

Incremental Difference

diff -r 6e58c97e633a -r e7d64a3fffe4 runtime/doc/options.txt
--- a/runtime/doc/options.txt Wed Jan 17 21:00:03 2024 +0100
+++ b/runtime/doc/options.txt Wed Jan 17 21:15:03 2024 +0100
@@ -1,4 +1,4 @@
1-*options.txt* For Vim version 9.1. Last change: 2024 Jan 03
1+*options.txt* For Vim version 9.1. Last change: 2024 Jan 17
22
33
44 VIM REFERENCE MANUAL by Bram Moolenaar
@@ -3478,12 +3478,10 @@
34783478 *'fillchars'* *'fcs'*
34793479 'fillchars' 'fcs' string (default "vert:|,fold:-,eob:~")
34803480 global or local to window |global-local|
3481- {not available when compiled without the |+folding|
3482- feature}
34833481 Characters to fill the statuslines, vertical separators and special
34843482 lines in the window.
34853483 It is a comma-separated list of items. Each item has a name, a colon
3486- and the value of that item:
3484+ and the value of that item: |E1511|
34873485
34883486 item name default Used for ~
34893487 stl ' ' statusline of the current window
@@ -3504,7 +3502,7 @@
35043502 <
35053503 For the "stl", "stlnc", "foldopen", "foldclose" and "foldsep" items
35063504 single-byte and multibyte characters are supported. But double-width
3507- characters are not supported.
3505+ characters are not supported. |E1512|
35083506
35093507 The highlighting used for these items:
35103508 item name highlight group ~
@@ -5243,7 +5241,7 @@
52435241 'listchars' 'lcs' string (default "eol:$")
52445242 global or local to window |global-local|
52455243 Strings to use in 'list' mode and for the |:list| command. It is a
5246- comma-separated list of string settings.
5244+ comma-separated list of string settings. *E1511*
52475245 *lcs-eol*
52485246 eol:c Character to show at the end of each line. When
52495247 omitted, there is no extra character at the end of the
@@ -5319,7 +5317,7 @@
53195317
53205318 The characters ':' and ',' should not be used. UTF-8 characters can
53215319 be used when 'encoding' is "utf-8", otherwise only printable
5322- characters are allowed. All characters must be single width.
5320+ characters are allowed. All characters must be single width. *E1512*
53235321
53245322 Each character can be specified as hex: >
53255323 set listchars=eol:\\x24
diff -r 6e58c97e633a -r e7d64a3fffe4 runtime/doc/tags
--- a/runtime/doc/tags Wed Jan 17 21:00:03 2024 +0100
+++ b/runtime/doc/tags Wed Jan 17 21:15:03 2024 +0100
@@ -4536,6 +4536,8 @@
45364536 E1509 editing.txt /*E1509*
45374537 E151 helphelp.txt /*E151*
45384538 E1510 change.txt /*E1510*
4539+E1511 options.txt /*E1511*
4540+E1512 options.txt /*E1512*
45394541 E152 helphelp.txt /*E152*
45404542 E153 helphelp.txt /*E153*
45414543 E154 helphelp.txt /*E154*
diff -r 6e58c97e633a -r e7d64a3fffe4 src/errors.h
--- a/src/errors.h Wed Jan 17 21:00:03 2024 +0100
+++ b/src/errors.h Wed Jan 17 21:15:03 2024 +0100
@@ -3602,3 +3602,7 @@
36023602 INIT(= N_("E1509: Error occurred when reading or writing extended attribute"));
36033603 EXTERN char e_val_too_large[]
36043604 INIT(= N_("E1510: Value too large: %s"));
3605+EXTERN char e_wrong_number_of_characters_for_field_str[]
3606+ INIT(= N_("E1511: Wrong number of characters for field \"%s\""));
3607+EXTERN char e_wrong_character_width_for_field_str[]
3608+ INIT(= N_("E1512: Wrong character width for field \"%s\""));
diff -r 6e58c97e633a -r e7d64a3fffe4 src/option.c
--- a/src/option.c Wed Jan 17 21:00:03 2024 +0100
+++ b/src/option.c Wed Jan 17 21:15:03 2024 +0100
@@ -2858,10 +2858,10 @@
28582858 check_opt_wim();
28592859
28602860 // Parse default for 'listchars'.
2861- (void)set_listchars_option(curwin, curwin->w_p_lcs, TRUE);
2861+ (void)set_listchars_option(curwin, curwin->w_p_lcs, TRUE, NULL, 0);
28622862
28632863 // Parse default for 'fillchars'.
2864- (void)set_fillchars_option(curwin, curwin->w_p_fcs, TRUE);
2864+ (void)set_fillchars_option(curwin, curwin->w_p_fcs, TRUE, NULL, 0);
28652865
28662866 #ifdef FEAT_CLIPBOARD
28672867 // Parse default for 'clipboard'
@@ -6219,12 +6219,14 @@
62196219 break;
62206220 case PV_LCS:
62216221 clear_string_option(&((win_T *)from)->w_p_lcs);
6222- set_listchars_option((win_T *)from, ((win_T *)from)->w_p_lcs, TRUE);
6222+ set_listchars_option((win_T *)from, ((win_T *)from)->w_p_lcs, TRUE,
6223+ NULL, 0);
62236224 redraw_later(UPD_NOT_VALID);
62246225 break;
62256226 case PV_FCS:
62266227 clear_string_option(&((win_T *)from)->w_p_fcs);
6227- set_fillchars_option((win_T *)from, ((win_T *)from)->w_p_fcs, TRUE);
6228+ set_fillchars_option((win_T *)from, ((win_T *)from)->w_p_fcs, TRUE,
6229+ NULL, 0);
62286230 redraw_later(UPD_NOT_VALID);
62296231 break;
62306232 case PV_VE:
@@ -6630,8 +6632,8 @@
66306632 fill_culopt_flags(NULL, wp);
66316633 check_colorcolumn(wp);
66326634 #endif
6633- set_listchars_option(wp, wp->w_p_lcs, TRUE);
6634- set_fillchars_option(wp, wp->w_p_fcs, TRUE);
6635+ set_listchars_option(wp, wp->w_p_lcs, TRUE, NULL, 0);
6636+ set_fillchars_option(wp, wp->w_p_fcs, TRUE, NULL, 0);
66356637 }
66366638
66376639 static char_u *
diff -r 6e58c97e633a -r e7d64a3fffe4 src/optionstr.c
--- a/src/optionstr.c Wed Jan 17 21:00:03 2024 +0100
+++ b/src/optionstr.c Wed Jan 17 21:15:03 2024 +0100
@@ -233,7 +233,7 @@
233233 {
234234 if (errbuf == NULL)
235235 return "";
236- vim_snprintf((char *)errbuf, errbuflen, _(e_illegal_character_str),
236+ vim_snprintf(errbuf, errbuflen, _(e_illegal_character_str),
237237 (char *)transchar(c));
238238 return errbuf;
239239 }
@@ -1350,7 +1350,8 @@
13501350 * The global 'listchars' or 'fillchars' option is changed.
13511351 */
13521352 static char *
1353-did_set_global_listfillchars(char_u *val, int opt_lcs, int opt_flags)
1353+did_set_global_listfillchars(char_u *val, int opt_lcs, int opt_flags,
1354+ char *errbuf, size_t errbuflen)
13541355 {
13551356 char *errmsg = NULL;
13561357 char_u **local_ptr = opt_lcs ? &curwin->w_p_lcs : &curwin->w_p_fcs;
@@ -1359,10 +1360,12 @@
13591360 // local value
13601361 if (opt_lcs)
13611362 errmsg = set_listchars_option(curwin, val,
1362- **local_ptr == NUL || !(opt_flags & OPT_GLOBAL));
1363+ **local_ptr == NUL || !(opt_flags & OPT_GLOBAL),
1364+ errbuf, errbuflen);
13631365 else
13641366 errmsg = set_fillchars_option(curwin, val,
1365- **local_ptr == NUL || !(opt_flags & OPT_GLOBAL));
1367+ **local_ptr == NUL || !(opt_flags & OPT_GLOBAL),
1368+ errbuf, errbuflen);
13661369 if (errmsg != NULL)
13671370 return errmsg;
13681371
@@ -1382,12 +1385,12 @@
13821385 if (opt_lcs)
13831386 {
13841387 if (*wp->w_p_lcs == NUL)
1385- (void)set_listchars_option(wp, wp->w_p_lcs, TRUE);
1388+ (void)set_listchars_option(wp, wp->w_p_lcs, TRUE, NULL, 0);
13861389 }
13871390 else
13881391 {
13891392 if (*wp->w_p_fcs == NUL)
1390- (void)set_fillchars_option(wp, wp->w_p_fcs, TRUE);
1393+ (void)set_fillchars_option(wp, wp->w_p_fcs, TRUE, NULL, 0);
13911394 }
13921395 }
13931396
@@ -1408,11 +1411,13 @@
14081411 if ( varp == &p_lcs // global 'listchars'
14091412 || varp == &p_fcs) // global 'fillchars'
14101413 errmsg = did_set_global_listfillchars(*varp, varp == &p_lcs,
1411- args->os_flags);
1414+ args->os_flags, args->os_errbuf, args->os_errbuflen);
14121415 else if (varp == &curwin->w_p_lcs) // local 'listchars'
1413- errmsg = set_listchars_option(curwin, *varp, TRUE);
1416+ errmsg = set_listchars_option(curwin, *varp, TRUE,
1417+ args->os_errbuf, args->os_errbuflen);
14141418 else if (varp == &curwin->w_p_fcs) // local 'fillchars'
1415- errmsg = set_fillchars_option(curwin, *varp, TRUE);
1419+ errmsg = set_fillchars_option(curwin, *varp, TRUE,
1420+ args->os_errbuf, args->os_errbuflen);
14161421
14171422 return errmsg;
14181423 }
diff -r 6e58c97e633a -r e7d64a3fffe4 src/proto/screen.pro
--- a/src/proto/screen.pro Wed Jan 17 21:00:03 2024 +0100
+++ b/src/proto/screen.pro Wed Jan 17 21:15:03 2024 +0100
@@ -55,8 +55,8 @@
5555 int number_width(win_T *wp);
5656 int screen_screencol(void);
5757 int screen_screenrow(void);
58-char *set_fillchars_option(win_T *wp, char_u *val, int apply);
59-char *set_listchars_option(win_T *wp, char_u *val, int apply);
58+char *set_fillchars_option(win_T *wp, char_u *val, int apply, char *errbuf, size_t errbuflen);
59+char *set_listchars_option(win_T *wp, char_u *val, int apply, char *errbuf, size_t errbuflen);
6060 char_u *get_fillchars_name(expand_T *xp, int idx);
6161 char_u *get_listchars_name(expand_T *xp, int idx);
6262 char *check_chars_options(void);
diff -r 6e58c97e633a -r e7d64a3fffe4 src/screen.c
--- a/src/screen.c Wed Jan 17 21:00:03 2024 +0100
+++ b/src/screen.c Wed Jan 17 21:15:03 2024 +0100
@@ -4690,6 +4690,15 @@
46904690 {NULL, "leadmultispace"},
46914691 };
46924692
4693+ static char *
4694+field_value_err(char *errbuf, size_t errbuflen, char *fmt, char *field)
4695+{
4696+ if (errbuf == NULL)
4697+ return "";
4698+ vim_snprintf(errbuf, errbuflen, _(fmt), field);
4699+ return errbuf;
4700+}
4701+
46934702 /*
46944703 * Handle setting 'listchars' or 'fillchars'.
46954704 * "value" points to either the global or the window-local value.
@@ -4699,7 +4708,8 @@
46994708 * Returns error message, NULL if it's OK.
47004709 */
47014710 static char *
4702-set_chars_option(win_T *wp, char_u *value, int is_listchars, int apply)
4711+set_chars_option(win_T *wp, char_u *value, int is_listchars, int apply,
4712+ char *errbuf, size_t errbuflen)
47034713 {
47044714 int round, i, len, entries;
47054715 char_u *p, *s;
@@ -4779,9 +4789,7 @@
47794789 for (i = 0; i < entries; ++i)
47804790 {
47814791 len = (int)STRLEN(tab[i].name);
4782- if (!(STRNCMP(p, tab[i].name, len) == 0
4783- && p[len] == ':'
4784- && p[len + 1] != NUL))
4792+ if (!(STRNCMP(p, tab[i].name, len) == 0 && p[len] == ':'))
47854793 continue;
47864794
47874795 if (is_listchars && strcmp(tab[i].name, "multispace") == 0)
@@ -4796,12 +4804,16 @@
47964804 {
47974805 c1 = get_encoded_char_adv(&s);
47984806 if (char2cells(c1) > 1)
4799- return e_invalid_argument;
4807+ return field_value_err(errbuf, errbuflen,
4808+ e_wrong_character_width_for_field_str,
4809+ tab[i].name);
48004810 ++multispace_len;
48014811 }
48024812 if (multispace_len == 0)
48034813 // lcs-multispace cannot be an empty string
4804- return e_invalid_argument;
4814+ return field_value_err(errbuf, errbuflen,
4815+ e_wrong_number_of_characters_for_field_str,
4816+ tab[i].name);
48054817 p = s;
48064818 }
48074819 else
@@ -4832,12 +4844,16 @@
48324844 {
48334845 c1 = get_encoded_char_adv(&s);
48344846 if (char2cells(c1) > 1)
4835- return e_invalid_argument;
4847+ return field_value_err(errbuf, errbuflen,
4848+ e_wrong_character_width_for_field_str,
4849+ tab[i].name);
48364850 ++lead_multispace_len;
48374851 }
48384852 if (lead_multispace_len == 0)
48394853 // lcs-leadmultispace cannot be an empty string
4840- return e_invalid_argument;
4854+ return field_value_err(errbuf, errbuflen,
4855+ e_wrong_number_of_characters_for_field_str,
4856+ tab[i].name);
48414857 p = s;
48424858 }
48434859 else
@@ -4857,21 +4873,33 @@
48574873
48584874 c2 = c3 = 0;
48594875 s = p + len + 1;
4876+ if (*s == NUL)
4877+ return field_value_err(errbuf, errbuflen,
4878+ e_wrong_number_of_characters_for_field_str,
4879+ tab[i].name);
48604880 c1 = get_encoded_char_adv(&s);
48614881 if (char2cells(c1) > 1)
4862- return e_invalid_argument;
4882+ return field_value_err(errbuf, errbuflen,
4883+ e_wrong_character_width_for_field_str,
4884+ tab[i].name);
48634885 if (tab[i].cp == &lcs_chars.tab2)
48644886 {
48654887 if (*s == NUL)
4866- return e_invalid_argument;
4888+ return field_value_err(errbuf, errbuflen,
4889+ e_wrong_number_of_characters_for_field_str,
4890+ tab[i].name);
48674891 c2 = get_encoded_char_adv(&s);
48684892 if (char2cells(c2) > 1)
4869- return e_invalid_argument;
4893+ return field_value_err(errbuf, errbuflen,
4894+ e_wrong_character_width_for_field_str,
4895+ tab[i].name);
48704896 if (!(*s == ',' || *s == NUL))
48714897 {
48724898 c3 = get_encoded_char_adv(&s);
48734899 if (char2cells(c3) > 1)
4874- return e_invalid_argument;
4900+ return field_value_err(errbuf, errbuflen,
4901+ e_wrong_character_width_for_field_str,
4902+ tab[i].name);
48754903 }
48764904 }
48774905
@@ -4892,6 +4920,10 @@
48924920 p = s;
48934921 break;
48944922 }
4923+ else
4924+ return field_value_err(errbuf, errbuflen,
4925+ e_wrong_number_of_characters_for_field_str,
4926+ tab[i].name);
48954927 }
48964928
48974929 if (i == entries)
@@ -4923,18 +4955,20 @@
49234955 * Handle the new value of 'fillchars'.
49244956 */
49254957 char *
4926-set_fillchars_option(win_T *wp, char_u *val, int apply)
4958+set_fillchars_option(win_T *wp, char_u *val, int apply, char *errbuf,
4959+ size_t errbuflen)
49274960 {
4928- return set_chars_option(wp, val, FALSE, apply);
4961+ return set_chars_option(wp, val, FALSE, apply, errbuf, errbuflen);
49294962 }
49304963
49314964 /*
49324965 * Handle the new value of 'listchars'.
49334966 */
49344967 char *
4935-set_listchars_option(win_T *wp, char_u *val, int apply)
4968+set_listchars_option(win_T *wp, char_u *val, int apply, char *errbuf,
4969+ size_t errbuflen)
49364970 {
4937- return set_chars_option(wp, val, TRUE, apply);
4971+ return set_chars_option(wp, val, TRUE, apply, errbuf, errbuflen);
49384972 }
49394973
49404974 /*
@@ -4974,15 +5008,15 @@
49745008 tabpage_T *tp;
49755009 win_T *wp;
49765010
4977- if (set_listchars_option(curwin, p_lcs, FALSE) != NULL)
5011+ if (set_listchars_option(curwin, p_lcs, FALSE, NULL, 0) != NULL)
49785012 return e_conflicts_with_value_of_listchars;
4979- if (set_fillchars_option(curwin, p_fcs, FALSE) != NULL)
5013+ if (set_fillchars_option(curwin, p_fcs, FALSE, NULL, 0) != NULL)
49805014 return e_conflicts_with_value_of_fillchars;
49815015 FOR_ALL_TAB_WINDOWS(tp, wp)
49825016 {
4983- if (set_listchars_option(wp, wp->w_p_lcs, FALSE) != NULL)
5017+ if (set_listchars_option(wp, wp->w_p_lcs, FALSE, NULL, 0) != NULL)
49845018 return e_conflicts_with_value_of_listchars;
4985- if (set_fillchars_option(wp, wp->w_p_fcs, FALSE) != NULL)
5019+ if (set_fillchars_option(wp, wp->w_p_fcs, FALSE, NULL, 0) != NULL)
49865020 return e_conflicts_with_value_of_fillchars;
49875021 }
49885022 return NULL;
diff -r 6e58c97e633a -r e7d64a3fffe4 src/testdir/test_display.vim
--- a/src/testdir/test_display.vim Wed Jan 17 21:00:03 2024 +0100
+++ b/src/testdir/test_display.vim Wed Jan 17 21:15:03 2024 +0100
@@ -252,12 +252,12 @@
252252 " default value
253253 call assert_match('eob:\~', &fillchars)
254254 " invalid values
255- call assert_fails(':set fillchars=eob:', 'E474:')
256- call assert_fails(':set fillchars=eob:xy', 'E474:')
257- call assert_fails(':set fillchars=eob:\255', 'E474:')
258- call assert_fails(':set fillchars=eob:<ff>', 'E474:')
259- call assert_fails(":set fillchars=eob:\x01", 'E474:')
260- call assert_fails(':set fillchars=eob:\\x01', 'E474:')
255+ call assert_fails(':set fillchars=eob:', 'E1511:')
256+ call assert_fails(':set fillchars=eob:xy', 'E1511:')
257+ call assert_fails(':set fillchars=eob:\255', 'E1511:')
258+ call assert_fails(':set fillchars=eob:<ff>', 'E1511:')
259+ call assert_fails(":set fillchars=eob:\x01", 'E1512:')
260+ call assert_fails(':set fillchars=eob:\\x01', 'E1512:')
261261 " default is ~
262262 new
263263 redraw
@@ -411,14 +411,16 @@
411411 call StopVimInTerminal(buf)
412412 endfunc
413413
414-func Test_display_lastline()
414+func Test_display_lastline_dump()
415415 CheckScreendump
416416
417417 call Run_Test_display_lastline('')
418418 call Run_Test_display_lastline('euro_')
419+endfunc
419420
420- call assert_fails(':set fillchars=lastline:', 'E474:')
421- call assert_fails(':set fillchars=lastline:〇', 'E474:')
421+func Test_display_lastline_fails()
422+ call assert_fails(':set fillchars=lastline:', 'E1511:')
423+ call assert_fails(':set fillchars=lastline:〇', 'E1512:')
422424 endfunc
423425
424426 func Test_display_long_lastline()
diff -r 6e58c97e633a -r e7d64a3fffe4 src/testdir/test_listchars.vim
--- a/src/testdir/test_listchars.vim Wed Jan 17 21:00:03 2024 +0100
+++ b/src/testdir/test_listchars.vim Wed Jan 17 21:15:03 2024 +0100
@@ -429,52 +429,52 @@
429429 call assert_fails('set listchars=leadmultispace', 'E474:')
430430
431431 " Too short
432- call assert_fails('set listchars=space:', 'E474:')
433- call assert_fails('set listchars=tab:x', 'E474:')
434- call assert_fails('set listchars=multispace:', 'E474:')
435- call assert_fails('set listchars=leadmultispace:', 'E474:')
432+ call assert_fails('set listchars=space:', 'E1511:')
433+ call assert_fails('set listchars=tab:x', 'E1511:')
434+ call assert_fails('set listchars=multispace:', 'E1511:')
435+ call assert_fails('set listchars=leadmultispace:', 'E1511:')
436436
437437 " One occurrence too short
438- call assert_fails('set listchars=space:,space:x', 'E474:')
439- call assert_fails('set listchars=space:x,space:', 'E474:')
440- call assert_fails('set listchars=tab:x,tab:xx', 'E474:')
441- call assert_fails('set listchars=tab:xx,tab:x', 'E474:')
442- call assert_fails('set listchars=multispace:,multispace:x', 'E474:')
443- call assert_fails('set listchars=multispace:x,multispace:', 'E474:')
444- call assert_fails('set listchars=leadmultispace:,leadmultispace:x', 'E474:')
445- call assert_fails('set listchars=leadmultispace:x,leadmultispace:', 'E474:')
438+ call assert_fails('set listchars=space:x,space:', 'E1511:')
439+ call assert_fails('set listchars=space:,space:x', 'E1511:')
440+ call assert_fails('set listchars=tab:xx,tab:x', 'E1511:')
441+ call assert_fails('set listchars=tab:x,tab:xx', 'E1511:')
442+ call assert_fails('set listchars=multispace:,multispace:x', 'E1511:')
443+ call assert_fails('set listchars=multispace:x,multispace:', 'E1511:')
444+ call assert_fails('set listchars=leadmultispace:,leadmultispace:x', 'E1511:')
445+ call assert_fails('set listchars=leadmultispace:x,leadmultispace:', 'E1511:')
446446
447447 " Too long
448- call assert_fails('set listchars=space:xx', 'E474:')
449- call assert_fails('set listchars=tab:xxxx', 'E474:')
448+ call assert_fails('set listchars=space:xx', 'E1511:')
449+ call assert_fails('set listchars=tab:xxxx', 'E1511:')
450450
451451 " Has double-width character
452- call assert_fails('set listchars=space:·', 'E474:')
453- call assert_fails('set listchars=tab:·x', 'E474:')
454- call assert_fails('set listchars=tab:x·', 'E474:')
455- call assert_fails('set listchars=tab:xx·', 'E474:')
456- call assert_fails('set listchars=multispace:·', 'E474:')
457- call assert_fails('set listchars=multispace:xxx·', 'E474:')
458- call assert_fails('set listchars=leadmultispace:·', 'E474:')
459- call assert_fails('set listchars=leadmultispace:xxx·', 'E474:')
452+ call assert_fails('set listchars=space:·', 'E1512:')
453+ call assert_fails('set listchars=tab:·x', 'E1512:')
454+ call assert_fails('set listchars=tab:x·', 'E1512:')
455+ call assert_fails('set listchars=tab:xx·', 'E1512:')
456+ call assert_fails('set listchars=multispace:·', 'E1512:')
457+ call assert_fails('set listchars=multispace:xxx·', 'E1512:')
458+ call assert_fails('set listchars=leadmultispace:·', 'E1512:')
459+ call assert_fails('set listchars=leadmultispace:xxx·', 'E1512:')
460460
461461 " Has control character
462- call assert_fails("set listchars=space:\x01", 'E474:')
463- call assert_fails("set listchars=tab:\x01x", 'E474:')
464- call assert_fails("set listchars=tab:x\x01", 'E474:')
465- call assert_fails("set listchars=tab:xx\x01", 'E474:')
466- call assert_fails("set listchars=multispace:\x01", 'E474:')
467- call assert_fails("set listchars=multispace:xxx\x01", 'E474:')
468- call assert_fails('set listchars=space:\\x01', 'E474:')
469- call assert_fails('set listchars=tab:\\x01x', 'E474:')
470- call assert_fails('set listchars=tab:x\\x01', 'E474:')
471- call assert_fails('set listchars=tab:xx\\x01', 'E474:')
472- call assert_fails('set listchars=multispace:\\x01', 'E474:')
473- call assert_fails('set listchars=multispace:xxx\\x01', 'E474:')
474- call assert_fails("set listchars=leadmultispace:\x01", 'E474:')
475- call assert_fails('set listchars=leadmultispace:\\x01', 'E474:')
476- call assert_fails("set listchars=leadmultispace:xxx\x01", 'E474:')
477- call assert_fails('set listchars=leadmultispace:xxx\\x01', 'E474:')
462+ call assert_fails("set listchars=space:\x01", 'E1512:')
463+ call assert_fails("set listchars=tab:\x01x", 'E1512:')
464+ call assert_fails("set listchars=tab:x\x01", 'E1512:')
465+ call assert_fails("set listchars=tab:xx\x01", 'E1512:')
466+ call assert_fails("set listchars=multispace:\x01", 'E1512:')
467+ call assert_fails("set listchars=multispace:xxx\x01", 'E1512:')
468+ call assert_fails('set listchars=space:\\x01', 'E1512:')
469+ call assert_fails('set listchars=tab:\\x01x', 'E1512:')
470+ call assert_fails('set listchars=tab:x\\x01', 'E1512:')
471+ call assert_fails('set listchars=tab:xx\\x01', 'E1512:')
472+ call assert_fails('set listchars=multispace:\\x01', 'E1512:')
473+ call assert_fails('set listchars=multispace:xxx\\x01', 'E1512:')
474+ call assert_fails("set listchars=leadmultispace:\x01", 'E1512:')
475+ call assert_fails('set listchars=leadmultispace:\\x01', 'E1512:')
476+ call assert_fails("set listchars=leadmultispace:xxx\x01", 'E1512:')
477+ call assert_fails('set listchars=leadmultispace:xxx\\x01', 'E1512:')
478478
479479 enew!
480480 set ambiwidth& listchars& ff&
diff -r 6e58c97e633a -r e7d64a3fffe4 src/version.c
--- a/src/version.c Wed Jan 17 21:00:03 2024 +0100
+++ b/src/version.c Wed Jan 17 21:15:03 2024 +0100
@@ -705,6 +705,8 @@
705705 static int included_patches[] =
706706 { /* Add new patch number below this line */
707707 /**/
708+ 39,
709+/**/
708710 38,
709711 /**/
710712 37,
Show on old repository browser