patch 8.2.3608: users who type "q:" instead of ":q" are confused
Problem: Users who type "q:" instead of ":q" are confused.
Solution: Add an autocmd to give a message that explains this is the
command-line window. (Egor Zvorykin, closes #9146)
This commit is contained in:
committed by
Bram Moolenaar
parent
9459b8d461
commit
125ffd21f9
@ -111,6 +111,17 @@ if 1
|
|||||||
|
|
||||||
augroup END
|
augroup END
|
||||||
|
|
||||||
|
" Quite a few people accidentally type "q:" instead of ":q" and get confused
|
||||||
|
" by the command line window. Give a hint about how to get out.
|
||||||
|
" If you don't like this you can put this in your vimrc:
|
||||||
|
" ":augroup vimHints | au! | augroup END"
|
||||||
|
augroup vimHints
|
||||||
|
autocmd! CmdwinEnter *
|
||||||
|
\ echohl Todo |
|
||||||
|
\ echo 'You discovered the command-line window! You can close it with ":q".' |
|
||||||
|
\ echohl None
|
||||||
|
augroup END
|
||||||
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
" Switch syntax highlighting on when the terminal has colors or when using the
|
" Switch syntax highlighting on when the terminal has colors or when using the
|
||||||
|
|||||||
@ -2458,6 +2458,7 @@ func Test_autocmd_CmdWinEnter()
|
|||||||
CheckFeature cmdwin
|
CheckFeature cmdwin
|
||||||
|
|
||||||
let lines =<< trim END
|
let lines =<< trim END
|
||||||
|
augroup vimHints | au! | augroup END
|
||||||
let b:dummy_var = 'This is a dummy'
|
let b:dummy_var = 'This is a dummy'
|
||||||
autocmd CmdWinEnter * quit
|
autocmd CmdWinEnter * quit
|
||||||
let winnr = winnr('$')
|
let winnr = winnr('$')
|
||||||
|
|||||||
@ -1255,6 +1255,7 @@ func Test_cmdwin_restore()
|
|||||||
CheckScreendump
|
CheckScreendump
|
||||||
|
|
||||||
let lines =<< trim [SCRIPT]
|
let lines =<< trim [SCRIPT]
|
||||||
|
augroup vimHints | au! | augroup END
|
||||||
call setline(1, range(30))
|
call setline(1, range(30))
|
||||||
2split
|
2split
|
||||||
[SCRIPT]
|
[SCRIPT]
|
||||||
|
|||||||
@ -757,6 +757,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 */
|
||||||
|
/**/
|
||||||
|
3608,
|
||||||
/**/
|
/**/
|
||||||
3607,
|
3607,
|
||||||
/**/
|
/**/
|
||||||
|
|||||||
Reference in New Issue
Block a user