summaryrefslogtreecommitdiff
path: root/src/term.c
diff options
context:
space:
mode:
authorDan Nicolaescu <dann@ics.uci.edu>2009-01-30 23:45:27 +0000
committerDan Nicolaescu <dann@ics.uci.edu>2009-01-30 23:45:27 +0000
commit1753536c8dd5832ff3839a92a097b9d3453f2ae6 (patch)
treee53fcded50c698a4506de16c50c138396064472f /src/term.c
parent3b9c1eaafcb32293a01ebd67edd54f4c573df56f (diff)
downloademacs-1753536c8dd5832ff3839a92a097b9d3453f2ae6.tar.gz
* dispnew.c (window_change_signal): Don't try to get the size of a
suspended tty frame. * term.c (Fresume_tty): Resize if the size has changed while the tty was suspended.
Diffstat (limited to 'src/term.c')
-rw-r--r--src/term.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/term.c b/src/term.c
index c3df9ca4159..0cfc1ff3b95 100644
--- a/src/term.c
+++ b/src/term.c
@@ -2470,7 +2470,19 @@ the currently selected frame. */)
#endif
if (FRAMEP (t->display_info.tty->top_frame))
- FRAME_SET_VISIBLE (XFRAME (t->display_info.tty->top_frame), 1);
+ {
+ struct frame *f = XFRAME (t->display_info.tty->top_frame);
+ int width, height;
+ int old_height = FRAME_COLS (f);
+ int old_width = FRAME_LINES (f);
+
+ /* Check if terminal/window size has changed while the frame
+ was suspended. */
+ get_tty_size (fileno (t->display_info.tty->input), &width, &height);
+ if (width != old_width || height != old_height)
+ change_frame_size (f, height, width, 0, 0, 0);
+ FRAME_SET_VISIBLE (XFRAME (t->display_info.tty->top_frame), 1);
+ }
init_sys_modes (t->display_info.tty);