diff options
| author | Kim F. Storm | 2002-01-28 22:55:59 +0000 |
|---|---|---|
| committer | Kim F. Storm | 2002-01-28 22:55:59 +0000 |
| commit | 796d4ec7b100f02f9aac2682921619c79b74cb0a (patch) | |
| tree | 07e31dc89d3f5d71a9fac0b546fbfeef5afd3e60 /mac/src | |
| parent | fa72cff4e303b76b42d35b5ff525bc75c5887504 (diff) | |
| download | emacs-796d4ec7b100f02f9aac2682921619c79b74cb0a.tar.gz emacs-796d4ec7b100f02f9aac2682921619c79b74cb0a.zip | |
(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.
Diffstat (limited to 'mac/src')
| -rw-r--r-- | mac/src/macterm.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/mac/src/macterm.c b/mac/src/macterm.c index 4893a551f8f..3def0223a92 100644 --- a/mac/src/macterm.c +++ b/mac/src/macterm.c | |||
| @@ -8458,6 +8458,12 @@ x_erase_phys_cursor (w) | |||
| 8458 | if (!cursor_row->enabled_p) | 8458 | if (!cursor_row->enabled_p) |
| 8459 | goto mark_cursor_off; | 8459 | goto mark_cursor_off; |
| 8460 | 8460 | ||
| 8461 | /* If row is completely invisible, don't attempt to delete a cursor which | ||
| 8462 | isn't there. This can happen if cursor is at top of a window, and | ||
| 8463 | we switch to a buffer with a header line in that window. */ | ||
| 8464 | if (cursor_row->visible_height <= 0) | ||
| 8465 | goto mark_cursor_off; | ||
| 8466 | |||
| 8461 | /* This can happen when the new row is shorter than the old one. | 8467 | /* This can happen when the new row is shorter than the old one. |
| 8462 | In this case, either x_draw_glyphs or clear_end_of_line | 8468 | In this case, either x_draw_glyphs or clear_end_of_line |
| 8463 | should have cleared the cursor. Note that we wouldn't be | 8469 | should have cleared the cursor. Note that we wouldn't be |