Skip to content

Commit

Permalink
Merge pull request #176 from kxxt/fix-resize-event
Browse files Browse the repository at this point in the history
Fix parameter order of crossterm resize event
  • Loading branch information
a-kenji authored Apr 19, 2024
2 parents a2760bb + 70c05fd commit 7b482c4
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion examples/nested_shell.rs
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ fn run<B: Backend>(
Event::FocusLost => {}
Event::Mouse(_) => {}
Event::Paste(_) => todo!(),
Event::Resize(rows, cols) => {
Event::Resize(cols, rows) => {
parser.write().unwrap().set_size(rows, cols);
}
}
Expand Down
2 changes: 1 addition & 1 deletion examples/nested_shell_async.rs
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ async fn run<B: Backend>(
Event::FocusLost => {}
Event::Mouse(_) => {}
Event::Paste(_) => todo!(),
Event::Resize(rows, cols) => {
Event::Resize(cols, rows) => {
parser.write().unwrap().set_size(rows, cols);
}
}
Expand Down
2 changes: 1 addition & 1 deletion examples/smux.rs
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ async fn main() -> io::Result<()> {
}
}
},
Event::Resize(rows, cols) => {
Event::Resize(cols, rows) => {
tracing::info!("Resized to: rows: {} cols: {}", rows, cols);
for pane in panes.iter_mut() {
pane.parser.write().unwrap().set_size(rows, cols);
Expand Down

0 comments on commit 7b482c4

Please sign in to comment.