Make ui attach really async
This commit is contained in:
parent
e7cd39607f
commit
cda55e0f7d
32
src/shell.rs
32
src/shell.rs
@ -766,25 +766,19 @@ fn init_nvim_async(
|
|||||||
});
|
});
|
||||||
|
|
||||||
// attach ui
|
// attach ui
|
||||||
let mut nvim = Some(nvim);
|
if let Err(err) = nvim::post_start_init(
|
||||||
glib::idle_add(move || {
|
&mut nvim,
|
||||||
let mut nvim = nvim.take().unwrap();
|
options.open_path.as_ref(),
|
||||||
if let Err(err) = nvim::post_start_init(
|
cols as u64,
|
||||||
&mut nvim,
|
rows as u64,
|
||||||
options.open_path.as_ref(),
|
)
|
||||||
cols as u64,
|
{
|
||||||
rows as u64,
|
show_nvim_init_error(&err, state_arc.clone());
|
||||||
)
|
} else {
|
||||||
{
|
let mut state = state_arc.borrow_mut();
|
||||||
show_nvim_init_error(&err, state_arc.clone());
|
state.nvim.borrow_mut().set_initialized(nvim);
|
||||||
} else {
|
state.cursor.as_mut().unwrap().start();
|
||||||
let mut state = state_arc.borrow_mut();
|
}
|
||||||
state.nvim.borrow_mut().set_initialized(nvim);
|
|
||||||
state.cursor.as_mut().unwrap().start();
|
|
||||||
}
|
|
||||||
|
|
||||||
Continue(false)
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fn draw_initializing(state: &State, ctx: &cairo::Context) {
|
fn draw_initializing(state: &State, ctx: &cairo::Context) {
|
||||||
|
Loading…
Reference in New Issue
Block a user