Fix quit by :q
This commit is contained in:
parent
225a2bf6c7
commit
59a735c521
@ -34,7 +34,7 @@ pub const MINIMUM_SUPPORTED_NVIM_VERSION: &str = "0.2";
|
||||
|
||||
macro_rules! idle_cb_call {
|
||||
($state:ident.$cb:ident($( $x:expr ),*)) => (
|
||||
gtk::idle_add(move || {
|
||||
glib::idle_add(move || {
|
||||
if let Some(ref cb) = $state.borrow().$cb {
|
||||
(&mut *cb.borrow_mut())($($x),*);
|
||||
}
|
||||
|
@ -125,7 +125,13 @@ impl Ui {
|
||||
shell.grab_focus();
|
||||
|
||||
let comps_ref = self.comps.clone();
|
||||
shell.set_detach_cb(Some(move || comps_ref.borrow().close_window()));
|
||||
shell.set_detach_cb(Some(move || {
|
||||
let comps_ref = comps_ref.clone();
|
||||
gtk::idle_add(move || {
|
||||
comps_ref.borrow().close_window();
|
||||
Continue(false)
|
||||
});
|
||||
}));
|
||||
}
|
||||
|
||||
fn create_main_menu(&self, app: >k::Application) {
|
||||
|
Loading…
Reference in New Issue
Block a user