From da8e4ad1347fad6ff09c48e2bd300cf90678a711 Mon Sep 17 00:00:00 2001 From: Ekaterina Tuzova Date: Thu, 5 Apr 2012 16:03:55 +0400 Subject: [PATCH] fixed not moving statements in case of selection --- .../codeInsight/editorActions/moveUpDown/StatementMover.java | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/python/src/com/jetbrains/python/codeInsight/editorActions/moveUpDown/StatementMover.java b/python/src/com/jetbrains/python/codeInsight/editorActions/moveUpDown/StatementMover.java index d3c966bcb4ef..f87851ce00b0 100644 --- a/python/src/com/jetbrains/python/codeInsight/editorActions/moveUpDown/StatementMover.java +++ b/python/src/com/jetbrains/python/codeInsight/editorActions/moveUpDown/StatementMover.java @@ -48,10 +48,7 @@ public class StatementMover extends LineMover { public boolean checkAvailable(@NotNull Editor editor, @NotNull PsiFile file, @NotNull MoveInfo info, boolean down) { if (!(file instanceof PyFile)) return false; init(editor, info, down); - // Do not move in case of selection - if (editor.getSelectionModel().hasSelection()){ - return false; - } + Document document = editor.getDocument(); String lineToMove = document.getText(new TextRange(getLineStartSafeOffset(document, info.toMove.startLine), getLineStartSafeOffset(document, info.toMove.endLine))); if (StringUtil.isEmptyOrSpaces(lineToMove)) {