Skip to content

Commit

Permalink
Fix a couple minor errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Eric West committed Jun 30, 2014
1 parent 6d0d010 commit 066f197
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions rsense_completions.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,16 +75,18 @@ def clean_and_arrange(self, output):
parsed = self._parse_output(self._sanitize_output(output).strip())

for line in parsed:
show_string = line[0] + "\t" + line[2] + "\t" + line[3]
compl = line[1]
completions.append((show_string, compl))
if len(line) >= 4:
show_string = line[0] + "\t" + line[2] + "\t" + line[3]
compl = line[0]
completions.append((show_string, compl))

return completions

# TODO: Filter completions for metadata returned by rsense.
def get_completions(self, view, text, location, path):
command_string = self.make_command(view, text, location, path)
raw_output = self.run_command(command_string)
# print(raw_output.decode('utf-8'))
return self.clean_and_arrange(raw_output)


Expand Down

0 comments on commit 066f197

Please sign in to comment.