Skip to content

Commit b4d82e2

Browse files
committed
patch 8.2.3392: augroup completion escapes regexp pattern characters
Problem: augroup completion escapes regexp pattern characters. Solution: Do not escape the augroup name. (closes #8826)
1 parent 20e0c3d commit b4d82e2

3 files changed

Lines changed: 9 additions & 5 deletions

File tree

src/cmdexpand.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2134,8 +2134,8 @@ ExpandFromContext(
21342134
{EXPAND_SYNTIME, get_syntime_arg, TRUE, TRUE},
21352135
# endif
21362136
{EXPAND_HIGHLIGHT, get_highlight_name, TRUE, TRUE},
2137-
{EXPAND_EVENTS, get_event_name, TRUE, TRUE},
2138-
{EXPAND_AUGROUP, get_augroup_name, TRUE, TRUE},
2137+
{EXPAND_EVENTS, get_event_name, TRUE, FALSE},
2138+
{EXPAND_AUGROUP, get_augroup_name, TRUE, FALSE},
21392139
# ifdef FEAT_CSCOPE
21402140
{EXPAND_CSCOPE, get_cscope_name, TRUE, TRUE},
21412141
# endif

src/testdir/test_cmdline.vim

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -876,11 +876,13 @@ func Test_cmdline_complete_various()
876876
call delete('Xfile2')
877877

878878
" completion for the :augroup command
879-
augroup XTest
879+
augroup XTest.test
880880
augroup END
881881
call feedkeys(":augroup X\<C-A>\<C-B>\"\<CR>", 'xt')
882-
call assert_equal("\"augroup XTest", @:)
883-
augroup! XTest
882+
call assert_equal("\"augroup XTest.test", @:)
883+
call feedkeys(":au X\<C-A>\<C-B>\"\<CR>", 'xt')
884+
call assert_equal("\"au XTest.test", @:)
885+
augroup! XTest.test
884886

885887
" completion for the :unlet command
886888
call feedkeys(":unlet one two\<C-A>\<C-B>\"\<CR>", 'xt')

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -755,6 +755,8 @@ static char *(features[]) =
755755

756756
static int included_patches[] =
757757
{ /* Add new patch number below this line */
758+
/**/
759+
3392,
758760
/**/
759761
3391,
760762
/**/

0 commit comments

Comments
 (0)