id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc	blockedby	blocking	branch_state	votes
4171	[patch] Fix  #silent macro runs	psprint	andrew_b	"Hi,
`mc` has a functionality of skipping the subshell when running a macro script – by prepending the macro with a `""#silent""` line, e.g.:


{{{
#silent

m       make
        TMPFILE=`mktemp /tmp/make.XX` || exit 1
        make 2> $TMPFILE
        mcedit $TMPFILE
        #rm $TMPFILE

}}}

This will make the script to be run without the subshell use. However, it's fairly broken currently – the screen will be disrupted – `\r` and `\n` codes will not work properly and will not make the caret return to the first column. This is probably also broken also for a non `#silent` background command runs, however I don't have the opportunity to test it as my subshell support segfaults for some reason.

The patch fixes this problem. It restores the pre-slang/pre-curses terminal state and clears the terminal before running the command, then sets the after-slang/curses terminal configuration.
"	enhancement	closed	major	4.8.27	mcedit	master	fixed	subshell, background, commands, macros				merged	committed-master
