Don't crash on error setting autocmd

This commit is contained in:
Christopher Lübbemeier 2018-03-04 13:39:01 +01:00
parent d30f65c45f
commit ba60a863b2

View File

@ -96,7 +96,9 @@ impl Subscriptions {
nvim.command(&format!(
"au {} * call rpcnotify(1, 'subscription', '{}', {} {})",
event_name, event_name, i, args,
)).expect("Could not set autocmd");
)).unwrap_or_else(|err| {
error!("Could not set autocmd: {}", err);
});
}
}
}