Resize check

This commit is contained in:
daa 2017-10-11 19:09:49 +03:00
parent 557f3dd0f6
commit 7065fbe2c7

View File

@ -839,8 +839,10 @@ impl RedrawEvents for State {
fn on_resize(&mut self, columns: u64, rows: u64) -> RepaintMode {
match self.resize_state.get() {
ResizeState::NvimResizeTimer(..) => {
if self.model.columns != columns as usize || self.model.rows != rows as usize {
self.model = UiModel::new(rows, columns);
}
}
ResizeState::Wait |
ResizeState::NvimResizeRequest(..) => {
if self.model.columns != columns as usize || self.model.rows != rows as usize {