Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge branch 'master' of github.com:Kronuz/SublimeCodeIntel

  • Loading branch information...
commit 068d9c39ae4e0b106822f6c43a9dd307ce3394da 2 parents 252b868 + acceee2
@Kronuz Kronuz authored
Showing with 11 additions and 1 deletion.
  1. +11 −1 libs/codeintel2/lang_python.py
View
12 libs/codeintel2/lang_python.py
@@ -688,7 +688,7 @@ def trg_from_pos(self, pos, implicit=True):
print " last_char: %r" % last_char
# Quick out if the preceding char isn't a trigger char.
- if last_char not in " .(@_":
+ if last_char not in " .(@_,":
if DEBUG:
print "trg_from_pos: no: %r is not in ' .(@'_" % last_char
return None
@@ -961,6 +961,16 @@ def trg_from_pos(self, pos, implicit=True):
else:
if DEBUG: print "trg_from_pos: no: no chars preceding '('"
return None
+ elif last_char == ',':
+ working_text = accessor.text_range(max(0, last_pos - 200), last_pos)
+ line = self._last_logical_line(working_text).rstrip()
+ if line:
+ last_bracket = line.rfind("(")
+ pos = (pos - (len(line) - last_bracket))
+ return Trigger(self.lang, TRG_FORM_CALLTIP,
+ "call-signature", pos, implicit)
+ else:
+ return None
def _last_logical_line(self, text):
lines = text.splitlines(0) or ['']
Please sign in to comment.
Something went wrong with that request. Please try again.