fixed PY-3814 Current parameter info: remove popup on moving cursor out of the parenthesis

This commit is contained in:
Ekaterina Tuzova
2011-11-11 21:51:04 +01:00
parent 7cddecd039
commit 56c1f2819e
@@ -69,6 +69,11 @@ public class PyParameterInfoHandler implements ParameterInfoHandler<PyArgumentLi
// align offset to nearest expression; context may point to a space, etc.
List<PyExpression> flat_args = PyUtil.flattenedParensAndLists(arglist.getArguments());
int alleged_cursor_offset = context.getOffset(); // this is already shifted backwards to skip spaces
if (!arglist.getTextRange().contains(alleged_cursor_offset)) {
context.removeHint();
return;
}
PsiFile file = context.getFile();
CharSequence chars = file.getViewProvider().getContents();
int offset = -1;