diff options
| author | Alan Third | 2016-07-17 14:44:52 +0100 |
|---|---|---|
| committer | Alan Third | 2016-07-19 20:24:34 +0100 |
| commit | bf5ddded70c11edaf3514b25da27fc71cfb8e965 (patch) | |
| tree | 99629d6184a89947381398b6fa6f76c663e97f1e /src | |
| parent | a80ee12a64ed84f1e4f69acb1cd54a1814c9517d (diff) | |
| download | emacs-bf5ddded70c11edaf3514b25da27fc71cfb8e965.tar.gz emacs-bf5ddded70c11edaf3514b25da27fc71cfb8e965.zip | |
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.
Diffstat (limited to 'src')
| -rw-r--r-- | src/nsterm.m | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/nsterm.m b/src/nsterm.m index a6160ed5b2a..8da2ffe5b7f 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, | |||
| 2861 | { | 2861 | { |
| 2862 | if (cursor_width < 1) | 2862 | if (cursor_width < 1) |
| 2863 | cursor_width = max (FRAME_CURSOR_WIDTH (f), 1); | 2863 | cursor_width = max (FRAME_CURSOR_WIDTH (f), 1); |
| 2864 | w->phys_cursor_width = cursor_width; | 2864 | |
| 2865 | /* The bar cursor should never be wider than the glyph. */ | ||
| 2866 | if (cursor_width < w->phys_cursor_width) | ||
| 2867 | w->phys_cursor_width = cursor_width; | ||
| 2865 | } | 2868 | } |
| 2866 | /* If we have an HBAR, "cursor_width" MAY specify height. */ | 2869 | /* If we have an HBAR, "cursor_width" MAY specify height. */ |
| 2867 | else if (cursor_type == HBAR_CURSOR) | 2870 | else if (cursor_type == HBAR_CURSOR) |