emacs-emojify

fork of https://github.com/iqbalansari/emacs-emojify
Log | Files | Refs | LICENSE

commit 89bba39b6596c8cacafd905e22c5f68b1a22a25f
parent 1954d887f1779fc9a38740d7d78bb9ac4637db97
Author: Iqbal Ansari <iqbalansari02@yahoo.com>
Date:   Tue, 27 Sep 2016 22:57:46 +0530

Ensure that we are always dealing with complete lines while emojifying a region

Diffstat:
Memojify.el | 11+++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/emojify.el b/emojify.el @@ -1075,8 +1075,15 @@ BEG and END are the beginning and end of the region respectively" Redisplay emojis in the visible region if BEG and END are not specified" (let* ((area (emojify--get-relevant-region)) - (beg (or beg (car area))) - (end (or end (cdr area)))) + (beg (save-excursion + (goto-char (or beg (car area))) + (line-beginning-position))) + (end (save-excursion + (goto-char (or end (cdr area))) + (line-end-position)))) + (save-excursion + (goto-char 1) + (line-beginning-position)) (emojify-execute-ignoring-errors-unless-debug (emojify-undisplay-emojis-in-region beg end) (emojify-display-emojis-in-region beg end))))