diff options
Diffstat (limited to 'src/main.rs')
| -rw-r--r-- | src/main.rs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/main.rs b/src/main.rs index 79bff16..844b396 100644 --- a/src/main.rs +++ b/src/main.rs @@ -7,7 +7,12 @@ use std::io::Write; use std::path::Path; fn edit(file: &OsStr) -> Result<(), String> { - let _raw_handle = term::raw(); + let _raw_handle = match term::raw() { + Some(h) => h, + None => { + return Err(String::from("cannot put terminal in raw mode")); + } + }; let r = match Rope::open(Path::new(file)) { Ok(r) => r, |
