Fix linux build

This commit is contained in:
daa 2017-03-31 22:04:10 +03:00
parent d4b590b3ee
commit 6b4c1a9a39

View File

@ -1,5 +1,5 @@
#[cfg(unix)] #[cfg(unix)]
use ui::{UI, SET}; use ui::{SET, SH};
#[cfg(unix)] #[cfg(unix)]
use nvim::RepaintMode; use nvim::RepaintMode;
@ -72,16 +72,14 @@ impl Settings {
#[cfg(unix)] #[cfg(unix)]
fn monospace_font_changed() { fn monospace_font_changed() {
UI.with(|ui_cell| { SET.with(|set_cell| {
let mut ui = ui_cell.borrow_mut(); let mut set = set_cell.borrow_mut();
// rpc is priority for font
SET.with(|set_cell| { if set.font_source != FontSource::Rpc {
let mut set = set_cell.borrow_mut(); SHELL!(shell = {
// rpc is priority for font set.update_font(&mut shell);
if set.font_source != FontSource::Rpc { shell.on_redraw(&RepaintMode::All);
set.update_font(&mut ui.shell); });
ui.shell.on_redraw(&RepaintMode::All); }
}
});
}); });
} }