Browse Source

org-element.el (org-element-context): Prevent an error when getting the context of a table rule

* org-element.el (org-element-context): Prevent an error when
getting the context of a table rule.

Thanks to Eric Abrahamsen for reporting this bug.
Bastien Guerry 4 years ago
parent
commit
a5a676e609
1 changed files with 2 additions and 1 deletions
  1. 2 1
      lisp/org-element.el

+ 2 - 1
lisp/org-element.el

@@ -4751,7 +4751,8 @@ Providing it allows for quicker computation."
 				    :contents-begin element))
 			     (cend (org-element-property
 				    :contents-end element)))
-			 (and (>= origin cbeg)
+			 (and cbeg cend ; cbeg is nil for table rules
+			      (>= origin cbeg)
 			      (<= origin cend)
 			      (progn (goto-char cbeg) (setq end cend)))))
 		  (and (eq type 'keyword)