Ignore mappings in paste code (#14)
This commit is contained in:
parent
968f5762c4
commit
dcdd6d98d1
@ -332,13 +332,14 @@ impl State {
|
|||||||
fn edit_paste(&self, clipboard: &str) {
|
fn edit_paste(&self, clipboard: &str) {
|
||||||
let nvim = self.nvim();
|
let nvim = self.nvim();
|
||||||
if let Some(mut nvim) = nvim {
|
if let Some(mut nvim) = nvim {
|
||||||
let paste_code = if self.mode.is(&mode::NvimMode::Normal) {
|
if self.mode.is(&mode::NvimMode::Insert) || self.mode.is(&mode::NvimMode::Normal) {
|
||||||
format!("\"{}p", clipboard)
|
let paste_code = format!("normal! \"{}p", clipboard);
|
||||||
|
nvim.command(&paste_code).report_err(&mut *nvim);
|
||||||
} else {
|
} else {
|
||||||
format!("<C-r>{}", clipboard)
|
let paste_code = format!("<C-r>{}", clipboard);
|
||||||
|
nvim.input(&paste_code).report_err(&mut *nvim);
|
||||||
};
|
};
|
||||||
|
|
||||||
nvim.input(&paste_code).report_err(&mut *nvim);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user