Skip to content

Commit

Permalink
Merge pull request #1365 from fatih/fix-gofmt-list
Browse files Browse the repository at this point in the history
fmt.vim: default to quickfix list for showing errors
  • Loading branch information
fatih authored Jul 22, 2017
2 parents d5979c9 + e4e992a commit cc28ff6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions autoload/go/fmt.vim
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ function! go#fmt#update_file(source, target)
let &syntax = &syntax

" clean up previous location list
let l:listtype = "locationlist"
let l:listtype = go#list#Type("quickfix")
call go#list#Clean(l:listtype)
call go#list#Window(l:listtype)
endfunction
Expand Down Expand Up @@ -228,7 +228,7 @@ endfunction
" show_errors opens a location list and shows the given errors. If the given
" errors is empty, it closes the the location list
function! s:show_errors(errors) abort
let l:listtype = go#list#Type("locationlist")
let l:listtype = go#list#Type("quickfix")
if !empty(a:errors)
call go#list#Populate(l:listtype, a:errors, 'Format')
echohl Error | echomsg "Gofmt returned error" | echohl None
Expand Down
2 changes: 1 addition & 1 deletion doc/vim-go.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1129,7 +1129,7 @@ The dictionary version allows you to define options for multiple binaries:
<
*'g:go_fmt_fail_silently'*

Use this option to disable showing a location list when |'g:go_fmt_command'|
Use this option to disable showing a quickfix list when |'g:go_fmt_command'|
fails. By default the location list is shown. >
let g:go_fmt_fail_silently = 0
Expand Down

0 comments on commit cc28ff6

Please sign in to comment.