summaryrefslogtreecommitdiff
path: root/src/gui/curses/gui-curses-window.c
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2011-08-27 14:24:27 +0200
committerSebastien Helleu <flashcode@flashtux.org>2011-08-27 14:24:27 +0200
commite411d14b7a239b47a87f22c20ce193e37481f672 (patch)
tree2b3a36bd1532705882d52de334aaa805e15a68a4 /src/gui/curses/gui-curses-window.c
parent8eb116c23a92c5960f0b4e5fbba8347d5100ff7f (diff)
downloadweechat-e411d14b7a239b47a87f22c20ce193e37481f672.zip
core: do automatic zoom on current window when terminal becomes too small for windows
Diffstat (limited to 'src/gui/curses/gui-curses-window.c')
-rw-r--r--src/gui/curses/gui-curses-window.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/gui/curses/gui-curses-window.c b/src/gui/curses/gui-curses-window.c
index 7edfc1aaa..08dc8d8d2 100644
--- a/src/gui/curses/gui-curses-window.c
+++ b/src/gui/curses/gui-curses-window.c
@@ -50,8 +50,9 @@
#include "../gui-hotlist.h"
#include "../gui-input.h"
#include "../gui-key.h"
-#include "../gui-main.h"
+#include "../gui-layout.h"
#include "../gui-line.h"
+#include "../gui-main.h"
#include "../gui-nicklist.h"
#include "gui-curses.h"
@@ -1513,7 +1514,13 @@ gui_window_refresh_windows ()
gui_window_get_height () - add_top - add_bottom,
0) < 0)
{
- gui_window_merge_all (gui_current_window);
+ if (gui_window_layout_before_zoom)
+ {
+ /* remove zoom saved, to force a new zoom */
+ gui_layout_window_remove_all (&gui_window_layout_before_zoom);
+ gui_window_layout_id_current_window = -1;
+ }
+ gui_window_zoom (gui_current_window);
}
for (ptr_win = gui_windows; ptr_win; ptr_win = ptr_win->next_window)