summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2018-04-08 20:28:11 +0200
committerMatthias Beyer <mail@beyermatthias.de>2018-04-08 20:28:11 +0200
commitc5c9c7b9baf9a75bb239ff11f54f3fb57b7ab4f0 (patch)
tree9a17361e093fe1feb826e3740bc84336981cca03 /lib
parent8b29e9d7480cd83b51aa1f8199ffd1bb6d6172c6 (diff)
Fix: Editor commands should be split at whitespace
This fixes the following problem: If the editor setting was "vim " instead of "vim", the editor was called with `"vim" " "`, which resulted in unexpected behaviour. The patch fixes this.
Diffstat (limited to 'lib')
-rw-r--r--lib/core/libimagrt/src/runtime.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/core/libimagrt/src/runtime.rs b/lib/core/libimagrt/src/runtime.rs
index 07b24bd4..ccb70609 100644
--- a/lib/core/libimagrt/src/runtime.rs
+++ b/lib/core/libimagrt/src/runtime.rs
@@ -472,7 +472,7 @@ impl<'a> Runtime<'a> {
.ok_or_else(|| RuntimeErrorKind::IOError.into())
.map_dbg(|s| format!("Editing with '{}'", s))
.and_then(|s| {
- let mut split = s.split(" ");
+ let mut split = s.split_whitespace();
let command = split.next();
if command.is_none() {
return Ok(None)