aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Djärv2014-10-05 17:46:10 +0200
committerJan Djärv2014-10-05 17:46:10 +0200
commit6e604a82a0f8dad3a55c54cf8b64ef2d38106f5b (patch)
tree74bc612862bd6199e0299654a96e47bb304c8335
parent08f27aa39c498d34418c7420b33bf2db913827c3 (diff)
downloademacs-6e604a82a0f8dad3a55c54cf8b64ef2d38106f5b.tar.gz
emacs-6e604a82a0f8dad3a55c54cf8b64ef2d38106f5b.zip
* nsterm.m (ns_draw_window_cursor): Adjust y for hbar cursor only if smaller than
line height (Bug#17977). Fixes: debbugs:18345
-rw-r--r--src/ChangeLog2
-rw-r--r--src/nsterm.m7
2 files changed, 7 insertions, 2 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 77494c0dc42..835a241cf9d 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -4,6 +4,8 @@
4 (toggleFullScreen:): Use ns-use-fullscreen-animation for animate. 4 (toggleFullScreen:): Use ns-use-fullscreen-animation for animate.
5 (ns_select, ns_read_socket): Use unwind_protect to decrease 5 (ns_select, ns_read_socket): Use unwind_protect to decrease
6 apploopnr (Bug#18345). 6 apploopnr (Bug#18345).
7 (ns_draw_window_cursor): Adjust y for hbar cursor only if smaller than
8 line height (Bug#17977).
7 9
8 * macfont.m: Fix indentation and import changes from macport 10 * macfont.m: Fix indentation and import changes from macport
9 24.3.94. 11 24.3.94.
diff --git a/src/nsterm.m b/src/nsterm.m
index 332b7cc0b78..ea8b4f726ff 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -2441,7 +2441,10 @@ ns_draw_window_cursor (struct window *w, struct glyph_row *glyph_row,
2441 else if (cursor_type == HBAR_CURSOR) 2441 else if (cursor_type == HBAR_CURSOR)
2442 { 2442 {
2443 cursor_height = (cursor_width < 1) ? lrint (0.25 * h) : cursor_width; 2443 cursor_height = (cursor_width < 1) ? lrint (0.25 * h) : cursor_width;
2444 fy += h - cursor_height; 2444 if (cursor_height > glyph_row->height)
2445 cursor_height = glyph_row->height;
2446 if (h > cursor_height) // Cursor smaller than line height, move down
2447 fy += h - cursor_height;
2445 h = cursor_height; 2448 h = cursor_height;
2446 } 2449 }
2447 2450
@@ -6884,7 +6887,7 @@ if (cols > 0 && rows > 0)
6884 } 6887 }
6885 else 6888 else
6886 { 6889 {
6887 error ("Invalid data type in dragging pasteboard"); 6890 fprintf (stderr, "Invalid data type in dragging pasteboard");
6888 return NO; 6891 return NO;
6889 } 6892 }
6890} 6893}