aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLukas Fleischer <calcurse@cryptocrack.de>2011-06-29 15:10:58 +0200
committerLukas Fleischer <calcurse@cryptocrack.de>2011-06-29 15:21:05 +0200
commit0827e00247b6196d39cc7047166a1da33334781b (patch)
tree570651b5a148f76d6aeebf5a374202c62b83f98e /src
parentbc2bead505eba9dc95ddadbcf465422927d787b5 (diff)
downloadcalcurse-0827e00247b6196d39cc7047166a1da33334781b.tar.gz
calcurse-0827e00247b6196d39cc7047166a1da33334781b.zip
Handle resize properly in the sidebar config menu
There used to be no resize handler in custom_sidebar_config() which resulted in a messed up screen if the terminal was resized during sidebar configuration. Doing a simple wins_reset() if the terminal was resized works around this problem. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
Diffstat (limited to 'src')
-rw-r--r--src/custom.c21
1 files changed, 16 insertions, 5 deletions
diff --git a/src/custom.c b/src/custom.c
index bccc1cc..1f75978 100644
--- a/src/custom.c
+++ b/src/custom.c
@@ -640,14 +640,25 @@ custom_sidebar_config (void)
wgetch (hwin.win.p);
wins_scrollwin_delete (&hwin);
break;
+ case KEY_RESIZE:
+ break;
default:
continue;
}
- wins_reinit_panels ();
- wins_update_border ();
- wins_update_panels ();
- keys_display_bindings_bar (win[STA].p, binding, 0, binding_size);
- wins_doupdate ();
+
+ if (resize)
+ {
+ resize = 0;
+ wins_reset ();
+ }
+ else
+ {
+ wins_reinit_panels ();
+ wins_update_border ();
+ wins_update_panels ();
+ keys_display_bindings_bar (win[STA].p, binding, 0, binding_size);
+ wins_doupdate ();
+ }
}
}