Termisu::Event::Resize
Terminal resize event.
Generated when the terminal window size changes (SIGWINCH). Optionally includes previous dimensions for incremental resize handling.
Example:
event = termisu.poll_event
if event.is_a?(Termisu::Event::Resize)
puts "Terminal resized to #{event.width}x#{event.height}"
if event.changed?
puts "Changed from #{event.old_width}x#{event.old_height}"
end
termisu.sync # Force full redraw
end
Constructors
Instance methods
changed?
Returns true if the dimensions have changed from previous values.
Returns true if:
- Previous dimensions are unknown (nil)
- Width or height differs from previous values