Bug 194627 - misc/mc 4.8.13 does not save/restore the sub-shell's screen on Ctrl+O and/or command execution
Summary: misc/mc 4.8.13 does not save/restore the sub-shell's screen on Ctrl+O and/or ...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Kurt Jaeger
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-10-27 11:16 UTC by andriys
Modified: 2014-12-09 15:59 UTC (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description andriys 2014-10-27 11:16:53 UTC
This happens due to rev 369133 incorrectly updates the files/patch-lib__tty__win patch. Commit message says this patch file is changed by upstream, but the truth is removed part is actually vital for sub-shell screen save/restore to work properly.

The following patch reverts the change and fixes the problem for me:

Index: misc/mc/files/patch-lib__tty__win.c
===================================================================
--- misc/mc/files/patch-lib__tty__win.c (revision 370042)
+++ misc/mc/files/patch-lib__tty__win.c (working copy)
@@ -1,5 +1,14 @@
 --- lib/tty/win.c.orig 2014-09-02 09:23:58 UTC
 +++ lib/tty/win.c
+@@ -95,7 +95,7 @@
+ void
+ do_enter_ca_mode (void)
+ {
+-    if (mc_global.tty.xterm_flag && smcup != NULL)
++    if (mc_global.tty.xterm_flag)
+     {
+         fprintf (stdout, /* ESC_STR ")0" */ ESC_STR "7" ESC_STR "[?47h");
+         fflush (stdout);
 @@ -107,7 +107,7 @@
  void
  do_exit_ca_mode (void)
Comment 1 Bugzilla Automation freebsd_committer freebsd_triage 2014-10-27 11:16:53 UTC
Maintainers CC'd
Comment 2 214748mv 2014-11-23 15:39:46 UTC
Thanks it works. I have tested the patch on FreeBSD 11.0-CURRENT #0 r274845 and FreeBSD 9.3-STABLE #0 r271760.
Comment 3 commit-hook freebsd_committer freebsd_triage 2014-12-09 12:03:58 UTC
A commit references this bug:

Author: pi
Date: Tue Dec  9 12:03:14 UTC 2014
New revision: 374372
URL: https://svnweb.freebsd.org/changeset/ports/374372

Log:
  misc/mc: re-add small patch that was deleted in r369133

  Change:
  save/restore the sub-shell's screen on Ctrl+O and/or command execution

  PR:	194627
  Submitted by:	andriys@gmail.com

Changes:
  head/misc/mc/Makefile
  head/misc/mc/files/patch-lib__tty__win.c
Comment 4 Kurt Jaeger freebsd_committer freebsd_triage 2014-12-09 12:04:42 UTC
Committed, thanks.
Comment 5 commit-hook freebsd_committer freebsd_triage 2014-12-09 15:59:26 UTC
A commit references this bug:

Author: pi
Date: Tue Dec  9 15:58:51 UTC 2014
New revision: 374403
URL: https://svnweb.freebsd.org/changeset/ports/374403

Log:
  misc/mc: really re-add small patch that was deleted in r369133

  Thanks to tijl: patch syntax was bogus and was ignored.

  PR:		194627

Changes:
  head/misc/mc/Makefile
  head/misc/mc/files/patch-lib__tty__win.c