浏览代码

org-table: Fix infloop

* lisp/org-table.el (org-table-current-dline): Fix infloop when point
  is at the end of of buffer.
Nicolas Goaziou 7 年之前
父节点
当前提交
4ea393e562
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      lisp/org-table.el

+ 1 - 1
lisp/org-table.el

@@ -1335,7 +1335,7 @@ Only data lines count for this."
     (org-table-check-inside-data-field))
     (org-table-check-inside-data-field))
   (save-excursion
   (save-excursion
     (let ((c 0)
     (let ((c 0)
-	  (pos (point)))
+	  (pos (line-beginning-position)))
       (goto-char (org-table-begin))
       (goto-char (org-table-begin))
       (while (<= (point) pos)
       (while (<= (point) pos)
 	(when (looking-at org-table-dataline-regexp) (cl-incf c))
 	(when (looking-at org-table-dataline-regexp) (cl-incf c))