Browse Source

org.el: Fix `org-indent-region' bug in source block

* lisp/org.el (org-indent-region): Use `save-window-excursion'
to restore point after indenting region in source blocks.

Thanks to Gustavo Barros for reporting this bug.
Bastien 5 years ago
parent
commit
321b119c44
1 changed files with 1 additions and 1 deletions
  1. 1 1
      lisp/org.el

+ 1 - 1
lisp/org.el

@@ -19280,7 +19280,7 @@ indent.  The function will not indent contents of example blocks,
 verse blocks and export blocks as leading white spaces are
 verse blocks and export blocks as leading white spaces are
 assumed to be significant there."
 assumed to be significant there."
   (interactive "r")
   (interactive "r")
-  (save-excursion
+  (save-window-excursion
     (goto-char start)
     (goto-char start)
     (skip-chars-forward " \r\t\n")
     (skip-chars-forward " \r\t\n")
     (unless (eobp) (beginning-of-line))
     (unless (eobp) (beginning-of-line))