emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Hollow cursor under images


From: Evgeny Zajcev
Subject: Re: Hollow cursor under images
Date: Mon, 27 Jan 2020 15:54:56 +0300



сб, 14 сент. 2019 г. в 14:48, Evgeny Zajcev <address@hidden>:


вт, 5 мар. 2019 г. в 13:19, Evgeny Zajcev <address@hidden>:
[...]
In my case 32 for width is the trigger and `(frame-char-height) == 53' for height triggers the hollow cursor behaviour.

Looks like a bug

I've found this in xdisp.c:

....
  if (cursor_type == FILLED_BOX_CURSOR)
   {
     /* Using a block cursor on large images can be very annoying.
So use a hollow cursor for "large" images.
If image is not transparent (no mask), also use hollow cursor.  */
     struct image *img = IMAGE_OPT_FROM_ID (f, glyph->u.img_id);
     if (img != NULL && IMAGEP (img->spec))
{
 /* Arbitrarily, interpret "Large" as >32x32 and >NxN
    where N = size of default frame font size.
    This should cover most of the "tiny" icons people may use.  */
 if (!img->mask
     || img->width > max (32, WINDOW_FRAME_COLUMN_WIDTH (w))
     || img->height > max (32, WINDOW_FRAME_LINE_HEIGHT (w)))
   cursor_type = HOLLOW_BOX_CURSOR;
}
....

Maybe introduce some property in image spec to control cursor behaviour?  Or make customizable definition for "tiny" icons?

Thanks

This patch implements (box . WIDTH) cursor type, allowing user to define his own notion for "Large" image

Could you please include it into master

Thanks

--
lg

Attachment: 0001-Support-for-box-.-WIDTH-cursor-type.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]