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;