Przeglądaj źródła

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 12 lat temu
rodzic
commit
a5a676e609
1 zmienionych plików z 2 dodań i 1 usunięć
  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)