unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: David Reitter <david.reitter@gmail.com>
To: Alan Third <alan@idiocy.org>
Cc: 16856@debbugs.gnu.org
Subject: bug#16856: [PATCH] Prevent bar cursor overwriting next glyph (bug#16856)
Date: Mon, 18 Jul 2016 07:54:03 +0900	[thread overview]
Message-ID: <58701B24-4BAC-4B03-B173-AE6F1D3468F3@gmail.com> (raw)
In-Reply-To: <20160717135131.GA4810@breton.holly.idiocy.org>

No ill effects with that.  What is the glyph at the end of the line?
Also, about your patch, it seems like w->phys_cursor_width will then just be whatever it was before.


> On Jul 17, 2016, at 10:51 PM, Alan Third <alan@idiocy.org> wrote:
> 
> * src/nsterm.m (ns_draw_window_cursor): Test glyph width vs cursor width
> before setting final size.
> ---
> src/nsterm.m | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/src/nsterm.m b/src/nsterm.m
> index a6160ed..8da2ffe 100644
> --- a/src/nsterm.m
> +++ b/src/nsterm.m
> @@ -2861,7 +2861,10 @@ Note that CURSOR_WIDTH is meaningful only for (h)bar cursors.
>     {
>       if (cursor_width < 1)
> 	cursor_width = max (FRAME_CURSOR_WIDTH (f), 1);
> -      w->phys_cursor_width = cursor_width;
> +
> +      /* The bar cursor should never be wider than the glyph. */
> +      if (cursor_width < w->phys_cursor_width)
> +        w->phys_cursor_width = cursor_width;
>     }
>   /* If we have an HBAR, "cursor_width" MAY specify height. */
>   else if (cursor_type == HBAR_CURSOR)
> -- 
> 
> And here's a patch to prevent the bar cursor straying into the next glyph.
> -- 
> Alan Third






  reply	other threads:[~2016-07-17 22:54 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <48763C60-1B48-468A-9544-C4A63258CF32@gmail.com>
2016-07-17  8:42 ` bug#16856: 24.3.50; Cursor leaves garbage in fringe Alan Third
2016-07-17 10:41   ` David Reitter
2016-07-17 13:35     ` Alan Third
2016-07-17 12:09   ` Eli Zaretskii
2016-07-17 12:41     ` David Reitter
2016-07-17 13:26     ` Alan Third
2016-07-17 13:51   ` bug#16856: [PATCH] Prevent bar cursor overwriting next glyph (bug#16856) Alan Third
2016-07-17 22:54     ` David Reitter [this message]
2016-07-18 14:26       ` Alan Third

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=58701B24-4BAC-4B03-B173-AE6F1D3468F3@gmail.com \
    --to=david.reitter@gmail.com \
    --cc=16856@debbugs.gnu.org \
    --cc=alan@idiocy.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).