From f63be59b0be41d0a96eb83e1ba2926d332311bca Mon Sep 17 00:00:00 2001 From: Zajcev Evgeny Date: Sat, 18 Apr 2020 20:22:40 +0300 Subject: [PATCH] Fix display box cursor under image with margins * src/xdisp.c (get_window_cursor_type): Do not make box cursor hollow if cursor is under image with any margin. --- src/xdisp.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/xdisp.c b/src/xdisp.c index 193cc372b0..d3294e1e99 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -30896,10 +30896,11 @@ get_window_cursor_type (struct window *w, struct glyph *glyph, int *width, font size. So, setting cursor-type to (box . 32) should cover most of the "tiny" icons people may use. */ - if (!img->mask - || (CONSP (BVAR (b, cursor_type)) - && img->width > max (*width, WINDOW_FRAME_COLUMN_WIDTH (w)) - && img->height > max (*width, WINDOW_FRAME_LINE_HEIGHT (w)))) + if (!img->hmargin && !img->vmargin + && (!img->mask + || (CONSP (BVAR (b, cursor_type)) + && img->width > max (*width, WINDOW_FRAME_COLUMN_WIDTH (w)) + && img->height > max (*width, WINDOW_FRAME_LINE_HEIGHT (w))))) cursor_type = HOLLOW_BOX_CURSOR; } } -- 2.17.1