From 56c1f2819e64feb5ffeca0f5ccd5464bb6147423 Mon Sep 17 00:00:00 2001 From: Ekaterina Tuzova Date: Fri, 11 Nov 2011 21:51:04 +0100 Subject: [PATCH] fixed PY-3814 Current parameter info: remove popup on moving cursor out of the parenthesis --- python/src/com/jetbrains/python/PyParameterInfoHandler.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/python/src/com/jetbrains/python/PyParameterInfoHandler.java b/python/src/com/jetbrains/python/PyParameterInfoHandler.java index 6df1c867ecfd..6c106bdbeda8 100644 --- a/python/src/com/jetbrains/python/PyParameterInfoHandler.java +++ b/python/src/com/jetbrains/python/PyParameterInfoHandler.java @@ -69,6 +69,11 @@ public class PyParameterInfoHandler implements ParameterInfoHandler 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;