Browse Source

org.el (org-fontify-meta-lines-and-blocks-1): Don't try to add text properties outside of the buffer

* org.el (org-fontify-meta-lines-and-blocks-1): Don't try to
add text properties outside of the buffer.

Thanks to Leo Liu for reporting this.
Bastien Guerry 5 years ago
parent
commit
08c2938e7d
1 changed files with 1 additions and 1 deletions
  1. 1 1
      lisp/org.el

+ 1 - 1
lisp/org.el

@@ -5420,7 +5420,7 @@ by a #."
 		 '(font-lock-fontified t invisible t)
 	       '(font-lock-fontified t face org-document-info-keyword)))
 	    (add-text-properties
-	     (match-beginning 6) (1+ (match-end 6))
+	     (match-beginning 6) (min (point-max) (1+ (match-end 6)))
 	     (if (string-equal dc1 "+title:")
 	    	 '(font-lock-fontified t face org-document-title)
 	       '(font-lock-fontified t face org-document-info))))