Make Windows resize event match terminal::size
(#714)
This commit is contained in:
parent
263a0fb5cf
commit
f845cea516
@ -64,7 +64,11 @@ impl EventSource for WindowsEventSource {
|
|||||||
mouse_event
|
mouse_event
|
||||||
}
|
}
|
||||||
InputRecord::WindowBufferSizeEvent(record) => {
|
InputRecord::WindowBufferSizeEvent(record) => {
|
||||||
Some(Event::Resize(record.size.x as u16, record.size.y as u16))
|
// windows starts counting at 0, unix at 1, add one to replicate unix behaviour.
|
||||||
|
Some(Event::Resize(
|
||||||
|
record.size.x as u16 + 1,
|
||||||
|
record.size.y as u16 + 1,
|
||||||
|
))
|
||||||
}
|
}
|
||||||
InputRecord::FocusEvent(record) => {
|
InputRecord::FocusEvent(record) => {
|
||||||
let event = if record.set_focus {
|
let event = if record.set_focus {
|
||||||
|
Loading…
Reference in New Issue
Block a user