From c8257df3b63320ce26af7f101b12e2248b36ac62 Mon Sep 17 00:00:00 2001 From: TrianguloY Date: Fri, 5 Apr 2019 14:06:37 +0200 Subject: [PATCH] Remove intent even if less than defined size --- .../net/pierrox/lightning_launcher/util/Indentation.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/llx/app/src/main/java/net/pierrox/lightning_launcher/util/Indentation.java b/app/llx/app/src/main/java/net/pierrox/lightning_launcher/util/Indentation.java index 756a3ad..b2ec722 100644 --- a/app/llx/app/src/main/java/net/pierrox/lightning_launcher/util/Indentation.java +++ b/app/llx/app/src/main/java/net/pierrox/lightning_launcher/util/Indentation.java @@ -154,7 +154,7 @@ public class Indentation implements TextWatcher { * Changes the indentation of all the lines selected * @param posLeft start of selection * @param posRight end of selection - * @param increase if trur increase indent, descrease otherwise + * @param increase if true increase indent, decrease otherwise * @param editable where to apply the indentation * @return the new selection (may have changed due to the indentation changes) */ @@ -224,6 +224,9 @@ public class Indentation implements TextWatcher { } // no tabs found, only spaces, remove them editable.delete(beg - INDENT_SIZE, beg); + }else{ + // not enough indent (so no tabs), just remove all the previous spaces + editable.delete(beg - n, beg); } } }