emoji layer: fix rendering in org buffers
There is still an issue with the first colon that is not invisible but I guess we can live with it
This commit is contained in:
parent
0d5ea1b5a4
commit
5e9ceccf23
|
@ -269,7 +269,7 @@
|
||||||
(goto-char start)
|
(goto-char start)
|
||||||
(let ((inhibit-read-only t)
|
(let ((inhibit-read-only t)
|
||||||
(modified (buffer-modified-p)))
|
(modified (buffer-modified-p)))
|
||||||
(while (re-search-forward "\:.+?\:" end t)
|
(while (re-search-forward "\:[a-z0-9\\+_-]+?\:" end t)
|
||||||
(let* ((code (intern (match-string 0)))
|
(let* ((code (intern (match-string 0)))
|
||||||
(image (cdr (assq code emoji-cheat-sheet-plus-image--cache))))
|
(image (cdr (assq code emoji-cheat-sheet-plus-image--cache))))
|
||||||
(when image
|
(when image
|
||||||
|
@ -279,7 +279,7 @@
|
||||||
;; occurrences of the same emoji
|
;; occurrences of the same emoji
|
||||||
(add-text-properties
|
(add-text-properties
|
||||||
(match-beginning 0) (1+ (match-beginning 0))
|
(match-beginning 0) (1+ (match-beginning 0))
|
||||||
`(invisible t emoji-cheat-sheet-plus-display t))
|
'(invisible t emoji-cheat-sheet-plus-display t))
|
||||||
(add-text-properties
|
(add-text-properties
|
||||||
(1+ (match-beginning 0)) (match-end 0)
|
(1+ (match-beginning 0)) (match-end 0)
|
||||||
`(display ,image emoji-cheat-sheet-plus-display t))
|
`(display ,image emoji-cheat-sheet-plus-display t))
|
||||||
|
|
Loading…
Reference in a new issue