# HG changeset patch # User Kim F. Storm # Date 1012258559 0 # Node ID 72426b522a74fa3899e8c5d0b924134555c24023 # Parent 16844ffdcd036d06c35d1e9251f25ad75067b11a (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. diff -r 16844ffdcd03 -r 72426b522a74 mac/src/macterm.c --- a/mac/src/macterm.c Mon Jan 28 22:54:54 2002 +0000 +++ b/mac/src/macterm.c Mon Jan 28 22:55:59 2002 +0000 @@ -8458,6 +8458,12 @@ 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