blob: 2e35ba05a9218e76fd3f41adf4813efebc2a5ba6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
Last-Update: 2017-06-29
Forwarded: https://www.midnight-commander.org/ticket/2110#comment:11
Author: Dmitry Borisyuk" <q1werty@i.com.ua>
Reviewed-by: Dmitry Smirnov <onlyjob@member.fsf.org>
Bug-MC: https://www.midnight-commander.org/ticket/2987
Bug-MC: https://www.midnight-commander.org/ticket/2110
Bug-Debian: http://bugs.debian.org/703741
Description: clear unfinished text before 'cd' to avoid accidental execution
send C-k C-u to the shell before sending 'cd' command to erase previous
unfinished text (C-k is needed for bash if the cursor is in the middle of
the line).
--- a/src/subshell/common.c
+++ b/src/subshell/common.c
@@ -1719,9 +1719,9 @@
}
}
/* The initial space keeps this out of the command history (in bash
because we set "HISTCONTROL=ignorespace") */
- write_all (mc_global.tty.subshell_pty, " cd ", 4);
+ write_all (mc_global.tty.subshell_pty, "\013\025 cd ", 6);
if (vpath != NULL)
{
const char *translate;
|