mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
fixed PY-5199 Move statement: do not perform action with cursor on empty line
This commit is contained in:
+6
@@ -44,6 +44,12 @@ public class StatementMover extends LineMover {
|
||||
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)) {
|
||||
info.toMove2 = info.toMove;
|
||||
return true;
|
||||
}
|
||||
|
||||
//reset
|
||||
myStatementListToAddPass = null;
|
||||
|
||||
Reference in New Issue
Block a user