Skip to content

Commit 69a43ce

Browse files
committed
Merge pull request #212 from jtbm37/master
Fixed OmniSharpBuild function which was not parsing result correctly
2 parents b67985b + e16fd35 commit 69a43ce

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

python/OmniSharp.py

+10-6
Original file line numberDiff line numberDiff line change
@@ -166,16 +166,16 @@ def setBuffer(buffer):
166166
lines = [line.encode('utf-8') for line in lines]
167167
vim.current.buffer[:] = lines
168168

169-
def build(ret):
170-
response = json.loads(getResponse('/build', {}, 60))
169+
def build():
170+
js = json.loads(getResponse('/build', {}, 60))
171171

172-
success = response["Success"]
172+
success = js["Success"]
173173
if success:
174174
print "Build succeeded"
175175
else:
176176
print "Build failed"
177177

178-
return get_quickfix_list(js, 'QuickFixes')
178+
return quickfixes_from_js(js, 'QuickFixes')
179179

180180
def buildcommand():
181181
vim.command("let b:buildcommand = '%s'" % getResponse('/buildcommand'))
@@ -227,8 +227,12 @@ def findSymbols():
227227
def get_quickfix_list(js, key):
228228
if js != '':
229229
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])
232236
return [];
233237

234238
def quickfixes_from_response(response):

0 commit comments

Comments
 (0)