scripting/java/com/sun/star/script/framework/provider/beanshell/PlainSourceView.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
New commits: commit d7f1ca82198e1cc73fe4bb38f3034c6dc110af83 Author: Andreas Heinisch <andreas.heini...@yahoo.de> AuthorDate: Tue May 21 11:14:04 2019 +0200 Commit: Samuel Mehrbrodt <samuel.mehrbr...@cib.de> CommitDate: Tue May 21 12:39:43 2019 +0200 tdf#97635 Added unindentation using shift-tab (mimicked eclipse behavior) Restored java 6 compatibility Change-Id: I550920457874b9261bdde07040aad8f7b67773d8 Reviewed-on: https://gerrit.libreoffice.org/72671 Reviewed-by: Samuel Mehrbrodt <samuel.mehrbr...@cib.de> Tested-by: Samuel Mehrbrodt <samuel.mehrbr...@cib.de> diff --git a/scripting/java/com/sun/star/script/framework/provider/beanshell/PlainSourceView.java b/scripting/java/com/sun/star/script/framework/provider/beanshell/PlainSourceView.java index cc1e22ee21e7..b2a4dd61c243 100644 --- a/scripting/java/com/sun/star/script/framework/provider/beanshell/PlainSourceView.java +++ b/scripting/java/com/sun/star/script/framework/provider/beanshell/PlainSourceView.java @@ -63,7 +63,7 @@ public class PlainSourceView extends JScrollPane implements UndoManager undoManager; private List<UnsavedChangesListener> unsavedListener = new ArrayList<UnsavedChangesListener>(); - private static final Pattern tabPattern = Pattern.compile("^ *(?<tab>\\t)"); + private static final Pattern tabPattern = Pattern.compile("^ *(\\t)"); public PlainSourceView(ScriptSourceModel model) { this.model = model; @@ -186,7 +186,7 @@ public class PlainSourceView extends JScrollPane implements Matcher matcher = tabPattern.matcher(ta.getText(startOffset, endOffset - startOffset)); if (matcher.find()) { - ta.replaceRange(null, startOffset + matcher.start("tab"), startOffset + matcher.end("tab")); + ta.replaceRange(null, startOffset + matcher.start(1), startOffset + matcher.end(1)); } } catch (BadLocationException e) { // could not find correct location of the tab _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits