0
0
mirror of https://github.com/vim/vim.git synced 2025-08-24 19:45:50 -04:00

patch 9.1.1568: need a few more default highlight groups

Problem:  need a few more default highlight groups
Solution: Add Bold, Italic and BoldItalic default highlight groups
          (Maxim Kim).

related: https://github.com/vim/vim/pull/17598#issuecomment-3007320523
closes: #17804

Signed-off-by: Maxim Kim <habamax@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
Maxim Kim 2025-07-20 09:32:11 +02:00 committed by Christian Brabandt
parent c8b99e2d13
commit 16f7098e68
No known key found for this signature in database
GPG Key ID: F3F92DA383FDDE09
6 changed files with 23 additions and 6 deletions

View File

@ -1,4 +1,4 @@
*syntax.txt* For Vim version 9.1. Last change: 2025 Jul 14
*syntax.txt* For Vim version 9.1. Last change: 2025 Jul 20
VIM REFERENCE MANUAL by Bram Moolenaar
@ -262,6 +262,9 @@ you can see the actual color, except for "Ignore"):
Debug debugging statements
*Underlined text that stands out, HTML links
*Bold bold text
*Italic italic text
*BoldItalic bold and italic text
*Ignore left blank, hidden |hl-Ignore|

View File

@ -1,4 +1,4 @@
*version9.txt* For Vim version 9.1. Last change: 2025 Jul 16
*version9.txt* For Vim version 9.1. Last change: 2025 Jul 20
VIM REFERENCE MANUAL by Bram Moolenaar
@ -41640,6 +41640,9 @@ Other new features ~
- The new digraph "APPROACHES THE LIMIT" using ".=" has been added.
- Add the new default highlighting groups "Bold", "Italic" and "BoldItalic"
for use in syntax scripts.
*changed-9.2*
Changed~
-------

View File

@ -1,7 +1,7 @@
" Vim syntax file
" Language: Vim help file
" Maintainer: Doug Kearns <dougkearns@gmail.com>
" Last Change: 2025 Jul 12
" Last Change: 2025 Jul 20
" Former Maintainer: Bram Moolenaar <Bram@vim.org>
" Quit when a (custom) syntax file was already loaded
@ -179,6 +179,9 @@ syn match helpDelimiter "\t[* ]Delimiter\t\+[a-z].*"
syn match helpSpecialComment "\t[* ]SpecialComment\t\+[a-z].*"
syn match helpDebug "\t[* ]Debug\t\+[a-z].*"
syn match helpUnderlined "\t[* ]Underlined\t\+[a-z].*"
syn match helpBold "\t[* ]Bold\t\+[a-z].*"
syn match helpItalic "\t[* ]Italic\t\+[a-z].*"
syn match helpBoldItalic "\t[* ]BoldItalic\t\+[a-z].*"
syn match helpError "\t[* ]Error\t\+[a-z].*"
syn match helpTodo "\t[* ]Todo\t\+[a-z].*"
@ -250,6 +253,9 @@ hi def link helpDelimiter Delimiter
hi def link helpSpecialComment SpecialComment
hi def link helpDebug Debug
hi def link helpUnderlined Underlined
hi def link helpBold Bold
hi def link helpItalic Italic
hi def link helpBoldItalic BoldItalic
hi def link helpError Error
hi def link helpTodo Todo
hi def link helpURL String

View File

@ -62,6 +62,9 @@ else
endif
SynColor Error term=reverse cterm=NONE ctermfg=White ctermbg=Red gui=NONE guifg=White guibg=Red
SynColor Todo term=standout cterm=NONE ctermfg=Black ctermbg=Yellow gui=NONE guifg=Blue guibg=Yellow
SynColor Bold term=bold cterm=bold ctermfg=NONE ctermbg=NONE gui=bold guifg=NONE guibg=NONE
SynColor Italic term=italic cterm=italic ctermfg=NONE ctermbg=NONE gui=italic guifg=NONE guibg=NONE
SynColor BoldItalic term=bold,italic cterm=bold,italic ctermfg=NONE ctermbg=NONE gui=bold,italic guifg=NONE guibg=NONE
" Common groups that link to default highlighting.
" You can specify other highlighting easily.

View File

@ -191,14 +191,14 @@ func Test_syntax_completion()
" Check that clearing "Aap" avoids it showing up before Boolean.
hi Aap ctermfg=blue
call feedkeys(":syn list \<C-A>\<C-B>\"\<CR>", 'tx')
call assert_match('^"syn list Aap Added Boolean Changed Character ', @:)
call assert_match('^"syn list Aap Added Bold BoldItalic Boolean Changed Character ', @:)
hi clear Aap
call feedkeys(":syn list \<C-A>\<C-B>\"\<CR>", 'tx')
call assert_match('^"syn list Added Boolean Changed Character ', @:)
call assert_match('^"syn list Added Bold BoldItalic Boolean Changed Character ', @:)
call feedkeys(":syn match \<C-A>\<C-B>\"\<CR>", 'tx')
call assert_match('^"syn match Added Boolean Changed Character ', @:)
call assert_match('^"syn match Added Bold BoldItalic Boolean Changed Character ', @:)
syn cluster Aax contains=Aap
call feedkeys(":syn list @A\<C-A>\<C-B>\"\<CR>", 'tx')

View File

@ -719,6 +719,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
1568,
/**/
1567,
/**/