]> granicus.if.org Git - neomutt/commitdiff
Automatically clear screen when popping the last menu
authorKevin McCarthy <kevin@8t8.us>
Wed, 7 Aug 2019 21:17:28 +0000 (14:17 -0700)
committerRichard Russon <rich@flatcap.org>
Mon, 19 Aug 2019 23:14:28 +0000 (00:14 +0100)
This removes the need to manually clear the screen during pre-menu
operations, such as autocrypt first run initialization.

Co-authored-by: Richard Russon <rich@flatcap.org>
autocrypt/autocrypt.c
menu.c

index 79e6cf8a86e6472e8b924001dc4f13bcd41688f4..c4f4675f5b88ec9bf3094d98ec503fe3d3dec64a 100644 (file)
@@ -911,11 +911,6 @@ void mutt_autocrypt_scan_mailboxes(void)
       mutt_buffer_reset(folderbuf);
     }
 
-    /* outside of the MUTTMENU system, we have to deal with issues
-     * like the file browser not being cleared from the screen... */
-    move(0, 0);
-    clrtobot();
-
     /* L10N:
        This is the second prompt to see if the user would like
        to scan more than one mailbox for Autocrypt headers.
diff --git a/menu.c b/menu.c
index 8d037b8f0fe06d7f457c83cb3254475be24f6fd3..717fd8071af87df4538a40e319bc2951af947232 100644 (file)
--- a/menu.c
+++ b/menu.c
@@ -1081,6 +1081,8 @@ void mutt_menu_pop_current(struct Menu *menu)
   else
   {
     CurrentMenu = MENU_MAIN;
+    move(0, 0);
+    clrtobot();
   }
 }