Fix editor command
do inherit stdin and stderr from parent process, to not break terminal editors when editing stuff. vim printed "Input not from terminal" warning messages. This was fixed by this commit.
This commit is contained in:
parent
1bd91cfd0b
commit
43a3f4a5db
1 changed files with 6 additions and 1 deletions
|
@ -458,7 +458,12 @@ impl<'a> Runtime<'a> {
|
||||||
.value_of("editor")
|
.value_of("editor")
|
||||||
.map(String::from)
|
.map(String::from)
|
||||||
.or(env::var("EDITOR").ok())
|
.or(env::var("EDITOR").ok())
|
||||||
.map(Command::new)
|
.map(|s| {
|
||||||
|
let mut c = Command::new(s);
|
||||||
|
c.stdin(::std::process::Stdio::inherit());
|
||||||
|
c.stderr(::std::process::Stdio::inherit());
|
||||||
|
c
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn stdout(&self) -> OutputProxy {
|
pub fn stdout(&self) -> OutputProxy {
|
||||||
|
|
Loading…
Reference in a new issue