Merge branch 'master' into plug-manager
This commit is contained in:
34
src/shell.rs
34
src/shell.rs
@@ -333,7 +333,7 @@ impl State {
|
||||
let nvim = self.nvim();
|
||||
if let Some(mut nvim) = nvim {
|
||||
if self.mode.is(&mode::NvimMode::Insert) || self.mode.is(&mode::NvimMode::Normal) {
|
||||
let paste_code = format!("normal! \"{}p", clipboard);
|
||||
let paste_code = format!("normal! \"{}P", clipboard);
|
||||
nvim.command(&paste_code).report_err(&mut *nvim);
|
||||
} else {
|
||||
let paste_code = format!("<C-r>{}", clipboard);
|
||||
@@ -766,25 +766,19 @@ fn init_nvim_async(
|
||||
});
|
||||
|
||||
// attach ui
|
||||
let mut nvim = Some(nvim);
|
||||
glib::idle_add(move || {
|
||||
let mut nvim = nvim.take().unwrap();
|
||||
if let Err(err) = nvim::post_start_init(
|
||||
&mut nvim,
|
||||
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();
|
||||
state.nvim.borrow_mut().set_initialized(nvim);
|
||||
state.cursor.as_mut().unwrap().start();
|
||||
}
|
||||
|
||||
Continue(false)
|
||||
});
|
||||
if let Err(err) = nvim::post_start_init(
|
||||
&mut nvim,
|
||||
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();
|
||||
state.nvim.borrow_mut().set_initialized(nvim);
|
||||
state.cursor.as_mut().unwrap().start();
|
||||
}
|
||||
}
|
||||
|
||||
fn draw_initializing(state: &State, ctx: &cairo::Context) {
|
||||
|
||||
Reference in New Issue
Block a user