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| {
let mut ui = ui_cell.borrow_mut();
SET.with(|set_cell| { SET.with(|set_cell| {
let mut set = set_cell.borrow_mut(); let mut set = set_cell.borrow_mut();
// rpc is priority for font // rpc is priority for font
if set.font_source != FontSource::Rpc { if set.font_source != FontSource::Rpc {
set.update_font(&mut ui.shell); SHELL!(shell = {
ui.shell.on_redraw(&RepaintMode::All); set.update_font(&mut shell);
} shell.on_redraw(&RepaintMode::All);
}); });
}
}); });
} }