better support for paste (1 line/text)
diff --git a/core/plugins/org.eclipse.dltk.console.ui/src/org/eclipse/dltk/console/ui/internal/ScriptConsoleViewer.java b/core/plugins/org.eclipse.dltk.console.ui/src/org/eclipse/dltk/console/ui/internal/ScriptConsoleViewer.java
index 02ce720..8cc69f2 100644
--- a/core/plugins/org.eclipse.dltk.console.ui/src/org/eclipse/dltk/console/ui/internal/ScriptConsoleViewer.java
+++ b/core/plugins/org.eclipse.dltk.console.ui/src/org/eclipse/dltk/console/ui/internal/ScriptConsoleViewer.java
@@ -564,9 +564,10 @@
 									clipboard.dispose();
 									if (text != null && text.length() > 0) {
 										if (text.indexOf("\n") == -1) {
-											int cp = getCaretPosition();
-											insertText(text);
-											setCaretOffset(cp + text.length());
+											Point selectedRange = getSelectedRange();
+											getTextWidget().insert(text);
+											setCaretOffset(selectedRange.x
+													+ text.length());
 
 										} else {
 											StringTokenizer tokenizer = new StringTokenizer(