Bug#980427: garbled message window after terminal resize

2021-03-16 Thread Ryan Kavanagh
Hi,

It has been two months since I submitted an upstream-provided patch.
This bug forces me to manually redraw my screen several times per hour.

I intend to NMU neomutt in fourteen days, and I will upload a package
generated from attached patch sequence to DELAYED/10. Please let me know
by then if you prefer that I not do so.

Thanks,
Ryan

-- 
|)|/  Ryan Kavanagh  | GPG: 4E46 9519 ED67 7734 268F
|\|\  https://rak.ac |  BD95 8F7B F8FC 4A11 C97A
From c87066355cc6aa5cb494eb066ffa0823d0e4267c Mon Sep 17 00:00:00 2001
From: Ryan Kavanagh 
Date: Tue, 16 Mar 2021 15:37:10 -0400
Subject: [PATCH 1/2] Clear the message window on SIGWINCH,
 redraw-on-sigwinch.patch (Closes: #980427)

---
 debian/patches/misc/redraw-on-sigwinch.patch | 43 
 debian/patches/series|  1 +
 2 files changed, 44 insertions(+)
 create mode 100644 debian/patches/misc/redraw-on-sigwinch.patch

diff --git a/debian/patches/misc/redraw-on-sigwinch.patch b/debian/patches/misc/redraw-on-sigwinch.patch
new file mode 100644
index 000..a09031b
--- /dev/null
+++ b/debian/patches/misc/redraw-on-sigwinch.patch
@@ -0,0 +1,43 @@
+From: Richard Russon 
+Date: Mon, 7 Dec 2020 14:21:45 +
+Subject: clear the message window on SIGWINCH (#2756)
+
+When the terminal is resized (or the font-size is changed),
+the screen must be redrawn.  This *used* to involve clearing the entire
+screen.  Soon, it will be delegated to individual windows to refresh
+themselves.
+
+In the mean time, forcibly clear the MessageWindow.
+
+Fixes: #2749
+
+Origin: https://github.com/neomutt/neomutt/commit/88f0b0572da9414550608054e960fd00b8d6b939
+---
+ index.c | 1 +
+ pager.c | 1 +
+ 2 files changed, 2 insertions(+)
+
+diff --git a/index.c b/index.c
+index c29ba8b..af3a18f 100644
+--- a/index.c
 b/index.c
+@@ -1368,6 +1368,7 @@ int mutt_index_menu(struct MuttWindow *dlg)
+ /* force a real complete redraw.  clrtobot() doesn't seem to be able
+  * to handle every case without this.  */
+ clearok(stdscr, true);
++mutt_window_clearline(MessageWindow, 0);
+ continue;
+   }
+ 
+diff --git a/pager.c b/pager.c
+index b08dda2..0e333c0 100644
+--- a/pager.c
 b/pager.c
+@@ -2473,6 +2473,7 @@ int mutt_pager(const char *banner, const char *fname, PagerFlags flags, struct P
+   SigWinch = 0;
+   mutt_resize_screen();
+   clearok(stdscr, true); /* force complete redraw */
++  mutt_window_clearline(MessageWindow, 0);
+ 
+   if (flags & MUTT_PAGER_RETWINCH)
+   {
diff --git a/debian/patches/series b/debian/patches/series
index 4bbbda3..49e6f2a 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -3,3 +3,4 @@ debian-specific/use_usr_bin_editor.patch
 debian-specific/document_debian_defaults.patch
 misc/smime.rc.patch
 upstream/981306-mime-forwarding.patch
+misc/redraw-on-sigwinch.patch
-- 
2.30.2

From 8f165cec619b20d895aa5700d4c4cf9337f9a30b Mon Sep 17 00:00:00 2001
From: Ryan Kavanagh 
Date: Tue, 16 Mar 2021 15:38:22 -0400
Subject: [PATCH 2/2] Changelog for 20201127+dfsg.1-1.1

---
 debian/changelog | 8 
 1 file changed, 8 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index c9a8bd3..213c8a4 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+neomutt (20201127+dfsg.1-1.1) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * Clear the message window on SIGWINCH, redraw-on-sigwinch.patch
+(Closes: #980427)
+
+ -- Ryan Kavanagh   Tue, 16 Mar 2021 15:37:31 -0400
+
 neomutt (20201127+dfsg.1-1) unstable; urgency=medium
 
   * New upstream release.
-- 
2.30.2



signature.asc
Description: PGP signature


Bug#980427: garbled message window after terminal resize

2021-01-18 Thread Ryan Kavanagh
Control: tags -1 + patch

The attached patch fixes this bug. You can apply it with

git am 0001-Clear-the-message-window-on-SIGWINCH-redraw-on-sigwi.patch

-- 
|)|/  Ryan Kavanagh  | GPG: 4E46 9519 ED67 7734 268F
|\|\  https://rak.ac |  BD95 8F7B F8FC 4A11 C97A
From 659998e565c12effa5c647a2578f6b8f72607f27 Mon Sep 17 00:00:00 2001
From: Ryan Kavanagh 
Date: Mon, 18 Jan 2021 18:01:34 -0500
Subject: [PATCH] Clear the message window on SIGWINCH,
 redraw-on-sigwinch.patch (Closes: #980427)

---
 debian/patches/misc/redraw-on-sigwinch.patch | 43 
 debian/patches/series|  1 +
 2 files changed, 44 insertions(+)
 create mode 100644 debian/patches/misc/redraw-on-sigwinch.patch

diff --git a/debian/patches/misc/redraw-on-sigwinch.patch b/debian/patches/misc/redraw-on-sigwinch.patch
new file mode 100644
index 0..a09031b97
--- /dev/null
+++ b/debian/patches/misc/redraw-on-sigwinch.patch
@@ -0,0 +1,43 @@
+From: Richard Russon 
+Date: Mon, 7 Dec 2020 14:21:45 +
+Subject: clear the message window on SIGWINCH (#2756)
+
+When the terminal is resized (or the font-size is changed),
+the screen must be redrawn.  This *used* to involve clearing the entire
+screen.  Soon, it will be delegated to individual windows to refresh
+themselves.
+
+In the mean time, forcibly clear the MessageWindow.
+
+Fixes: #2749
+
+Origin: https://github.com/neomutt/neomutt/commit/88f0b0572da9414550608054e960fd00b8d6b939
+---
+ index.c | 1 +
+ pager.c | 1 +
+ 2 files changed, 2 insertions(+)
+
+diff --git a/index.c b/index.c
+index c29ba8b..af3a18f 100644
+--- a/index.c
 b/index.c
+@@ -1368,6 +1368,7 @@ int mutt_index_menu(struct MuttWindow *dlg)
+ /* force a real complete redraw.  clrtobot() doesn't seem to be able
+  * to handle every case without this.  */
+ clearok(stdscr, true);
++mutt_window_clearline(MessageWindow, 0);
+ continue;
+   }
+ 
+diff --git a/pager.c b/pager.c
+index b08dda2..0e333c0 100644
+--- a/pager.c
 b/pager.c
+@@ -2473,6 +2473,7 @@ int mutt_pager(const char *banner, const char *fname, PagerFlags flags, struct P
+   SigWinch = 0;
+   mutt_resize_screen();
+   clearok(stdscr, true); /* force complete redraw */
++  mutt_window_clearline(MessageWindow, 0);
+ 
+   if (flags & MUTT_PAGER_RETWINCH)
+   {
diff --git a/debian/patches/series b/debian/patches/series
index 06cb026ad..9b54666f6 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -2,3 +2,4 @@ debian-specific/neomuttrc.patch
 debian-specific/use_usr_bin_editor.patch
 debian-specific/document_debian_defaults.patch
 misc/smime.rc.patch
+misc/redraw-on-sigwinch.patch
-- 
2.30.0



signature.asc
Description: PGP signature


Bug#980427: garbled message window after terminal resize

2021-01-18 Thread Ryan Kavanagh
Package: neomutt
Version: 20201120+dfsg.1-1
Severity: minor
Tags: upstream
Control: forwarded -1 
https://github.com/neomutt/neomutt/commit/88f0b0572da9414550608054e960fd00b8d6b939
X-Debbugs-Cc: r...@debian.org

neomutt fails to properly redraw its message window after a resize.
This leads to garbled text on the screen.

-- Package-specific info:
NeoMutt 20201120
Copyright (C) 1996-2020 Michael R. Elkins and others.
NeoMutt comes with ABSOLUTELY NO WARRANTY; for details type 'neomutt -vv'.
NeoMutt is free software, and you are welcome to redistribute it
under certain conditions; type 'neomutt -vv' for details.

System: Linux 5.10.0-1-amd64 (x86_64)
ncurses: ncurses 6.2.20201114 (compiled with 6.2.20201114)
libidn: 1.33 (compiled with 1.33)
GPGME: 1.14.0-unknown
GnuTLS: 3.6.15
libnotmuch: 5.3.0
storage: tokyocabinet

Configure options: --build=x86_64-linux-gnu --prefix=/usr 
{--includedir=${prefix}/include} {--mandir=${prefix}/share/man} 
{--infodir=${prefix}/share/info} --sysconfdir=/etc --localstatedir=/var 
--disable-option-checking --disable-silent-rules 
{--libdir=${prefix}/lib/x86_64-linux-gnu} 
{--libexecdir=${prefix}/lib/x86_64-linux-gnu} --disable-maintainer-mode 
--disable-dependency-tracking --mandir=/usr/share/man --libexecdir=/usr/libexec 
--with-mailpath=/var/mail --gpgme --lua --notmuch --with-ui --gnutls --gss 
--idn --mixmaster --sasl --tokyocabinet --sqlite --autocrypt

Compilation CFLAGS: -g -O2 
-fdebug-prefix-map=/build/neomutt-Ulxxh7/neomutt-20201120+dfsg.1=. 
-fstack-protector-strong -Wformat -Werror=format-security -std=c99 
-D_ALL_SOURCE=1 -D_GNU_SOURCE=1 -D__EXTENSIONS__ -I/usr/include 
-I/usr/include/lua5.4 -DNCURSES_WIDECHAR -isystem /usr/include/mit-krb5

Default options:
  +attach_headers_color +compose_to_sender +compress +cond_date +debug 
  +encrypt_to_self +forgotten_attachments +forwref +ifdef +imap +index_color 
  +initials +limit_current_thread +multiple_fcc +nested_if +new_mail +nntp +pop 
  +progress +quasi_delete +regcomp +reply_with_xorig +sensible_browser +sidebar 
  +skip_quoted +smtp +status_color +timeout +tls_sni +trash 

Compile options:
  +autocrypt +bkgdset +color +curs_set +fcntl -flock -fmemopen +futimens 
  +getaddrinfo +gnutls +gpgme +gss +hcache -homespool +idn +inotify 
  -locales_hack +lua +meta +mixmaster +nls +notmuch -openssl +pgp +regex +sasl 
  +smime +sqlite +start_color +sun_attachment +typeahead 
MAILPATH="/var/mail"
MIXMASTER="mixmaster"
PKGDATADIR="/usr/share/neomutt"
SENDMAIL="/usr/sbin/sendmail"
SYSCONFDIR="/etc"

To learn more about NeoMutt, visit: https://neomutt.org
If you find a bug in NeoMutt, please raise an issue at:
https://github.com/neomutt/neomutt/issues
or send an email to: 

-- System Information:
Debian Release: bullseye/sid
  APT prefers unstable-debug
  APT policy: (500, 'unstable-debug'), (500, 'unstable'), (1, 
'experimental-debug'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 5.10.0-1-amd64 (SMP w/4 CPU threads)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE, 
TAINT_UNSIGNED_MODULE
Locale: LANG=en_CA.UTF-8, LC_CTYPE=en_CA.UTF-8 (charmap=UTF-8) (ignored: LC_ALL 
set to en_CA.UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages neomutt depends on:
ii  libc6 2.31-9
ii  libgnutls30   3.7.0-5
ii  libgpg-error0 1.38-2
ii  libgpgme111.14.0-1+b2
ii  libgssapi-krb5-2  1.18.3-4
ii  libidn11  1.33-3
ii  liblua5.4-0   5.4.2-2
ii  libncursesw6  6.2+20201114-2
ii  libnotmuch5   0.31.3-2
ii  libsasl2-22.1.27+dfsg-2
ii  libsqlite3-0  3.34.0-1
ii  libtinfo6 6.2+20201114-2
ii  libtokyocabinet9  1.4.48-13
ii  sensible-utils0.0.14

Versions of packages neomutt recommends:
ii  libsasl2-modules  2.1.27+dfsg-2
ii  locales   2.31-9
ii  mime-support  3.66

Versions of packages neomutt suggests:
ii  aspell0.60.8-2
ii  ca-certificates   20200601
ii  gnupg 2.2.20-1
ii  ispell3.4.02-2
pn  mixmaster 
ii  opensmtpd [mail-transport-agent]  6.8.0p2-2
ii  openssl   1.1.1i-2
pn  urlview   

Versions of packages neomutt is related to:
ii  neomutt  20201120+dfsg.1-1

-- no debconf information

-- 
|)|/  Ryan Kavanagh  | GPG: 4E46 9519 ED67 7734 268F
|\|\  https://rak.ac |  BD95 8F7B F8FC 4A11 C97A


signature.asc
Description: PGP signature