Don't invoke PythonEnterHandler.postProcessEnter() on non-Python files

This commit is contained in:
Rustam Vishnyakov
2016-04-27 19:28:21 +03:00
parent dd3ad89561
commit e7e215c31f
@@ -358,6 +358,9 @@ public class PythonEnterHandler extends EnterHandlerDelegateAdapter {
public Result postProcessEnter(@NotNull PsiFile file,
@NotNull Editor editor,
@NotNull DataContext dataContext) {
if (!(file instanceof PyFile)) {
return Result.Continue;
}
if (myPostprocessShift > 0) {
editor.getCaretModel().moveCaretRelatively(myPostprocessShift, 0, false, false, false);
myPostprocessShift = 0;