Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorteicher2004-04-13 16:40:37 +0000
committerteicher2004-04-13 16:40:37 +0000
commit36ba70260d73af9ecb70c0959b833e7accf35992 (patch)
treea0e817175a6f21ceed3138488d970bfe0531558a
parentdc2c7545732aec320ba95ac610087bd3f816fc85 (diff)
downloadeclipse.platform.text-36ba70260d73af9ecb70c0959b833e7accf35992.tar.gz
eclipse.platform.text-36ba70260d73af9ecb70c0959b833e7accf35992.tar.xz
eclipse.platform.text-36ba70260d73af9ecb70c0959b833e7accf35992.zip
explicitly set caret (see bug 42922 comment 25)v20040413a
-rw-r--r--org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/AbstractTextEditor.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/AbstractTextEditor.java b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/AbstractTextEditor.java
index fb1f8a3af..329c1f511 100644
--- a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/AbstractTextEditor.java
+++ b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/AbstractTextEditor.java
@@ -4539,7 +4539,7 @@ public abstract class AbstractTextEditor extends EditorPart implements ITextEdit
// XXX this overwrite box is not proportiona-font aware
// take 'a' as a medium sized character
Point charSize= gc.stringExtent("a"); //$NON-NLS-1$
- caret.setSize(charSize.x, caret.getSize().y);
+ caret.setSize(charSize.x, styledText.getLineHeight());
gc.dispose();
return caret;
@@ -4548,7 +4548,7 @@ public abstract class AbstractTextEditor extends EditorPart implements ITextEdit
private Caret createInsertCaret(StyledText styledText) {
Caret caret= new Caret(styledText, SWT.NULL);
int width= getPreferenceStore().getBoolean(PREFERENCE_WIDE_CARET) ? WIDE_CARET_WIDTH : SINGLE_CARET_WIDTH;
- caret.setSize(width, caret.getSize().y);
+ caret.setSize(width, styledText.getLineHeight());
return caret;
}
@@ -4588,7 +4588,7 @@ public abstract class AbstractTextEditor extends EditorPart implements ITextEdit
if (image != null)
caret.setImage(image);
else
- caret.setSize(width, caret.getSize().y);
+ caret.setSize(width, styledText.getLineHeight());
return caret;
}

Back to the top