From d6e551c1a528233bf60c056642a4a5e20f199dfa Mon Sep 17 00:00:00 2001
From: Baptiste Jonglez <baptiste--git@jonglez.org>
Date: Mon, 14 May 2012 12:38:23 +0200
Subject: Allow resize events while prompting the user

When asking the user to choose between multiple alternatives, properly
handle resize events.

Note that we would also need to do so in getstring()...

Signed-off-by: Baptiste Jonglez <baptiste--git@jonglez.org>
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
---
 src/utils.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

(limited to 'src')

diff --git a/src/utils.c b/src/utils.c
index 1d27bce..d9f3737 100644
--- a/src/utils.c
+++ b/src/utils.c
@@ -222,7 +222,12 @@ status_ask_choice(const char *message, const char choice[], int nb_choice)
           return i;
       if (ch == ESCAPE)
         return (-1);
-      /* TODO: handle resize events. */
+      if (resize)
+        {
+          resize = 0;
+          wins_reset ();
+          status_mesg (message, avail_choice);
+        }
     }
 }
 
-- 
cgit v1.2.3-70-g09d2