Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrey Loskutov2019-10-02 15:08:19 +0000
committerAndrey Loskutov2019-10-02 15:08:19 +0000
commit5ee53a6e8729cb12dc968b1c2018579c2d008a8d (patch)
tree270bbcaa0a9137f91b0dd214d2392c516337f79c
parentf369f0ecbf7c9f4709a251bd7f3f1ad1508e11d8 (diff)
downloadeclipse.platform.text-5ee53a6e8729cb12dc968b1c2018579c2d008a8d.tar.gz
eclipse.platform.text-5ee53a6e8729cb12dc968b1c2018579c2d008a8d.tar.xz
eclipse.platform.text-5ee53a6e8729cb12dc968b1c2018579c2d008a8d.zip
Bug 550486 - Text editor status line shows selection size even after
disabling the preference Change-Id: I30e2a1e28b8fe03b2e6322e888577f57c98dc470 Signed-off-by: Andrey Loskutov <loskutov@gmx.de>
-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 267c21201e4..cf5f1f3b37b 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