Focus previous view on close instead of next
This commit is contained in:
parent
a523d0ce7c
commit
d7d5cf06ee
1 changed files with 2 additions and 2 deletions
|
@ -124,8 +124,8 @@ pub const View = struct {
|
||||||
if (current_focus == view) {
|
if (current_focus == view) {
|
||||||
// If there are more views
|
// If there are more views
|
||||||
if (root.views.len > 1) {
|
if (root.views.len > 1) {
|
||||||
// Focus the next view.
|
// Focus the previous view.
|
||||||
root.focusNextView();
|
root.focusPrevView();
|
||||||
} else {
|
} else {
|
||||||
// Otherwise clear the focus
|
// Otherwise clear the focus
|
||||||
root.focused_view = null;
|
root.focused_view = null;
|
||||||
|
|
Loading…
Reference in a new issue