File tree 1 file changed +11
-9
lines changed
1 file changed +11
-9
lines changed Original file line number Diff line number Diff line change @@ -129,17 +129,19 @@ function! go#fmt#update_file(source, target)
129
129
130
130
" the title information was introduced with 7.4-2200
131
131
" https://github.com/vim/vim/commit/d823fa910cca43fec3c31c030ee908a14c272640
132
- if ! has (' patch-7.4-2200' )
133
- return
134
- endif
135
-
136
- " clean up previous list
137
- let l: listtype = go#list#Type ( " GoFmt " )
138
- if l: listtype == " quickfix "
139
- let l: list_title = getqflist ({ ' title ' : 1 })
132
+ if has (' patch-7.4-2200' )
133
+ " clean up previous list
134
+ let l: listtype = go#list#Type ( " GoFmt " )
135
+ if l: listtype == " quickfix "
136
+ let l: list_title = getqflist ({ ' title ' : 1 })
137
+ else
138
+ let l: list_title = getloclist ( 0 , { ' title ' : 1 })
139
+ endif
140
140
else
141
- let l: list_title = getloclist (0 , {' title' : 1 })
141
+ " can't check the title, so assume that the list was for go fmt.
142
+ let l: list_title = {' title' : ' Format' }
142
143
endif
144
+
143
145
if has_key (l: list_title , " title" ) && l: list_title [' title' ] == " Format"
144
146
call go#list#Clean (l: listtype )
145
147
call go#list#Window (l: listtype )
You can’t perform that action at this time.
0 commit comments