On Tue, Nov 17, 2020 at 08:17:26PM -0800, Kevin J. McCarthy wrote:
Lastly, unfortunately after more testing, the pager window layout logic did not work correctly with a status window that can now be hidden.

I believe this will fix the problem, but I need to take another look tomorrow when I'm not so tired. If you have a chance to test against various permutations I would appreciate it.

I don't think my paste came out right. Let me attach a quick patch so it has a better chance of applying.

--
Kevin J. McCarthy
GPG Fingerprint: 8975 A9B3 3AA3 7910 385C  5308 ADEF 7684 8031 6BDA
From 65e547cb0d8d1d9375ba2489d789b0b72ed35817 Mon Sep 17 00:00:00 2001
From: Kevin McCarthy <ke...@8t8.us>
Date: Tue, 17 Nov 2020 20:20:35 -0800
Subject: [PATCH] my fixes.

---
 curs_lib.c | 3 ---
 pager.c    | 9 ++++++---
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/curs_lib.c b/curs_lib.c
index 4434f27e..3e3f2430 100644
--- a/curs_lib.c
+++ b/curs_lib.c
@@ -777,10 +777,7 @@ void mutt_reflow_windows (void)
   memcpy (MuttIndexWindow, MuttStatusWindow, sizeof (mutt_window_t));
 
   if (! option (OPTSTATUSVISIBLE))
-  {
     MuttStatusWindow->rows = 0;
-    MuttStatusWindow->cols = 0;
-  }
 
   MuttIndexWindow->rows = MAX(LINES - MuttStatusWindow->rows -
 			      MuttHelpWindow->rows - MuttMessageWindow->rows, 0);
diff --git a/pager.c b/pager.c
index 58f27761..c5f4a2b1 100644
--- a/pager.c
+++ b/pager.c
@@ -1687,13 +1687,16 @@ static void pager_menu_redraw (MUTTMENU *pager_menu)
       if (option (OPTSTATUSONTOP))
       {
         memcpy (rd->index_status_window, MuttStatusWindow, sizeof(mutt_window_t));
+        rd->index_status_window->rows = 1;
+
+        rd->index_window->row_offset = 1;
 
         memcpy (rd->pager_status_window, MuttIndexWindow, sizeof(mutt_window_t));
-        rd->pager_status_window->rows = 1;
+        rd->pager_status_window->rows = option (OPTSTATUSVISIBLE) ? 1 : 0;
         rd->pager_status_window->row_offset += rd->index_window->rows;
 
-        rd->pager_window->rows -= rd->index_window->rows + rd->pager_status_window->rows;
-        rd->pager_window->row_offset += rd->index_window->rows + rd->pager_status_window->rows;
+        rd->pager_window->rows -= rd->index_window->rows + rd->index_status_window->rows;
+        rd->pager_window->row_offset += rd->index_window->rows + rd->index_status_window->rows;
       }
       else
       {
-- 
2.29.2

Attachment: signature.asc
Description: PGP signature

Reply via email to