浏览代码

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 年之前
父节点
当前提交
321b119c44
共有 1 个文件被更改,包括 1 次插入1 次删除
  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))