Commits

Ali Gholami Rudi  committed 5b4f74b

rope-show-calltip: using the offset before '('

  • Participants
  • Parent commits 2346849

Comments (0)

Files changed (1)

File ropemacs/interface.py

     def show_calltip(self, prefix):
         self._check_project()
         def _get_doc(project, text, offset, *args, **kwds):
-            offset = text.rindex('(', 0, offset)
+            try:
+                offset = text.rindex('(', 0, offset) - 1
+            except ValueError:
+                return None
             return codeassist.get_calltip(project, text, offset, *args, **kwds)
         self._base_show_doc(prefix, _get_doc)