about summary refs log tree commit diff stats
path: root/src/ui/windows.c
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2014-07-08 19:56:35 +0100
committerJames Booth <boothj5@gmail.com>2014-07-08 19:56:35 +0100
commit5c28ad76b6c928e71d170b586ea066cd6cd52052 (patch)
tree4c7a6dea1a55d8f1ec1d40ff6109bf8483fc3e7b /src/ui/windows.c
parentc4844a0626c53ceba5b94686b1f71bb67d9b03eb (diff)
parent945d6559103bc774dccb70b2e2634f47aa80b771 (diff)
downloadprofani-tty-5c28ad76b6c928e71d170b586ea066cd6cd52052.tar.gz
Merge pull request #374 from immae/winbuffers
Implemented the buffer for windows resizing
Diffstat (limited to 'src/ui/windows.c')
-rw-r--r--src/ui/windows.c21
1 files changed, 8 insertions, 13 deletions
diff --git a/src/ui/windows.c b/src/ui/windows.c
index d1ba16a2..a5c1763b 100644
--- a/src/ui/windows.c
+++ b/src/ui/windows.c
@@ -272,20 +272,15 @@ wins_resize_all(void)
     int rows, cols;
     getmaxyx(stdscr, rows, cols);
 
-    // only make the pads bigger, to avoid data loss on cropping
-    if (cols > max_cols) {
-        max_cols = cols;
-
-        GList *values = g_hash_table_get_values(windows);
-        GList *curr = values;
-
-        while (curr != NULL) {
-            ProfWin *window = curr->data;
-            wresize(window->win, PAD_SIZE, cols);
-            curr = g_list_next(curr);
-        }
-        g_list_free(values);
+    GList *values = g_hash_table_get_values(windows);
+    GList *curr = values;
+    while (curr != NULL) {
+      ProfWin *window = curr->data;
+      wresize(window->win, PAD_SIZE, cols);
+      win_redraw(window);
+      curr = g_list_next(curr);
     }
+    g_list_free(values);
 
     ProfWin *current_win = wins_get_current();