IDEA-86397 Delete line (Ctrl+Y) moves caret to the 1st column position

Typos are corrected
This commit is contained in:
Denis.Zhdanov
2012-06-25 11:02:48 +04:00
parent adb048e816
commit 5bfab8db02
2 changed files with 3 additions and 3 deletions
@@ -86,7 +86,7 @@ public class DuplicateAction extends EditorAction {
int newOffset = end + offset - start;
if(lineToCheck == document.getLineCount () /* empty document */
|| nextLineStart.line == document.getLineCount() - 1 /* last line*/
|| lineStart.line == document.getLineCount() - 1 /* last line*/
|| document.getLineSeparatorLength(lineToCheck) == 0)
{
s = "\n"+s;
@@ -720,9 +720,9 @@ public class EditorUtil {
second = new LogicalPosition(line + 1, 0);
break;
}
final int foldEndLine = document.getLineNumber(foldRegion.getStartOffset());
final int foldEndLine = document.getLineNumber(foldRegion.getEndOffset());
if (foldEndLine <= line) {
first = new LogicalPosition(line + 1, 0);
second = new LogicalPosition(line + 1, 0);
break;
}
line = foldEndLine;