From: Alan Third <alan@idiocy.org>
To: David Reitter <david.reitter@gmail.com>
Cc: 16856@debbugs.gnu.org
Subject: bug#16856: [PATCH] Prevent bar cursor overwriting next glyph (bug#16856)
Date: Sun, 17 Jul 2016 14:51:31 +0100 [thread overview]
Message-ID: <20160717135131.GA4810@breton.holly.idiocy.org> (raw)
In-Reply-To: <20160717084232.GA3426@breton.holly.idiocy.org>
* 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
next prev parent reply other threads:[~2016-07-17 13:51 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 ` Alan Third [this message]
2016-07-17 22:54 ` bug#16856: [PATCH] Prevent bar cursor overwriting next glyph (bug#16856) David Reitter
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=20160717135131.GA4810@breton.holly.idiocy.org \
--to=alan@idiocy.org \
--cc=16856@debbugs.gnu.org \
--cc=david.reitter@gmail.com \
/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).