1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-04-27 16:51:06 -07:00

(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.
This commit is contained in:
Kim F. Storm 2002-01-16 23:06:10 +00:00
parent 465c939061
commit a2c6de8eca
3 changed files with 14 additions and 0 deletions

View file

@ -4,6 +4,8 @@
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.
2002-01-16 Pavel Jan,Bm(Bk <Pavel@Janik.cz>
* xterm.c (XTread_socket) [!USE_X_TOOLKIT]: Compute the value of

View file

@ -9462,6 +9462,12 @@ x_erase_phys_cursor (w)
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

View file

@ -11396,6 +11396,12 @@ x_erase_phys_cursor (w)
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