]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
runtime(doc): GTK: document that "font" in a highlight group has no effect
authorHirohito Higashi <h.east.727@gmail.com>
Tue, 28 Jul 2026 20:53:34 +0000 (20:53 +0000)
committerChristian Brabandt <cb@256bit.org>
Tue, 28 Jul 2026 20:53:34 +0000 (20:53 +0000)
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) <noreply@anthropic.com>
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
runtime/doc/syntax.txt

index f50e12a9a1ec0b7dd936e25c78120e39f8a48be8..7b555d3ca17791107f1ce74ec16e84efae991eee 100644 (file)
@@ -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*