diff options
author | Felipe Heidrich <fheidric> | 2011-03-23 19:14:54 +0000 |
---|---|---|
committer | Felipe Heidrich <fheidric> | 2011-03-23 19:14:54 +0000 |
commit | 55a22ab9240db91b3cefd3f1694927c9a71b6ad8 (patch) | |
tree | c0f0d91992237f5677665cfd409ce5b6dca0efc7 /bundles/org.eclipse.swt/Eclipse SWT Custom Widgets | |
parent | 56201926f64ad6ea7f48b4affd1bb7e12a2c8db2 (diff) | |
download | eclipse.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-x | bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StyledText.java | 6 |
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; } |