Skip to content

Commit

Permalink
new: set -scroll=0 option to disable quickfix scrolling
Browse files Browse the repository at this point in the history
  • Loading branch information
skywind3000 committed Dec 17, 2021
1 parent 51c8870 commit 5a0eaf2
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions plugin/asyncrun.vim
Original file line number Diff line number Diff line change
Expand Up @@ -1143,7 +1143,7 @@ function! asyncrun#translate(program, command)
endif
let l:command = s:StringStrip(l:command)
let s:async_program_cmd = ''
silent exec 'AsyncRun -program=parse @ '. l:command
silent exec 'AsyncRun -program=<parse> @ '. l:command
let l:command = s:async_program_cmd
return l:command
endfunc
Expand Down Expand Up @@ -1869,9 +1869,13 @@ function! asyncrun#run(bang, opts, args, ...)
endif

" parse makeprg/grepprg and return
if l:opts.program == 'parse'
if l:opts.program == '<parse>'
let s:async_program_cmd = l:command
return s:async_program_cmd
elseif l:opts.program == '<display>'
let l:opts.cmd = l:command
echo l:opts
return ''
endif

" update marcros
Expand Down Expand Up @@ -1941,6 +1945,11 @@ function! asyncrun#run(bang, opts, args, ...)
let l:opts.errorformat = get(l:opts, 'errorformat', &errorformat)
let s:async_scroll = (a:bang == '!')? 0 : 1

" check scroll
if has_key(l:opts, 'scroll')
let s:async_scroll = (l:opts.scroll == '0')? 0 : 1
endif

" check if need to save
let l:save = get(l:opts, 'save', '')

Expand Down

0 comments on commit 5a0eaf2

Please sign in to comment.