emacs-emojify

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

commit 50d2d6da50d9cdd4f0bc93a61f1d89f4a98d7f64
parent 825c77af9bd870ae508f635cff996a1d78e36f40
Author: Iqbal Ansari <iqbalansari02@yahoo.com>
Date:   Sat,  1 Apr 2017 00:43:48 +0530

Fix off-by-one bugs in code to determine if emoji is part of a selection

Diffstat:
Memojify.el | 6+++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/emojify.el b/emojify.el @@ -865,7 +865,7 @@ and end of region respectively." (<= (cdr emoji-end-pos) (cdr rect-end))))))) (defun emojify--inside-non-rectangle-selection-p (beg end) - "Check if region marked by BEG and END is inside a regular selection. + "Check if region marked by BEG and END is inside a non-regular selection. In addition to the explicit parameters BEG and END, calling functions should also dynamically bind `emojify-region-beg' and `emojify-region-end' to beginning @@ -873,9 +873,9 @@ and end of region respectively." (when (and emojify-region-beg (region-active-p) (not (bound-and-true-p rectangle-mark-mode))) - (or (and (<= emojify-region-beg beg) + (or (and (< emojify-region-beg beg) (<= beg emojify-region-end)) - (and (<= emojify-region-beg end) + (and (< emojify-region-beg end) (<= end emojify-region-end))))) (defun emojify--region-background-face-maybe (beg end)