0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

patch 8.2.0996: using "aucmdwin" in win_gettype() is not ideal

Problem:    Using "aucmdwin" in win_gettype() is not ideal.
Solution:   Rename to "autocmd".
This commit is contained in:
Bram Moolenaar
2020-06-17 21:41:35 +02:00
parent e17f8817a1
commit 40a019f157
4 changed files with 5 additions and 3 deletions

View File

@@ -10864,7 +10864,7 @@ win_getid([{win} [, {tab}]]) *win_getid()*
win_gettype([{nr}]) *win_gettype()* win_gettype([{nr}]) *win_gettype()*
Return the type of the window: Return the type of the window:
"aucmdwin" autocommand window. Temporary window "autocmd" autocommand window. Temporary window
used to execute autocommands. used to execute autocommands.
"popup" popup window |popup| "popup" popup window |popup|
"preview" preview window |preview-window| "preview" preview window |preview-window|

View File

@@ -859,7 +859,7 @@ f_win_gettype(typval_T *argvars, typval_T *rettv)
} }
} }
if (wp == aucmd_win) if (wp == aucmd_win)
rettv->vval.v_string = vim_strsave((char_u *)"aucmdwin"); rettv->vval.v_string = vim_strsave((char_u *)"autocmd");
#if defined(FEAT_QUICKFIX) #if defined(FEAT_QUICKFIX)
else if (wp->w_p_pvw) else if (wp->w_p_pvw)
rettv->vval.v_string = vim_strsave((char_u *)"preview"); rettv->vval.v_string = vim_strsave((char_u *)"preview");

View File

@@ -2592,7 +2592,7 @@ func Test_autocmd_window()
augroup END augroup END
doautoall BufEnter doautoall BufEnter
call assert_equal([['one.txt', 'aucmdwin'], ['two.txt', '']], g:blist) call assert_equal([['one.txt', 'autocmd'], ['two.txt', '']], g:blist)
augroup aucmd_win_test augroup aucmd_win_test
au! au!

View File

@@ -754,6 +754,8 @@ static char *(features[]) =
static int included_patches[] = static int included_patches[] =
{ /* Add new patch number below this line */ { /* Add new patch number below this line */
/**/
996,
/**/ /**/
995, 995,
/**/ /**/