Add nonblocking check for resize event

Refactor error report
This commit is contained in:
daa
2017-12-11 23:15:17 +03:00
parent e6bce42532
commit 9edfa9b609
9 changed files with 38 additions and 47 deletions

View File

@@ -70,7 +70,7 @@ impl Manager {
if let Some(mut nvim) = self.nvim() {
let loaded_plug = nvim.eval("exists('g:loaded_plug')");
loaded_plug
.ok_and_report(&mut *nvim)
.ok_and_report()
.and_then(|loaded_plug| loaded_plug.as_i64())
.map_or(false, |loaded_plug| if loaded_plug > 0 {
true
@@ -84,9 +84,7 @@ impl Manager {
pub fn reload(&self, path: &str) {
if let Some(mut nvim) = self.nvim() {
nvim.command(&format!("source {}", path)).report_err(
&mut *nvim,
);
nvim.command(&format!("source {}", path)).report_err();
}
}
}