浏览代码

org-table.el (org-table-copy-down): Don't move cursor when getting the field

* org-table.el (org-table-copy-down): Don't move cursor when
getting the field.

This prevents the point from moving when inadvertently calling
S-RET outside of a table.
Bastien Guerry 12 年之前
父节点
当前提交
9ac7fabb46
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      lisp/org-table.el

+ 1 - 1
lisp/org-table.el

@@ -1118,7 +1118,7 @@ copying.  In the case of a timestamp, increment by one day."
   (interactive "p")
   (interactive "p")
   (let* ((colpos (org-table-current-column))
   (let* ((colpos (org-table-current-column))
 	 (col (current-column))
 	 (col (current-column))
-	 (field (org-table-get-field))
+	 (field (save-excursion (org-table-get-field)))
 	 (non-empty (string-match "[^ \t]" field))
 	 (non-empty (string-match "[^ \t]" field))
 	 (beg (org-table-begin))
 	 (beg (org-table-begin))
 	 (orig-n n)
 	 (orig-n n)