mouse: don't translateMouse if we have 0 sized screen
This commit is contained in:
parent
1b9fcb1fa2
commit
0e06467a61
1 changed files with 1 additions and 0 deletions
|
@ -698,6 +698,7 @@ pub fn setMouseMode(self: *Vaxis, tty: AnyWriter, enable: bool) !void {
|
|||
|
||||
/// Translate pixel mouse coordinates to cell + offset
|
||||
pub fn translateMouse(self: Vaxis, mouse: Mouse) Mouse {
|
||||
if (self.screen.width == 0 or self.screen.height == 0) return mouse;
|
||||
var result = mouse;
|
||||
if (self.state.pixel_mouse) {
|
||||
std.debug.assert(mouse.xoffset == 0);
|
||||
|
|
Loading…
Add table
Reference in a new issue