diff options
author | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2016-01-24 18:22:00 +0100 |
---|---|---|
committer | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2016-01-24 18:22:00 +0100 |
commit | 8e74ea3d1030bdcbcd02dfe8ae325340fd7b3dc3 (patch) | |
tree | 40d326ea3273959103cd466b7ff2910bcb08766d | |
parent | 921da3290a1b660b1b3829eb880abd740ab17e0a (diff) | |
download | org-mode-8e74ea3d1030bdcbcd02dfe8ae325340fd7b3dc3.tar.gz |
Fix plain links fontification in a narrowed buffer
* lisp/org.el (org-activate-plain-links): Fix fontification when buffer
is narrowed and (point-min) is no longer 1.
-rw-r--r-- | lisp/org.el | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/lisp/org.el b/lisp/org.el index d3c3c5b..3bcb3a7 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -5851,11 +5851,9 @@ prompted for." "Add link properties for plain links." (let (f hl) (when (and (re-search-forward (concat org-plain-link-re) limit t) - (not (member 'org-tag - (get-text-property (cond - ((= 1 (match-beginning 0)) 1) - (t (1- (match-beginning 0)))) - 'face))) + (not (memq 'org-tag + (get-text-property + (max (1- (match-beginning 0)) (point-min)) '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)) |