summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRafael Laboissiere <rafael@laboissiere.net>2016-01-23 00:16:56 +0100
committerRafael Laboissiere <rafael@laboissiere.net>2016-01-23 00:43:01 +0100
commit860bcfbf9387297df7b776445c31876925e9d561 (patch)
tree013f587e78d34211672cec8e724412a379457418
parent3bf19b30f06a32b6ad75b368f8c51be69c53fa3f (diff)
downloadorg-mode-860bcfbf9387297df7b776445c31876925e9d561.tar.gz
Fix fontification of plain links at beginning of buffer
* lisp/org.el (org-activate-plain-links): Ensure that a valid buffer position is given as first argument to get-text-property, in particular when the plain link is at the very beginning of the buffer. TINYCHANGE
-rwxr-xr-xlisp/org.el5
1 files changed, 4 insertions, 1 deletions
diff --git a/lisp/org.el b/lisp/org.el
index f1a04ab..d797eae 100755
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -5852,7 +5852,10 @@ prompted for."
(let (f hl)
(when (and (re-search-forward (concat org-plain-link-re) limit t)
(not (member 'org-tag
- (get-text-property (1- (match-beginning 0)) 'face)))
+ (get-text-property (cond
+ ((= 1 (match-beginning 0)) 1)
+ (t (1- (match-beginning 0))))
+ 'face)))
(not (org-in-src-block-p)))
(org-remove-flyspell-overlays-in (match-beginning 0) (match-end 0))
(setq f (get-text-property (match-beginning 0) 'face))