summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Guerry <bzg@altern.org>2012-09-27 23:40:28 +0200
committerBastien Guerry <bzg@altern.org>2012-09-27 23:40:28 +0200
commite279e98e774e37fd8bf908cca9fe75385194902d (patch)
tree47ac3baae2e65096193c97a76d87af3ff2b1eebe
parent5501df119990521e8acb6954c38efc855447db39 (diff)
downloadorg-mode-e279e98e774e37fd8bf908cca9fe75385194902d.tar.gz
org-src.el (org-src-font-lock-fontify-block): Fix bug: don't fontify the last character
* org-src.el (org-src-font-lock-fontify-block): Fix bug: don't fontify the last character.
-rw-r--r--lisp/org-src.el4
1 files changed, 2 insertions, 2 deletions
diff --git a/lisp/org-src.el b/lisp/org-src.el
index c110f32..d3e3437 100644
--- a/lisp/org-src.el
+++ b/lisp/org-src.el
@@ -805,13 +805,13 @@ fontification of code blocks see `org-src-fontify-block' and
(get-buffer-create
(concat " org-src-fontification:" (symbol-name lang-mode)))
(delete-region (point-min) (point-max))
- (insert (concat string " ")) ;; so there's a final property change
+ (insert string)
(unless (eq major-mode lang-mode) (funcall lang-mode))
(font-lock-fontify-buffer)
(setq pos (point-min))
(while (setq next (next-single-property-change pos 'face))
(put-text-property
- (+ start (1- pos)) (+ start next) 'face
+ (+ start (1- pos)) (1- (+ start next)) 'face
(get-text-property pos 'face) org-buffer)
(setq pos next)))
(add-text-properties