summaryrefslogtreecommitdiffstats
path: root/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets
diff options
context:
space:
mode:
authorFelipe Heidrich <fheidric>2011-03-23 19:14:54 +0000
committerFelipe Heidrich <fheidric>2011-03-23 19:14:54 +0000
commit55a22ab9240db91b3cefd3f1694927c9a71b6ad8 (patch)
treec0f0d91992237f5677665cfd409ce5b6dca0efc7 /bundles/org.eclipse.swt/Eclipse SWT Custom Widgets
parent56201926f64ad6ea7f48b4affd1bb7e12a2c8db2 (diff)
downloadeclipse.platform.swt-55a22ab9240db91b3cefd3f1694927c9a71b6ad8.tar.gz
eclipse.platform.swt-55a22ab9240db91b3cefd3f1694927c9a71b6ad8.tar.xz
eclipse.platform.swt-55a22ab9240db91b3cefd3f1694927c9a71b6ad8.zip
Bug 65899 - [StyledText] StyledText Supplementary/Surrogate character navigation
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, 4 insertions, 2 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 2cc14aabe2..5a3ed517c8 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
@@ -5419,7 +5419,8 @@ Point getPointAtOffset(int offset) {
TextLayout layout = renderer.getTextLayout(lineIndex);
if (lineLength != 0 && offsetInLine <= lineLength) {
if (offsetInLine == lineLength) {
- point = layout.getLocation(offsetInLine - 1, true);
+ offsetInLine = layout.getPreviousOffset(offsetInLine, SWT.MOVEMENT_CLUSTER);
+ point = layout.getLocation(offsetInLine, true);
} else {
switch (caretAlignment) {
case OFFSET_LEADING:
@@ -5430,7 +5431,8 @@ Point getPointAtOffset(int offset) {
if (offsetInLine == 0) {
point = layout.getLocation(offsetInLine, false);
} else {
- point = layout.getLocation(offsetInLine - 1, true);
+ offsetInLine = layout.getPreviousOffset(offsetInLine, SWT.MOVEMENT_CLUSTER);
+ point = layout.getLocation(offsetInLine, true);
}
break;
}