mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
remove unreachable code
This commit is contained in:
@@ -431,22 +431,6 @@ public class CaretImpl extends UserDataHolderBase implements Caret {
|
||||
|
||||
Document doc = myEditor.getDocument();
|
||||
|
||||
if (column < 0) {
|
||||
if (debugBuffer != null) {
|
||||
debugBuffer.append("Resetting target logical column to zero as it is negative (").append(column).append(")\n");
|
||||
}
|
||||
column = 0;
|
||||
softWrapColumns = 0;
|
||||
}
|
||||
if (line < 0) {
|
||||
if (debugBuffer != null) {
|
||||
debugBuffer.append("Resetting target logical line to zero as it is negative (").append(line).append(")\n");
|
||||
}
|
||||
line = 0;
|
||||
softWrapLinesBefore = 0;
|
||||
softWrapLinesCurrent = 0;
|
||||
}
|
||||
|
||||
int lineCount = doc.getLineCount();
|
||||
if (lineCount == 0) {
|
||||
if (debugBuffer != null) {
|
||||
@@ -645,10 +629,6 @@ public class CaretImpl extends UserDataHolderBase implements Caret {
|
||||
int column = pos.column;
|
||||
int line = pos.line;
|
||||
|
||||
if (column < 0) column = 0;
|
||||
|
||||
if (line < 0) line = 0;
|
||||
|
||||
int lastLine = myEditor.getVisibleLineCount() - 1;
|
||||
if (lastLine <= 0) {
|
||||
lastLine = 0;
|
||||
|
||||
@@ -4097,14 +4097,6 @@ public final class EditorImpl extends UserDataHolderBase implements EditorEx, Hi
|
||||
int softWrapLinesOnTargetLogicalLine = pos.softWrapLinesOnCurrentLogicalLine;
|
||||
int softWrapColumns = pos.softWrapColumnDiff;
|
||||
|
||||
if (line < 0) {
|
||||
line = 0;
|
||||
column = 0;
|
||||
softWrapLinesBeforeTargetLogicalLine = 0;
|
||||
softWrapLinesOnTargetLogicalLine = 0;
|
||||
softWrapColumns = 0;
|
||||
}
|
||||
|
||||
final int totalLines = myDocument.getLineCount();
|
||||
if (totalLines <= 0) {
|
||||
return new LogicalPosition(0, 0);
|
||||
|
||||
Reference in New Issue
Block a user