diff options
author | Lakshmi Shanmugam | 2022-01-15 01:21:24 +0000 |
---|---|---|
committer | Lakshmi P Shanmugam | 2022-01-17 10:53:55 +0000 |
commit | 90cbe076efa34f36dd8fb9253f33411416433751 (patch) | |
tree | fb08fb137a946b6e7add4583f3b2dbea1d150ce7 | |
parent | 963a3bb9165ccb4ec01ba4cb5fa5ea1b1af564fd (diff) | |
download | eclipse.platform.swt-90cbe076efa34f36dd8fb9253f33411416433751.tar.gz eclipse.platform.swt-90cbe076efa34f36dd8fb9253f33411416433751.tar.xz eclipse.platform.swt-90cbe076efa34f36dd8fb9253f33411416433751.zip |
Bug 575689 - Print selection from editor does not stop
selection[0].y is the end offset, use it as is for computing endLine.
Change-Id: I953d7f07cedecb0776802dbe9b9d6a553be1b6d6
Reviewed-on: https://git.eclipse.org/r/c/platform/eclipse.platform.swt/+/189699
Tested-by: Lakshmi P Shanmugam <lshanmug@in.ibm.com>
Reviewed-by: Lakshmi P Shanmugam <lshanmug@in.ibm.com>
-rw-r--r-- | bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StyledText.java | 2 |
1 files changed, 1 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 ba447ef750..a3fed244b6 100644 --- 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 @@ -459,7 +459,7 @@ public class StyledText extends Canvas { } else if (scope == PrinterData.SELECTION) { startLine = content.getLineAtOffset(selection[0].x); if (selection[0].y > 0) { - endLine = content.getLineAtOffset(selection[0].x + selection[0].y - 1); + endLine = content.getLineAtOffset(selection[0].y); } else { endLine = startLine - 1; } |