Skip to content

Commit

Permalink
Merge pull request #1407 from fatih/fix-autoclose-gofmt
Browse files Browse the repository at this point in the history
fmt.vim: only close quickfix if its belongs to gofmt
  • Loading branch information
fatih authored Aug 13, 2017
2 parents dfd8604 + a9ad6b3 commit 9a433e5
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions autoload/go/fmt.vim
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,12 @@ function! go#fmt#update_file(source, target)
let &syntax = &syntax

" clean up previous location list
let l:listtype = go#list#Type("quickfix")
call go#list#Clean(l:listtype)
call go#list#Window(l:listtype)
let l:list_title = getqflist({'title': 1})
if has_key(l:list_title, "title") && l:list_title['title'] == "Format"
let l:listtype = go#list#Type("quickfix")
call go#list#Clean(l:listtype)
call go#list#Window(l:listtype)
endif
endfunction

" run runs the gofmt/goimport command for the given source file and returns
Expand Down

0 comments on commit 9a433e5

Please sign in to comment.