diff options
author | Felipe Heidrich <Felipe_Heidrich@ca.ibm.com> | 2012-01-16 11:28:33 -0500 |
---|---|---|
committer | Felipe Heidrich <Felipe_Heidrich@ca.ibm.com> | 2012-01-16 11:28:33 -0500 |
commit | 663ad5c7f54209a8b60ed32a953bece16acebea0 (patch) | |
tree | c274013a7fa1317840e864fbf9ac57d18d904678 /bundles/org.eclipse.swt/Eclipse SWT Custom Widgets | |
parent | 1bccd9551405353b093a48e5b41738e24b6850d6 (diff) | |
download | eclipse.platform.swt-663ad5c7f54209a8b60ed32a953bece16acebea0.tar.gz eclipse.platform.swt-663ad5c7f54209a8b60ed32a953bece16acebea0.tar.xz eclipse.platform.swt-663ad5c7f54209a8b60ed32a953bece16acebea0.zip |
Bug 368417 - When you try to move cursor up/down with arrow keys in a multiline StyledText with word wrapping and nonzero margins, cursor may freeze and pressing up/down keys has no effect.
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT Custom Widgets')
-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 8001a64cdc..edb5b6a6b1 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 @@ -5281,7 +5281,7 @@ int getVisualLineIndex(TextLayout layout, int offsetInLine) { int[] offsets = layout.getLineOffsets(); if (lineIndex != 0 && offsetInLine == offsets[lineIndex]) { int lineY = layout.getLineBounds(lineIndex).y; - int caretY = getCaret().getLocation().y - topMargin - getLinePixel(getCaretLine()); + int caretY = getCaret().getLocation().y - getLinePixel(getCaretLine()); if (lineY > caretY) lineIndex--; caretAlignment = OFFSET_LEADING; } |