Resize check

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

View File

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