forked from mirrors/org-mode
org-table: Fix freeze with invalid hline reference
* lisp/org-table.el (org-table-find-row-type): Don't end up on the
last hline, which doesn't exist, per
e793158bc8
.
Reported-by: Artis Rozentāls <artis.rozentals@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/93654>
This commit is contained in:
parent
1853fb546d
commit
44744bba2c
|
@ -3017,10 +3017,13 @@ and TABLE is a vector with line types."
|
||||||
nil))
|
nil))
|
||||||
t)))
|
t)))
|
||||||
(setq n (1- n)))
|
(setq n (1- n)))
|
||||||
(if (or (< i 0) (>= i l))
|
(cond ((or (< i 0) (>= i l))
|
||||||
(user-error "Row descriptor %s used in line %d leads outside table"
|
(user-error "Row descriptor %s used in line %d leads outside table"
|
||||||
desc cline)
|
desc cline))
|
||||||
i)))
|
;; The last hline doesn't exist. Instead, point to last row
|
||||||
|
;; in table.
|
||||||
|
((= i (1- l)) (1- i))
|
||||||
|
(t i))))
|
||||||
|
|
||||||
(defun org-table--error-on-old-row-references (s)
|
(defun org-table--error-on-old-row-references (s)
|
||||||
(when (string-match "&[-+0-9I]" s)
|
(when (string-match "&[-+0-9I]" s)
|
||||||
|
|
Loading…
Reference in a new issue