emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] trunk r118052: * nsterm.m (ns_draw_window_cursor): Adjust


From: Jan D.
Subject: [Emacs-diffs] trunk r118052: * nsterm.m (ns_draw_window_cursor): Adjust y for hbar cursor only if smaller than
Date: Sun, 05 Oct 2014 15:46:21 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 118052
revision-id: address@hidden
parent: address@hidden
fixes bug: http://debbugs.gnu.org/18345
committer: Jan D. <address@hidden>
branch nick: trunk
timestamp: Sun 2014-10-05 17:46:10 +0200
message:
  * nsterm.m (ns_draw_window_cursor): Adjust y for hbar cursor only if smaller 
than
  line height (Bug#17977).
modified:
  src/ChangeLog                  changelog-20091113204419-o5vbwnq5f7feedwu-1438
  src/nsterm.m                   nsterm.m-20091113204419-o5vbwnq5f7feedwu-8747
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2014-10-05 14:17:43 +0000
+++ b/src/ChangeLog     2014-10-05 15:46:10 +0000
@@ -4,6 +4,8 @@
        (toggleFullScreen:): Use ns-use-fullscreen-animation for animate.
        (ns_select, ns_read_socket): Use unwind_protect to decrease
        apploopnr (Bug#18345).
+       (ns_draw_window_cursor): Adjust y for hbar cursor only if smaller than
+       line height (Bug#17977).
 
        * macfont.m: Fix indentation and import changes from macport
        24.3.94.

=== modified file 'src/nsterm.m'
--- a/src/nsterm.m      2014-10-05 14:17:43 +0000
+++ b/src/nsterm.m      2014-10-05 15:46:10 +0000
@@ -2441,7 +2441,10 @@
   else if (cursor_type == HBAR_CURSOR)
     {
       cursor_height = (cursor_width < 1) ? lrint (0.25 * h) : cursor_width;
-      fy += h - cursor_height;
+      if (cursor_height > glyph_row->height)
+        cursor_height = glyph_row->height;
+      if (h > cursor_height) // Cursor smaller than line height, move down
+        fy += h - cursor_height;
       h = cursor_height;
     }
 
@@ -6884,7 +6887,7 @@
     }
   else
     {
-      error ("Invalid data type in dragging pasteboard");
+      fprintf (stderr, "Invalid data type in dragging pasteboard");
       return NO;
     }
 }


reply via email to

[Prev in Thread] Current Thread [Next in Thread]