Kaydet (Commit) d7f1ca82 authored tarafından Andreas Heinisch's avatar Andreas Heinisch Kaydeden (comit) Samuel Mehrbrodt

tdf#97635 Added unindentation using shift-tab (mimicked eclipse behavior)

Restored java 6 compatibility

Change-Id: I550920457874b9261bdde07040aad8f7b67773d8
Reviewed-on: https://gerrit.libreoffice.org/72671Reviewed-by: 's avatarSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Tested-by: 's avatarSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
üst bbe1ede0
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment