diff options
| author | Richard M. Stallman | 1994-05-23 05:53:55 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1994-05-23 05:53:55 +0000 |
| commit | 986e61b825f08e4ac3b48ce5730f0edc6e68e5a2 (patch) | |
| tree | 531896acf238496ce3efd7645ed595e9c79e8215 /src | |
| parent | 38ab08d1bf538c301e7b1be739c7877b0eb411df (diff) | |
| download | emacs-986e61b825f08e4ac3b48ce5730f0edc6e68e5a2.tar.gz emacs-986e61b825f08e4ac3b48ce5730f0edc6e68e5a2.zip | |
(change_frame_size): Keep cursor coords in range.
Diffstat (limited to 'src')
| -rw-r--r-- | src/dispnew.c | 7 |
1 files changed, 6 insertions, 1 deletions
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) | |||
| 2025 | 2025 | ||
| 2026 | FRAME_HEIGHT (frame) = newheight; | 2026 | FRAME_HEIGHT (frame) = newheight; |
| 2027 | FRAME_WIDTH (frame) = newwidth; | 2027 | FRAME_WIDTH (frame) = newwidth; |
| 2028 | 2028 | ||
| 2029 | if (FRAME_CURSOR_X (frame) >= FRAME_WIDTH (frame)) | ||
| 2030 | FRAME_CURSOR_X (frame) = FRAME_WIDTH (frame) - 1; | ||
| 2031 | if (FRAME_CURSOR_Y (frame) >= FRAME_HEIGHT (frame)) | ||
| 2032 | FRAME_CURSOR_Y (frame) = FRAME_HEIGHT (frame) - 1; | ||
| 2033 | |||
| 2029 | remake_frame_glyphs (frame); | 2034 | remake_frame_glyphs (frame); |
| 2030 | calculate_costs (frame); | 2035 | calculate_costs (frame); |
| 2031 | } | 2036 | } |