Focus previous view on close instead of next

This commit is contained in:
Isaac Freund 2020-03-28 14:20:53 +01:00
parent a523d0ce7c
commit d7d5cf06ee
No known key found for this signature in database
GPG key ID: 86DED400DDFD7A11

View file

@ -124,8 +124,8 @@ pub const View = struct {
if (current_focus == view) {
// If there are more views
if (root.views.len > 1) {
// Focus the next view.
root.focusNextView();
// Focus the previous view.
root.focusPrevView();
} else {
// Otherwise clear the focus
root.focused_view = null;