From 986e61b825f08e4ac3b48ce5730f0edc6e68e5a2 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Mon, 23 May 1994 05:53:55 +0000 Subject: [PATCH] (change_frame_size): Keep cursor coords in range. --- src/dispnew.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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); } -- 2.39.5