aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornc <[email protected]>2020-08-06 19:51:26 +0100
committernc <[email protected]>2020-08-06 19:51:26 +0100
commit78685f7cdca15a191a5d086321368e475b0c2ab2 (patch)
tree6d613a1b59ca277a82c8a688ec029774d10f31d5
parent9777930868591abdf4a533e4059cc4fd08898521 (diff)
Revert "include only minimal code changes to add ctrl-c capturing functionality"
This reverts commit 9777930868591abdf4a533e4059cc4fd08898521.
-rw-r--r--src/app/impl_view.rs4
-rw-r--r--src/main.rs4
2 files changed, 0 insertions, 8 deletions
diff --git a/src/app/impl_view.rs b/src/app/impl_view.rs
index 5f313f7..892b00c 100644
--- a/src/app/impl_view.rs
+++ b/src/app/impl_view.rs
@@ -165,10 +165,6 @@ impl View for App {
165 self.message.set_kind(MessageKind::Info); 165 self.message.set_kind(MessageKind::Info);
166 return EventResult::Consumed(None); 166 return EventResult::Consumed(None);
167 } 167 }
168 Event::CtrlChar('c') => {
169 self.message.set_message("Use the :q command to quit");
170 return EventResult::Consumed(None);
171 }
172 168
173 /* Every keybind that is not caught by App trickles 169 /* Every keybind that is not caught by App trickles
174 * down to the focused habit. We sift back to today 170 * down to the focused habit. We sift back to today
diff --git a/src/main.rs b/src/main.rs
index 3ec964a..d96119e 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -52,10 +52,6 @@ fn main() {
52 } else { 52 } else {
53 let mut s = termion().unwrap(); 53 let mut s = termion().unwrap();
54 let app = App::load_state(); 54 let app = App::load_state();
55
56 // prevent Ctrl-C from killing the app and allow the app to override it.
57 s.clear_global_callbacks(cursive::event::Event::CtrlChar('c'));
58
59 let layout = NamedView::new( 55 let layout = NamedView::new(
60 "Frame", 56 "Frame",
61 LinearLayout::vertical().child(NamedView::new("Main", app)), 57 LinearLayout::vertical().child(NamedView::new("Main", app)),