[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master bf5ddde: Prevent bar cursor overwriting next glyph
From: |
Alan Third |
Subject: |
[Emacs-diffs] master bf5ddde: Prevent bar cursor overwriting next glyph (bug#16856) |
Date: |
Tue, 19 Jul 2016 19:27:47 +0000 (UTC) |
branch: master
commit bf5ddded70c11edaf3514b25da27fc71cfb8e965
Author: Alan Third <address@hidden>
Commit: Alan Third <address@hidden>
Prevent bar cursor overwriting next glyph (bug#16856)
* 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 @@ ns_draw_window_cursor (struct window *w, struct
glyph_row *glyph_row,
{
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)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master bf5ddde: Prevent bar cursor overwriting next glyph (bug#16856),
Alan Third <=