Skip to content

Commit ef7bb15

Browse files
committed
Fix a cwd issues when using Neomake
All credit to @blueyed . This fixes #260 The investigation is in the corresponding Neomake issue: neomake/neomake#2080 This is also related to: #259
1 parent b7fc97c commit ef7bb15

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

autoload/rustfmt.vim

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,8 +146,8 @@ function! s:RunRustfmt(command, tmpname, fail_silently)
146146
let l:content = readfile(a:tmpname)
147147
endif
148148

149-
call writefile(l:content, expand('%'))
150-
silent edit!
149+
normal! ggdG
150+
call setline(1, l:content)
151151
let &syntax = &syntax
152152

153153
" only clear location list if it was previously filled to prevent

0 commit comments

Comments
 (0)