]> granicus.if.org Git - vim/commitdiff
patch 8.2.3392: augroup completion escapes regexp pattern characters v8.2.3392
authorBram Moolenaar <Bram@vim.org>
Wed, 1 Sep 2021 11:03:39 +0000 (13:03 +0200)
committerBram Moolenaar <Bram@vim.org>
Wed, 1 Sep 2021 11:03:39 +0000 (13:03 +0200)
Problem:    augroup completion escapes regexp pattern characters.
Solution:   Do not escape the augroup name. (closes #8826)

src/cmdexpand.c
src/testdir/test_cmdline.vim
src/version.c

index 58ba7596755ff4a1c4395b1194eb355db710231d..6c92957692bce2f05f91fce6462c8444fa0a5e61 100644 (file)
@@ -2134,8 +2134,8 @@ ExpandFromContext(
            {EXPAND_SYNTIME, get_syntime_arg, TRUE, TRUE},
 # endif
            {EXPAND_HIGHLIGHT, get_highlight_name, TRUE, TRUE},
-           {EXPAND_EVENTS, get_event_name, TRUE, TRUE},
-           {EXPAND_AUGROUP, get_augroup_name, TRUE, TRUE},
+           {EXPAND_EVENTS, get_event_name, TRUE, FALSE},
+           {EXPAND_AUGROUP, get_augroup_name, TRUE, FALSE},
 # ifdef FEAT_CSCOPE
            {EXPAND_CSCOPE, get_cscope_name, TRUE, TRUE},
 # endif
index 341a0f11345fc5de886e6745198fa767a0eb28de..7ed626dd419686abdb6d0a3be566a2dd0f9bec48 100644 (file)
@@ -876,11 +876,13 @@ func Test_cmdline_complete_various()
   call delete('Xfile2')
 
   " completion for the :augroup command
-  augroup XTest
+  augroup XTest.test
   augroup END
   call feedkeys(":augroup X\<C-A>\<C-B>\"\<CR>", 'xt')
-  call assert_equal("\"augroup XTest", @:)
-  augroup! XTest
+  call assert_equal("\"augroup XTest.test", @:)
+  call feedkeys(":au X\<C-A>\<C-B>\"\<CR>", 'xt')
+  call assert_equal("\"au XTest.test", @:)
+  augroup! XTest.test
 
   " completion for the :unlet command
   call feedkeys(":unlet one two\<C-A>\<C-B>\"\<CR>", 'xt')
index b574d5d461b6487443f72b8d9a0edf49bc5b8957..9f67d7964dfd11ccbb149370f156cb85f3a83c82 100644 (file)
@@ -755,6 +755,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    3392,
 /**/
     3391,
 /**/