summaryrefslogtreecommitdiffstats
path: root/bundles
diff options
context:
space:
mode:
authorFelipe Heidrich <fheidric>2009-05-20 16:23:06 +0000
committerFelipe Heidrich <fheidric>2009-05-20 16:23:06 +0000
commitfcc2c15cc10d54f6a982edb736f79da488fd31af (patch)
treead66a7cfd421c5dc496fc593fa0bfebee9dd1d67 /bundles
parente11f5e8cc2f80e3e4afcce1f4e76f7d43f622155 (diff)
downloadeclipse.platform.swt-fcc2c15cc10d54f6a982edb736f79da488fd31af.tar.gz
eclipse.platform.swt-fcc2c15cc10d54f6a982edb736f79da488fd31af.tar.xz
eclipse.platform.swt-fcc2c15cc10d54f6a982edb736f79da488fd31af.zip
Bug 276854: BlockSelection: Shift+Click does not work with normal caret
Diffstat (limited to 'bundles')
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StyledText.java8
1 files changed, 7 insertions, 1 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 54c2b8f131..c6001de273 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
@@ -2749,7 +2749,13 @@ void doMouseLocationChange(int x, int y, boolean select) {
}
return;
} else {
- if (!select) clearBlockSelection(true, false);
+ if (select) {
+ if (blockXLocation == -1) {
+ setBlockSelectionOffset(caretOffset, false);
+ }
+ } else {
+ clearBlockSelection(true, false);
+ }
int[] trailing = new int[1];
int offset = getOffsetAtPoint(x, y, trailing, true);
if (offset != -1) {