From: Hirohito Higashi Date: Tue, 28 Jul 2026 20:53:34 +0000 (+0000) Subject: runtime(doc): GTK: document that "font" in a highlight group has no effect X-Git-Tag: v9.2.0872~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4a997e146f0451de97ac936b582d379ff429e231;p=thirdparty%2Fvim.git runtime(doc): GTK: document that "font" in a highlight group has no effect Problem: It is not documented that in the GTK GUI the "font" item of a highlight group only works for the "Normal" group. The example even uses another group, so it does not work there. Solution: Mention the restriction and use the "Normal" group in the example. closes: #20867 Co-Authored-By: Claude Opus 5 (1M context) Signed-off-by: Hirohito Higashi Signed-off-by: Christian Brabandt --- diff --git a/runtime/doc/syntax.txt b/runtime/doc/syntax.txt index f50e12a9a1..7b555d3ca1 100644 --- a/runtime/doc/syntax.txt +++ b/runtime/doc/syntax.txt @@ -1,4 +1,4 @@ -*syntax.txt* For Vim version 9.2. Last change: 2026 Jun 21 +*syntax.txt* For Vim version 9.2. Last change: 2026 Jul 29 VIM REFERENCE MANUAL by Bram Moolenaar @@ -5870,6 +5870,8 @@ font={font-name} *highlight-font* When setting the font for the "Normal" group, this becomes the default font (until the 'guifont' option is changed; the last one set is used). + In the GTK GUI, a font can only be set for the "Normal" group; for + other groups it is accepted but has no effect. The following only works with Motif, not with other GUIs: When setting the font for the "Menu" group, the menus will be changed. When setting the font for the "Tooltip" group, the tooltips will be @@ -5880,7 +5882,7 @@ font={font-name} *highlight-font* To use a font name with an embedded space or other special character, put it in single quotes. The single quote cannot be used then. Example: > - :hi comment font='Monospace 10' + :hi Normal font='Monospace 10' guifg={color-name} *highlight-guifg* guibg={color-name} *highlight-guibg*