aboutsummaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/main.rs b/src/main.rs
index d96119e..ca1b653 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -50,8 +50,15 @@ fn main() {
50 ), 50 ),
51 } 51 }
52 } else { 52 } else {
53 let mut s = termion().unwrap();
54 let app = App::load_state(); 53 let app = App::load_state();
54 let m = app.message.clone();
55 unsafe { signal_hook::register(signal_hook::SIGINT, move || {
56 std::fs::File::create("killed").unwrap();
57 m.write().unwrap().set_message("Use the :q command to quit");
58 }) }.unwrap();
59
60 let mut s = termion().unwrap();
61
55 let layout = NamedView::new( 62 let layout = NamedView::new(
56 "Frame", 63 "Frame",
57 LinearLayout::vertical().child(NamedView::new("Main", app)), 64 LinearLayout::vertical().child(NamedView::new("Main", app)),