File tree 1 file changed +10
-6
lines changed
1 file changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -166,16 +166,16 @@ def setBuffer(buffer):
166
166
lines = [line .encode ('utf-8' ) for line in lines ]
167
167
vim .current .buffer [:] = lines
168
168
169
- def build (ret ):
170
- response = json .loads (getResponse ('/build' , {}, 60 ))
169
+ def build ():
170
+ js = json .loads (getResponse ('/build' , {}, 60 ))
171
171
172
- success = response ["Success" ]
172
+ success = js ["Success" ]
173
173
if success :
174
174
print "Build succeeded"
175
175
else :
176
176
print "Build failed"
177
177
178
- return get_quickfix_list (js , 'QuickFixes' )
178
+ return quickfixes_from_js (js , 'QuickFixes' )
179
179
180
180
def buildcommand ():
181
181
vim .command ("let b:buildcommand = '%s'" % getResponse ('/buildcommand' ))
@@ -227,8 +227,12 @@ def findSymbols():
227
227
def get_quickfix_list (js , key ):
228
228
if js != '' :
229
229
response = json .loads (js )
230
- if response [key ] is not None :
231
- return quickfixes_from_response (response [key ])
230
+ return quickfixes_from_js (response , key )
231
+ return [];
232
+
233
+ def quickfixes_from_js (js , key ):
234
+ if js [key ] is not None :
235
+ return quickfixes_from_response (js [key ])
232
236
return [];
233
237
234
238
def quickfixes_from_response (response ):
You can’t perform that action at this time.
0 commit comments