Bug 511664 - Copy/paste of entire line indents the next line

As editor auto indents lines trim the text on paste to keep consistent
formatting

Change-Id: I40fbc25ab7091858a4c4f1040f115db3aac7bee0
Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
diff --git a/plugins/org.eclipse.dltk.sh.ui/src/org/eclipse/dltk/sh/internal/ui/text/ScriptAutoIndentStrategy.java b/plugins/org.eclipse.dltk.sh.ui/src/org/eclipse/dltk/sh/internal/ui/text/ScriptAutoIndentStrategy.java
index e6815fd..19d73b7 100644
--- a/plugins/org.eclipse.dltk.sh.ui/src/org/eclipse/dltk/sh/internal/ui/text/ScriptAutoIndentStrategy.java
+++ b/plugins/org.eclipse.dltk.sh.ui/src/org/eclipse/dltk/sh/internal/ui/text/ScriptAutoIndentStrategy.java
@@ -58,6 +58,10 @@
 			smartIndentAfterNewLine(d, c);
 		} else if ((c.text.length() == 1) && !c.text.equals("#")) {
 			smartIndentAfterKeypress(d, c);
+		} else if (c.text.length() > 1) {
+			// as editor auto indents lines trim the text on paste to keep consistent
+			// formatting
+			c.text = c.text.trim();
 		}
 	}