commit | 0fb4f7743645692ead1221a5f8f8853d13d745f9 | [log] [tgz] |
---|---|---|
author | Alexander Kurtakov <akurtako@redhat.com> | Thu May 25 13:22:24 2017 +0300 |
committer | Alexander Kurtakov <akurtako@redhat.com> | Thu May 25 13:25:25 2017 +0300 |
tree | 89eab28b588f625caa60b479aeb56d5edb6e6135 | |
parent | cad72c665066fb81457d7cee9ebea570c6d8790e [diff] |
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(); } }