From 20f1c4c1a8df0b8b98851c1cee7ae7f84b2be11c Mon Sep 17 00:00:00 2001 From: Christophe Grenier Date: Sat, 17 Mar 2018 17:36:08 +0100 Subject: [PATCH] TestDisk: redraw interface if the screen has ben resized --- src/adv.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/adv.c b/src/adv.c index ba82ab3c..3b2981b5 100644 --- a/src/adv.c +++ b/src/adv.c @@ -459,7 +459,6 @@ void interface_adv(disk_t *disk_car, const int verbose,const int dump_ind, const int current_element_num=0; #ifdef HAVE_NCURSES int offset=0; - int old_LINES; #endif int rewrite=1; unsigned int menu=0; @@ -487,8 +486,8 @@ void interface_adv(disk_t *disk_car, const int verbose,const int dump_ind, const {0,NULL,NULL} }; const char *options; - old_LINES=LINES; - interface_adv_ncurses(disk_car, rewrite || (old_LINES!=LINES), list_part, current_element, offset); + int old_LINES=LINES; + interface_adv_ncurses(disk_car, rewrite, list_part, current_element, offset); #endif rewrite=0; if(current_element==NULL) @@ -632,5 +631,9 @@ void interface_adv(disk_t *disk_car, const int verbose,const int dump_ind, const offset=current_element_num-INTER_ADV+1; #endif } +#ifdef HAVE_NCURSES + if(old_LINES!=LINES) + rewrite=1; +#endif } }