Skip to content

Commit 5a0eaf2

Browse files
author
skywind3000
committed
new: set -scroll=0 option to disable quickfix scrolling
1 parent 51c8870 commit 5a0eaf2

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

plugin/asyncrun.vim

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1143,7 +1143,7 @@ function! asyncrun#translate(program, command)
11431143
endif
11441144
let l:command = s:StringStrip(l:command)
11451145
let s:async_program_cmd = ''
1146-
silent exec 'AsyncRun -program=parse @ '. l:command
1146+
silent exec 'AsyncRun -program=<parse> @ '. l:command
11471147
let l:command = s:async_program_cmd
11481148
return l:command
11491149
endfunc
@@ -1869,9 +1869,13 @@ function! asyncrun#run(bang, opts, args, ...)
18691869
endif
18701870

18711871
" parse makeprg/grepprg and return
1872-
if l:opts.program == 'parse'
1872+
if l:opts.program == '<parse>'
18731873
let s:async_program_cmd = l:command
18741874
return s:async_program_cmd
1875+
elseif l:opts.program == '<display>'
1876+
let l:opts.cmd = l:command
1877+
echo l:opts
1878+
return ''
18751879
endif
18761880

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

1948+
" check scroll
1949+
if has_key(l:opts, 'scroll')
1950+
let s:async_scroll = (l:opts.scroll == '0')? 0 : 1
1951+
endif
1952+
19441953
" check if need to save
19451954
let l:save = get(l:opts, 'save', '')
19461955

0 commit comments

Comments
 (0)