mirror of
https://github.com/dense-analysis/ale.git
synced 2025-12-16 01:07:06 +08:00
Allow the cursor messages to be disabled while Vim is running
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
Before:
|
||||
Save g:ale_echo_msg_format
|
||||
Save g:ale_echo_cursor
|
||||
|
||||
let g:ale_buffer_info = {
|
||||
\ bufnr('%'): {
|
||||
@@ -66,6 +67,7 @@ Before:
|
||||
let g:ale_set_loclist = 0
|
||||
let g:ale_set_signs = 0
|
||||
let g:ale_set_highlights = 0
|
||||
let g:ale_echo_cursor = 1
|
||||
|
||||
function GetLastMessage()
|
||||
redir => l:output
|
||||
@@ -222,3 +224,12 @@ Execute(The buffer message format option should take precedence):
|
||||
call ale#cursor#EchoCursorWarning()
|
||||
|
||||
AssertEqual 'FOO Some information', GetLastMessage()
|
||||
|
||||
Execute(The cursor message shouldn't be echoed if the option is off):
|
||||
let g:ale_echo_cursor = 0
|
||||
echom 'foo'
|
||||
|
||||
call cursor(1, 1)
|
||||
call ale#cursor#EchoCursorWarning()
|
||||
|
||||
AssertEqual 'foo', GetLastMessage()
|
||||
|
||||
Reference in New Issue
Block a user