summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/option.c8
-rw-r--r--src/testdir/test_options.vim6
-rw-r--r--src/version.c2
3 files changed, 16 insertions, 0 deletions
diff --git a/src/option.c b/src/option.c
index 15febb73c0..095653da75 100644
--- a/src/option.c
+++ b/src/option.c
@@ -7374,6 +7374,14 @@ set_context_in_set_cmd(
xp->xp_pattern = p + 1;
+#ifdef FEAT_SYN_HL
+ if (options[opt_idx].var == (char_u *)&p_syn)
+ {
+ xp->xp_context = EXPAND_OWNSYNTAX;
+ return;
+ }
+#endif
+
if (flags & P_EXPAND)
{
p = options[opt_idx].var;
diff --git a/src/testdir/test_options.vim b/src/testdir/test_options.vim
index fec8d2a94c..fc81cec4ea 100644
--- a/src/testdir/test_options.vim
+++ b/src/testdir/test_options.vim
@@ -374,6 +374,12 @@ func Test_set_completion()
call assert_equal('"set filetype=sshdconfig', @:)
call feedkeys(":set filetype=a\<C-A>\<C-B>\"\<CR>", 'xt')
call assert_equal('"set filetype=' .. getcompletion('a*', 'filetype')->join(), @:)
+
+ " Expand values for 'syntax'
+ call feedkeys(":set syntax=sshdconfi\<Tab>\<C-B>\"\<CR>", 'xt')
+ call assert_equal('"set syntax=sshdconfig', @:)
+ call feedkeys(":set syntax=a\<C-A>\<C-B>\"\<CR>", 'xt')
+ call assert_equal('"set syntax=' .. getcompletion('a*', 'syntax')->join(), @:)
endfunc
func Test_set_option_errors()
diff --git a/src/version.c b/src/version.c
index bcba0991f7..fac0300e0b 100644
--- a/src/version.c
+++ b/src/version.c
@@ -700,6 +700,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1798,
+/**/
1797,
/**/
1796,