From: Richard M. Stallman Date: Mon, 23 May 1994 05:53:55 +0000 (+0000) Subject: (change_frame_size): Keep cursor coords in range. X-Git-Tag: emacs-19.34~8205 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=986e61b825f08e4ac3b48ce5730f0edc6e68e5a2;p=emacs.git (change_frame_size): Keep cursor coords in range. --- diff --git a/src/dispnew.c b/src/dispnew.c index bc521fb26e1..55292196bf6 100644 --- a/src/dispnew.c +++ b/src/dispnew.c @@ -2025,7 +2025,12 @@ change_frame_size (frame, newheight, newwidth, pretend, delay) FRAME_HEIGHT (frame) = newheight; FRAME_WIDTH (frame) = newwidth; - + + if (FRAME_CURSOR_X (frame) >= FRAME_WIDTH (frame)) + FRAME_CURSOR_X (frame) = FRAME_WIDTH (frame) - 1; + if (FRAME_CURSOR_Y (frame) >= FRAME_HEIGHT (frame)) + FRAME_CURSOR_Y (frame) = FRAME_HEIGHT (frame) - 1; + remake_frame_glyphs (frame); calculate_costs (frame); }