Fix #11
This commit is contained in:
parent
ab089c9aee
commit
0ff5c29de2
12
src/shell.rs
12
src/shell.rs
@ -831,12 +831,14 @@ 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(..) => (),
|
||||||
|
ResizeState::Wait |
|
||||||
ResizeState::NvimResizeRequest(..) => {
|
ResizeState::NvimResizeRequest(..) => {
|
||||||
self.resize_state.set(ResizeState::Wait);
|
if self.model.columns != columns as usize || self.model.rows != rows as usize {
|
||||||
self.model = UiModel::new(rows, columns);
|
self.resize_state.set(ResizeState::Wait);
|
||||||
self.resize_main_window();
|
self.model = UiModel::new(rows, columns);
|
||||||
},
|
self.resize_main_window();
|
||||||
ResizeState::Wait => unreachable!("Resize event only can be produced by try_nvim_resize"),
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
RepaintMode::Nothing
|
RepaintMode::Nothing
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user