summaryrefslogtreecommitdiff
path: root/src/custom.c
diff options
context:
space:
mode:
authorLukas Fleischer <calcurse@cryptocrack.de>2012-03-09 00:43:04 +0100
committerLukas Fleischer <calcurse@cryptocrack.de>2012-03-12 20:36:22 +0100
commit7072c9c88a5d54b3f22256e6cf0015e1900374da (patch)
treef03397edf401134b64316178aa2e51c419914616 /src/custom.c
parent03ed480654d99906197a3cc46013ac977e3a8d33 (diff)
downloadcalcurse-7072c9c88a5d54b3f22256e6cf0015e1900374da.zip
Avoid redundant window resets in config menu
There's no need to reset windows unless the layout was changed. Move wins_reset() to a separate branch to reflect this. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
Diffstat (limited to 'src/custom.c')
-rw-r--r--src/custom.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/custom.c b/src/custom.c
index 4b8d734..900c869 100644
--- a/src/custom.c
+++ b/src/custom.c
@@ -1104,6 +1104,7 @@ custom_config_main (void)
_("Sorry, colors are not supported by your terminal\n"
"(Press [ENTER] to continue)");
int ch;
+ int old_layout;
custom_config_bar ();
while ((ch = wgetch (win[STA].p)) != 'q')
@@ -1124,7 +1125,10 @@ custom_config_main (void)
break;
case 'L':
case 'l':
+ old_layout = wins_layout ();
custom_layout_config ();
+ if (wins_layout () != old_layout)
+ wins_reset ();
break;
case 'G':
case 'g':
@@ -1145,7 +1149,6 @@ custom_config_main (void)
default:
continue;
}
- wins_reset ();
wins_update (FLAG_ALL);
wins_erase_status_bar ();
custom_config_bar ();