Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/AbstractTextEditor.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/AbstractTextEditor.java b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/AbstractTextEditor.java
index 267c21201..cf5f1f3b3 100644
--- a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/AbstractTextEditor.java
+++ b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/AbstractTextEditor.java
@@ -6753,8 +6753,8 @@ public abstract class AbstractTextEditor extends EditorPart implements ITextEdit
boolean showOffset = getPreferenceStore().getBoolean(PREFERENCE_SHOW_CARET_OFFSET);
Point selectedRange = fSourceViewer.getSelectedRange();
int selectionLength = selectedRange != null ? selectedRange.y : 0;
- fOffsetLabel.fValue = selectionLength == 0 ? caret : selectionLength;
showSelection = showSelection && selectionLength > 0;
+ fOffsetLabel.fValue = showSelection ? selectionLength : caret;
if (!showSelection) {
if (!showOffset) {
// shows line : column

Back to the top