summaryrefslogtreecommitdiff
path: root/autoload
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2017-08-31 16:46:40 +0100
committerw0rp <devw0rp@gmail.com>2017-08-31 16:46:40 +0100
commit52eff3bd83a6fb99559c8b9ae693fb965bd6520c (patch)
treec7aec2b377eee163a05bdf1faae63b3da9b08166 /autoload
parent7c2a5052a850a6e7df10c2b4f84fd5b343175d8d (diff)
downloadale-52eff3bd83a6fb99559c8b9ae693fb965bd6520c.zip
Log commands that are run for ALEFix for ALEInfo
Diffstat (limited to 'autoload')
-rw-r--r--autoload/ale/fix.vim13
1 files changed, 12 insertions, 1 deletions
diff --git a/autoload/ale/fix.vim b/autoload/ale/fix.vim
index 80f46c27..e1210f17 100644
--- a/autoload/ale/fix.vim
+++ b/autoload/ale/fix.vim
@@ -96,6 +96,11 @@ function! s:HandleExit(job_id, exit_code) abort
endif
let l:job_info = remove(s:job_info_map, a:job_id)
+ let l:buffer = l:job_info.buffer
+
+ if g:ale_history_enabled
+ call ale#history#SetExitCode(l:buffer, a:job_id, a:exit_code)
+ endif
if has_key(l:job_info, 'file_to_read')
let l:job_info.output = readfile(l:job_info.file_to_read)
@@ -108,7 +113,7 @@ function! s:HandleExit(job_id, exit_code) abort
\ : l:job_info.input
call s:RunFixer({
- \ 'buffer': l:job_info.buffer,
+ \ 'buffer': l:buffer,
\ 'input': l:input,
\ 'callback_list': l:job_info.callback_list,
\ 'callback_index': l:job_info.callback_index + 1,
@@ -209,6 +214,12 @@ function! s:RunJob(options) abort
let l:job_id = ale#job#Start(l:command, l:job_options)
endif
+ let l:status = l:job_id ? 'started' : 'failed'
+
+ if g:ale_history_enabled
+ call ale#history#Add(l:buffer, l:status, l:job_id, l:command)
+ endif
+
if l:job_id == 0
return 0
endif