branch: elpa/jinja2-mode
commit 06771de3e8a08c6efdc8af67d3bf97e6cf26b188
Merge: 487b95f0d4 c2d801ad8e
Author: Mounier Florian <[email protected]>
Commit: Mounier Florian <[email protected]>

    Merge pull request #2 from amirouche/HEAD
    
    fix indentation bug
---
 jinja2-mode.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/jinja2-mode.el b/jinja2-mode.el
index dc1ca54a0a..84ef448e30 100644
--- a/jinja2-mode.el
+++ b/jinja2-mode.el
@@ -227,8 +227,8 @@
 
 (defun jinja2-calculate-indent-backward (default)
   "Return indent column based on previous lines"
-  (forward-line -1)
   (let ((indent-width sgml-basic-offset) (default (sgml-indent-line-num)))
+    (forward-line -1)
     (if (looking-at "^[ \t]*{% *end") ; Don't indent after end
        (current-indentation)
       (if (looking-at (concat "^[ \t]*{% *.*?{% *end" (regexp-opt 
(jinja2-indenting-keywords))))

Reply via email to