From d2d753a78887f690290f2572c218ce543fe5b40d Mon Sep 17 00:00:00 2001
From: Sebastian Gniazdowski <sgniazdowski@gmail.com>
Date: Mon, 11 Jan 2021 07:53:07 -0600
Subject: [PATCH] =?UTF-8?q?Fix=20#silent=20macro=20runs=20=E2=80=94=20make?=
=?UTF-8?q?=20the=20terminal=20undisrupted.?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/editor/editcmd.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/editor/editcmd.c b/src/editor/editcmd.c
index e2b904604..95f5b2474 100644
a
|
b
|
edit_block_process_cmd (WEdit * edit, int macro_number) |
3271 | 3271 | char *fname; |
3272 | 3272 | char *macros_fname = NULL; |
3273 | 3273 | |
| 3274 | /* Prepare the terminal by setting its flag to the initial ones. This will cause \r to work as |
| 3275 | * expected, instead of being ignored. */ |
| 3276 | tty_reset_shell_mode(); |
| 3277 | |
3274 | 3278 | fname = g_strdup_printf ("%s.%i.sh", EDIT_HOME_MACRO_FILE, macro_number); |
3275 | 3279 | macros_fname = g_build_filename (mc_config_get_data_path (), fname, (char *) NULL); |
3276 | 3280 | user_menu (edit, macros_fname, 0); |
3277 | 3281 | g_free (fname); |
3278 | 3282 | g_free (macros_fname); |
| 3283 | |
| 3284 | /* Restore the SLang terminal configuration and redraw the editor. */ |
| 3285 | tty_raw_mode(); |
| 3286 | edit_refresh_cmd(); |
3279 | 3287 | edit->force |= REDRAW_COMPLETELY; |
3280 | 3288 | } |
3281 | 3289 | |