Small code cleanup

This commit is contained in:
daa 2017-10-11 18:59:23 +03:00
parent 08d8408adc
commit 557f3dd0f6

View File

@ -135,7 +135,7 @@ impl State {
self.nvim.clone()
}
pub fn start_init(&self) -> bool {
pub fn start_nvim_initialization(&self) -> bool {
let mut nvim = self.nvim.borrow_mut();
if nvim.is_uninitialized() {
nvim.set_in_progress();
@ -802,7 +802,7 @@ fn draw_initializing(state: &State, ctx: &cairo::Context) {
fn init_nvim(state_ref: &Arc<UiMutex<State>>) {
let mut state = state_ref.borrow_mut();
if state.start_init() {
if state.start_nvim_initialization() {
let (cols, rows) = state.calc_nvim_size();
state.model = UiModel::new(rows as u64, cols as u64);
state.resize_state.set(
@ -840,7 +840,7 @@ impl RedrawEvents for State {
match self.resize_state.get() {
ResizeState::NvimResizeTimer(..) => {
self.model = UiModel::new(rows, columns);
},
}
ResizeState::Wait |
ResizeState::NvimResizeRequest(..) => {
if self.model.columns != columns as usize || self.model.rows != rows as usize {