Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFelipe Heidrich2011-02-17 16:35:02 +0000
committerFelipe Heidrich2011-02-17 16:35:02 +0000
commit937921e5fbaf3b529c910374057856df248c8d7c (patch)
tree436437703a6fe4f07406db4101ed2f2a493b989c /bundles/org.eclipse.swt/Eclipse SWT Custom Widgets
parentea83c60fcef135c7581a4e455adc295164481ce2 (diff)
downloadeclipse.platform.swt-937921e5fbaf3b529c910374057856df248c8d7c.tar.gz
eclipse.platform.swt-937921e5fbaf3b529c910374057856df248c8d7c.tar.xz
eclipse.platform.swt-937921e5fbaf3b529c910374057856df248c8d7c.zip
Bug 101654 - [typing] [Ctrl+] Home/End doesn't reveal caret if already at position
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT Custom Widgets')
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StyledText.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StyledText.java b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StyledText.java
index b149ccfa7b..430f46ceb3 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StyledText.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StyledText.java
@@ -2476,7 +2476,7 @@ void doContentEnd() {
* Moves the caret in front of the first character of the widget content.
*/
void doContentStart() {
- if (caretOffset > 0) {
+ if (caretOffset >= 0) {
setCaretOffset(0, SWT.DEFAULT);
showCaret();
}
@@ -2633,7 +2633,7 @@ void doLineEnd() {
int lineLength = content.getLine(caretLine).length();
lineEndOffset = lineOffset + lineLength;
}
- if (caretOffset < lineEndOffset) {
+ if (caretOffset <= lineEndOffset) {
setCaretOffset(lineEndOffset, PREVIOUS_OFFSET_TRAILING);
showCaret();
}
@@ -2652,7 +2652,7 @@ void doLineStart() {
lineOffset += offsets[lineIndex];
renderer.disposeTextLayout(layout);
}
- if (caretOffset > lineOffset) {
+ if (caretOffset >= lineOffset) {
setCaretOffset(lineOffset, OFFSET_LEADING);
showCaret();
}

Back to the top