瀏覽代碼

org-table: Fix `org-table-next-row' at eob

* lisp/org-table.el (org-table-next-row): Fix misbehaviour when called
  on the last row, at the end of the buffer, without a final newline.
Nicolas Goaziou 5 年之前
父節點
當前提交
0553f2e31c
共有 1 個文件被更改,包括 1 次插入0 次删除
  1. 1 0
      lisp/org-table.el

+ 1 - 0
lisp/org-table.el

@@ -1081,6 +1081,7 @@ Before doing so, re-align the table if necessary."
       (org-table-align))
   (let ((col (org-table-current-column)))
     (beginning-of-line 2)
+    (unless (bolp) (insert "\n"))	;missing newline at eob
     (when (or (not (org-at-table-p))
 	      (org-at-table-hline-p))
       (beginning-of-line 0)