From fe6423344ee9488bb857bbfaaf16d76bbe902556 Mon Sep 17 00:00:00 2001 From: Stephane Carrez Date: Fri, 11 Nov 2005 18:07:09 +0000 Subject: * tui/tui-win.c (tui_update_gdb_sizes): Use tui_term_width() and tui_term_height() to restore the terminal size when leaving the TUI mode. --- gdb/ChangeLog | 6 ++++++ gdb/tui/tui-win.c | 6 ++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index ebd6cb07f27..76d4e40bc27 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2005-11-11 Stephane Carrez + + * tui/tui-win.c (tui_update_gdb_sizes): Use tui_term_width() and + tui_term_height() to restore the terminal size when leaving the + TUI mode. + 2005-11-11 Stephane Carrez * m68hc11-tdep.c (m68hc11_pseudo_register_write): Use gdb_byte diff --git a/gdb/tui/tui-win.c b/gdb/tui/tui-win.c index 739c53c7d6e..a056045b2e4 100644 --- a/gdb/tui/tui-win.c +++ b/gdb/tui/tui-win.c @@ -450,15 +450,13 @@ void tui_update_gdb_sizes (void) { char cmd[50]; - int screenheight, screenwidth; - rl_get_screen_size (&screenheight, &screenwidth); /* Set to TUI command window dimension or use readline values. */ sprintf (cmd, "set width %d", - tui_active ? TUI_CMD_WIN->generic.width : screenwidth); + tui_active ? TUI_CMD_WIN->generic.width : tui_term_width()); execute_command (cmd, 0); sprintf (cmd, "set height %d", - tui_active ? TUI_CMD_WIN->generic.height : screenheight); + tui_active ? TUI_CMD_WIN->generic.height : tui_term_height()); execute_command (cmd, 0); } -- cgit v1.2.1