emacs-devel
[Top][All Lists]
Advanced

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

Re: Is it fixed?


From: Kim F. Storm
Subject: Re: Is it fixed?
Date: 29 Jan 2002 22:31:57 +0100
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.1

Richard Stallman <address@hidden> writes:

> Perhaps we should put the fix into RC.
> Does it seem safe?

The fix is trivial and I believe it is safe.
If someone would like to install it on RC, I would be greatful.


2002-01-16  Kim F. Storm  <address@hidden>

        * xterm.c (x_erase_phys_cursor): Don't erase cursor if cursor row
        is invisible.  This can happen if cursor is on top line of a
        window, and we switch to a buffer with a header line.

        * w32term.c (x_erase_phys_cursor): ditto.


Index: xterm.c
===================================================================
RCS file: /cvs/emacs/src/xterm.c,v
retrieving revision 1.701
retrieving revision 1.702
diff -c -r1.701 -r1.702
*** xterm.c     16 Jan 2002 06:48:06 -0000      1.701
--- xterm.c     16 Jan 2002 22:55:00 -0000      1.702
***************
*** 11396,11401 ****
--- 11396,11407 ----
    if (!cursor_row->enabled_p)
      goto mark_cursor_off;
    
+   /* If row is completely invisible, don't attempt to delete a cursor which
+      isn't there.  This can happen if cursor is at top of a window, and
+      we switch to a buffer with a header line in that window.  */
+   if (cursor_row->visible_height <= 0)
+     goto mark_cursor_off;
+   
    /* This can happen when the new row is shorter than the old one.
       In this case, either x_draw_glyphs or clear_end_of_line
       should have cleared the cursor.  Note that we wouldn't be

Index: w32term.c
===================================================================
RCS file: /cvs/emacs/src/w32term.c,v
retrieving revision 1.135
retrieving revision 1.136
diff -c -r1.135 -r1.136
*** w32term.c   13 Jan 2002 12:16:05 -0000      1.135
--- w32term.c   16 Jan 2002 23:04:03 -0000      1.136
***************
*** 9462,9467 ****
--- 9462,9473 ----
    if (!cursor_row->enabled_p)
      goto mark_cursor_off;
    
+   /* If row is completely invisible, don't attempt to delete a cursor which
+      isn't there.  This may happen if cursor is at top of window, and
+      we switch to a buffer with a header line in that window.  */
+   if (cursor_row->visible_height <= 0)
+     goto mark_cursor_off;
+   
    /* This can happen when the new row is shorter than the old one.
       In this case, either x_draw_glyphs or clear_end_of_line
       should have cleared the cursor.  Note that we wouldn't be

-- 
Kim F. Storm <address@hidden> http://www.cua.dk




reply via email to

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