cursor: leave mode if target view is destroyed

This commit is contained in:
Isaac Freund
2020-08-21 16:23:23 +02:00
parent db416eb119
commit 7274761069
3 changed files with 29 additions and 13 deletions

View File

@ -261,6 +261,8 @@ pub fn handleViewUnmap(self: *Self, view: *View) void {
}
}
self.cursor.handleViewUnmap(view);
// If the unmapped view is focused, choose a new focus
if (self.focused == .view and self.focused.view == view) self.focus(null);
}