diff options
author | Thomas Letan <lthms@soap.coffee> | 2022-09-10 14:58:23 +0200 |
---|---|---|
committer | Thomas Letan <lthms@soap.coffee> | 2022-09-10 14:58:23 +0200 |
commit | 4341e0f9340fda00b8599b1d4c8c1a65b1a3d5c1 (patch) | |
tree | 8e2af2134ac039f949c30b195e04bc6e14cc0c80 | |
parent | Handle window’s renaming (diff) |
Have a more intuitive ribbon’s filling strategy
The main idea is: we don’t want to change the place of the focused
window.
-rw-r--r-- | bin/spatial/ribbon.ml | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/spatial/ribbon.ml b/bin/spatial/ribbon.ml index 176bb10..830dc98 100644 --- a/bin/spatial/ribbon.ml +++ b/bin/spatial/ribbon.ml @@ -105,9 +105,9 @@ let remove_if_present window = let fill_space ribbon = if visible_windows_count ribbon < ribbon.maximum_visible_size then - match (pop_back ribbon.hidden, ribbon.visible) with + match (pop_front ribbon.hidden, ribbon.visible) with | Some (x, hidden), Some (f, l) -> - { ribbon with visible = Some (f + 1, push_front x l); hidden } + { ribbon with visible = Some (f, push_back x l); hidden } | Some (x, hidden), None -> { ribbon with visible = Some (0, [ x ]); hidden } | None, _ -> ribbon |