Skip to content

Commit 0571e75

Browse files
author
Damien Radtke
committed
---
yaml --- r: 160492 b: refs/heads/master c: 75e4d95 h: refs/heads/master v: v3
1 parent 114004b commit 0571e75

File tree

3 files changed

+15
-4
lines changed

3 files changed

+15
-4
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: 0207e25d70b1a5733b170ac9f16a9702db8ee8ed
2+
refs/heads/master: 75e4d9583832c158a9c0927cdb087e4555434993
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: c9f6d696420107f82304b992cf623b806995fe18
55
refs/heads/try: 225de0d60f8ca8dcc62ab2fd8818ebbda4b58cfe

trunk/src/etc/vim/compiler/cargo.vim

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,13 @@ endif
2323
" support variations like 'cargo.toml'.
2424
let s:cargo_manifest_name = get(g:, 'cargo_manifest_name', 'Cargo.toml')
2525

26+
function! s:is_absolute(path)
27+
return a:path[0] == '/' || a:path =~ '[A-Z]\+:'
28+
endfunction
29+
2630
let s:local_manifest = findfile(s:cargo_manifest_name, '.;')
2731
if s:local_manifest != ''
28-
let s:local_manifest = fnamemodify(s:local_manifest, ':p:h').'/'
32+
let s:local_manifest = fnamemodify(s:local_manifest, ':p:h').'/'
2933
augroup cargo
3034
au!
3135
au QuickfixCmdPost make call s:FixPaths()
@@ -43,14 +47,14 @@ if s:local_manifest != ''
4347
let manifest = m[1].'/'
4448
" Manually strip another slash if needed; usually just an
4549
" issue on Windows.
46-
if manifest =~ '^/[A-Z]:/'
50+
if manifest =~ '^/[A-Z]\+:/'
4751
let manifest = manifest[1:]
4852
endif
4953
endif
5054
continue
5155
endif
5256
let filename = bufname(qf.bufnr)
53-
if filereadable(filename)
57+
if s:is_absolute(filename)
5458
continue
5559
endif
5660
let qf.filename = simplify(manifest.filename)

trunk/src/etc/vim/doc/rust.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,13 @@ g:ftplugin_rust_source_path~
7979
let g:ftplugin_rust_source_path = $HOME.'/dev/rust'
8080
<
8181

82+
*g:cargo_manifest_name*
83+
g:cargo_manifest_name~
84+
Set this option to the name of the manifest file for your projects. If
85+
not specified it defaults to 'Cargo.toml' : >
86+
let g:cargo_manifest_name = 'Cargo.toml'
87+
<
88+
8289
==============================================================================
8390
COMMANDS *rust-commands*
8491

0 commit comments

Comments
 (0)