Patch 9.0.0111

4 views
Skip to first unread message

Bram Moolenaar

unread,
Jul 30, 2022, 9:57:53 AM7/30/22
to vim...@googlegroups.com

Patch 9.0.0111
Problem: "nocombine" is missing from synIDattr().
Solution: Add "nocombine". (Muni Tanjim, closes #10816)
Files: runtime/doc/builtin.txt, src/evalfunc.c,
src/testdir/test_syn_attr.vim


*** ../vim-9.0.0110/runtime/doc/builtin.txt 2022-06-28 11:21:05.000000000 +0100
--- runtime/doc/builtin.txt 2022-07-30 14:54:04.543638295 +0100
***************
*** 9225,9230 ****
--- 9233,9239 ----
"underline" "1" if underlined
"undercurl" "1" if undercurled
"strike" "1" if strikethrough
+ "nocombine" "1" if nocombine

Returns an empty string on error.

*** ../vim-9.0.0110/src/evalfunc.c 2022-07-25 18:13:33.050580738 +0100
--- src/evalfunc.c 2022-07-30 14:54:04.543638295 +0100
***************
*** 10083,10090 ****
p = highlight_has_attr(id, HL_ITALIC, modec);
break;

! case 'n': // name
! p = get_highlight_name_ext(NULL, id - 1, FALSE);
break;

case 'r': // reverse
--- 10083,10093 ----
p = highlight_has_attr(id, HL_ITALIC, modec);
break;

! case 'n':
! if (TOLOWER_ASC(what[1]) == 'o') // nocombine
! p = highlight_has_attr(id, HL_NOCOMBINE, modec);
! else // name
! p = get_highlight_name_ext(NULL, id - 1, FALSE);
break;

case 'r': // reverse
*** ../vim-9.0.0110/src/testdir/test_syn_attr.vim 2022-06-29 18:39:05.015841419 +0100
--- src/testdir/test_syn_attr.vim 2022-07-30 14:54:04.543638295 +0100
***************
*** 22,29 ****
call assert_equal('1', synIDattr(hlID("Mine"), "underdotted", 'cterm'))
call assert_equal('1', synIDattr("Mine"->hlID(), "underdashed", 'gui'))

! hi Mine gui=strikethrough
call assert_equal('1', synIDattr(hlID("Mine"), "strikethrough", 'gui'))
hi Mine term=NONE cterm=NONE gui=NONE
call assert_equal('', synIDattr(hlID("Mine"), "bold", 'term'))
call assert_equal('', synIDattr(hlID("Mine"), "italic", 'cterm'))
--- 22,31 ----
call assert_equal('1', synIDattr(hlID("Mine"), "underdotted", 'cterm'))
call assert_equal('1', synIDattr("Mine"->hlID(), "underdashed", 'gui'))

! hi Mine term=nocombine gui=strikethrough
call assert_equal('1', synIDattr(hlID("Mine"), "strikethrough", 'gui'))
+ call assert_equal('1', synIDattr(hlID("Mine"), "nocombine", 'term'))
+ call assert_equal('', synIDattr(hlID("Mine"), "nocombine", 'gui'))
hi Mine term=NONE cterm=NONE gui=NONE
call assert_equal('', synIDattr(hlID("Mine"), "bold", 'term'))
call assert_equal('', synIDattr(hlID("Mine"), "italic", 'cterm'))
*** ../vim-9.0.0110/src/version.c 2022-07-30 12:03:12.839558828 +0100
--- src/version.c 2022-07-30 14:54:34.455602793 +0100
***************
*** 737,738 ****
--- 737,740 ----
{ /* Add new patch number below this line */
+ /**/
+ 111,
/**/

--
Some of the well known MS-Windows errors:
ETIME Wrong time, wait a little while
ECRASH Try again...
EDETECT Unable to detect errors
EOVER You lost! Play another game?
ENOCLUE Eh, what did you want?

/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
Reply all
Reply to author
Forward
0 new messages