commit ea66b70dd985597b232c7753f78c8d8b989733aa parent c8f3e88acd66825090cb916ac7a1c336b2cce394 Author: Iqbal Ansari <iqbalansari02@yahoo.com> Date: Sun, 9 Jul 2017 12:54:14 +0530 Do not consider the cursor background to decide emoji background Since we run the jit-lock mode, which changes point, we do not have access to original value point Diffstat:
M | emojify.el | | | 13 | +------------ |
1 file changed, 1 insertion(+), 12 deletions(-)
diff --git a/emojify.el b/emojify.el @@ -919,22 +919,11 @@ This returns nil if the emojis between BEG and END do not fall in region." (emojify--inside-rectangle-selection-p beg end))) (face-background 'region))) -(defun emojify--cursor-background-maybe (beg end) - "If the BEG and END fall inside a cursor return the background color for cursor." - (when (and emojify-current-point - (or (and (equal cursor-type t) - (equal (frame-parameter nil 'cursor-type) 'box)) - (equal cursor-type 'box)) - (and (<= beg emojify-current-point) - (< emojify-current-point end))) - (face-background 'cursor))) - (defun emojify--get-image-background (beg end) "Get the color to be used as background for emoji between BEG and END." ;; We do a separate check for region since `background-color-at-point' ;; does not always detect background color inside regions properly - (or (emojify--cursor-background-maybe beg end) - (emojify--region-background-maybe beg end) + (or (emojify--region-background-maybe beg end) (save-excursion (goto-char beg) (background-color-at-point))))