Package: screen
Version: 4.5.0-4.1
Severity: normal
Tags: patch

I reported this bug upstream but got no response:
https://savannah.gnu.org/bugs/?48594

screen forgets the previous setting of "defflow" after reattaching, for example
with "screen -r" or the lockscreen command. This causes the "flow"
setting to be wrong in any window created after reattaching. Steps to
reproduce:
 1. "echo 'defflow off' > screenrc.tmp"
 2. "screen -c screenrc.tmp"
 3. "C-a i" in window 0 shows "-(+)flow"
 4. "C-a d" to detach
 5. "screen -r" to reattach
 6. "C-a i" in window 0 still shows "-(+)flow"
 7. "C-a c" to create window 1
 8. "C-a i" in window 1 shows the wrong flow setting: "+flow"

The attached defflow.patch fixes the problem for me. The version
"4.5.0-4.1" in this bug report refers to my locally built version of
4.5.0-4 that includes defflow.patch. I have been maintaining the patch
locally for a while but it would be nice not to have to rebuild the
package every time the Debian package is updated.


-- System Information:
Debian Release: 9.0
  APT prefers testing
  APT policy: (600, 'testing'), (500, 'testing-debug')
Architecture: amd64 (x86_64)

Kernel: Linux 4.9.0-2-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: sysvinit (via /sbin/init)

Versions of packages screen depends on:
ii  libc6      2.24-9
ii  libpam0g   1.1.8-3.5
ii  libtinfo5  6.0+20161126-1

screen recommends no packages.

Versions of packages screen suggests:
pn  byobu | screenie | iselect  <none>
ii  ncurses-term                6.0+20161126-1

-- no debconf information
Restore the value of defflow after (re-)attachment.
https://savannah.gnu.org/bugs/?48594
Index: screen-4.5.0/termcap.c
===================================================================
--- screen-4.5.0.orig/termcap.c
+++ screen-4.5.0/termcap.c
@@ -231,7 +231,7 @@ int he;
       if (D_CXT)
 	D_BE = 1;
     }
-  if (nwin_options.flowflag == nwin_undef.flowflag)
+  if (nwin_default.flowflag == nwin_undef.flowflag)
     nwin_default.flowflag = D_CNF ? FLOW_NOW * 0 : 
 			    D_NX ? FLOW_NOW * 1 :
 			    FLOW_AUTOFLAG;

Reply via email to