Skip to content

Commit c28ed1b

Browse files
committed
Make quickfix dir change conditional on makeprg
Issue #370
1 parent f5eb7b0 commit c28ed1b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

autoload/cargo/quickfix.vim

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
function! cargo#quickfix#CmdPre() abort
2-
if &filetype ==# 'rust' && get(b:, 'current_compiler', '') ==# 'cargo'
2+
if &filetype ==# 'rust' && get(b:, 'current_compiler', '') ==# 'cargo' &&
3+
\ &makeprg =~ '\V\^cargo\ \.\*'
34
" Preserve the current directory, and 'lcd' to the nearest Cargo file.
45
let b:rust_compiler_cargo_qf_has_lcd = haslocaldir()
56
let b:rust_compiler_cargo_qf_prev_cd = getcwd()

0 commit comments

Comments
 (0)