mirror of
https://github.com/vim/vim
synced 2025-07-16 01:01:58 +00:00
patch 9.0.1991: no cmdline completion for setting the font
Problem: no cmdline completion for setting the font Solution: enable it on Win32 and GTK builds Add guifont cmdline completion (for Windows and GTK) For Windows, auto-complete will only suggest monospace fonts as that's the only types allowed. Will also suggest font options after the colon, including suggesting the current font size for convenience, and misc charset and quality options like `cANSI` and `qCLEARTYPE`. For GTK, auto-complete will suggest only monospace fonts for `guifont` but will include all fonts for `guifontwide`. The completion code doesn't currently suggest the current font size, as the GTK guifont format does not have a clear delimiter (':' for other platforms). closes: #13264 Signed-off-by: Christian Brabandt <cb@256bit.org> Co-authored-by: Yee Cheng Chin <ychin.git@gmail.com>
This commit is contained in:
committed by
Christian Brabandt
parent
ea746f9e86
commit
290b887e8c
@ -1164,9 +1164,13 @@ static struct vimoption options[] =
|
||||
{(char_u *)NULL, (char_u *)0L}
|
||||
#endif
|
||||
SCTX_INIT},
|
||||
{"guifont", "gfn", P_STRING|P_VI_DEF|P_RCLR|P_ONECOMMA|P_NODUP,
|
||||
{"guifont", "gfn", P_STRING|P_VI_DEF|P_RCLR|P_ONECOMMA|P_NODUP
|
||||
#if !defined(FEAT_GUI_GTK)
|
||||
|P_COLON
|
||||
#endif
|
||||
,
|
||||
#ifdef FEAT_GUI
|
||||
(char_u *)&p_guifont, PV_NONE, did_set_guifont, NULL,
|
||||
(char_u *)&p_guifont, PV_NONE, did_set_guifont, expand_set_guifont,
|
||||
{(char_u *)"", (char_u *)0L}
|
||||
#else
|
||||
(char_u *)NULL, PV_NONE, NULL, NULL,
|
||||
@ -1183,10 +1187,14 @@ static struct vimoption options[] =
|
||||
{(char_u *)NULL, (char_u *)0L}
|
||||
#endif
|
||||
SCTX_INIT},
|
||||
{"guifontwide", "gfw", P_STRING|P_VI_DEF|P_RCLR|P_ONECOMMA|P_NODUP,
|
||||
{"guifontwide", "gfw", P_STRING|P_VI_DEF|P_RCLR|P_ONECOMMA|P_NODUP
|
||||
#if !defined(FEAT_GUI_GTK)
|
||||
|P_COLON
|
||||
#endif
|
||||
,
|
||||
#if defined(FEAT_GUI)
|
||||
(char_u *)&p_guifontwide, PV_NONE,
|
||||
did_set_guifontwide, NULL,
|
||||
did_set_guifontwide, expand_set_guifont,
|
||||
{(char_u *)"", (char_u *)0L}
|
||||
#else
|
||||
(char_u *)NULL, PV_NONE, NULL, NULL,
|
||||
|
Reference in New Issue
Block a user