mirror of
https://github.com/dense-analysis/ale.git
synced 2026-10-01 16:03:44 +08:00
Add an option for completely disabling command history, and add documentation
This commit is contained in:
1 parent
3a2286a1b8
commit
ca17b5aebd
4 files changed
+45
-1
No files matched your search
@@ -16,6 +16,7 @@ Before:
|
||||
\})
|
||||
|
||||
After:
|
||||
let g:ale_history_enabled = 1
|
||||
unlet g:history
|
||||
let g:ale_buffer_info = {}
|
||||
let g:ale_max_buffer_history_size = 20
|
||||
@@ -40,6 +41,16 @@ Execute(History should be set when commands are run):
|
||||
" The Job ID will change each time, but we can check the type.
|
||||
AssertEqual type(1), type(g:history[0].job_id)
|
||||
|
||||
Execute(History should be not set when disabled):
|
||||
AssertEqual 'foobar', &filetype
|
||||
|
||||
let g:ale_history_enabled = 0
|
||||
|
||||
call ale#Lint()
|
||||
call ale#engine#WaitForJobs(2000)
|
||||
|
||||
AssertEqual 0, len(g:ale_buffer_info[bufnr('%')].history)
|
||||
|
||||
Execute(History items should be popped after going over the max):
|
||||
let g:ale_buffer_info[1] = {
|
||||
\ 'history': map(range(20), '{''status'': ''started'', ''job_id'': v:val, ''command'': ''foobar''}'),
|
||||
|
||||
Reference in new issue
Block a user