aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Letan <lthms@soap.coffee>2022-09-10 14:58:23 +0200
committerThomas Letan <lthms@soap.coffee>2022-09-10 14:58:23 +0200
commit4341e0f9340fda00b8599b1d4c8c1a65b1a3d5c1 (patch)
tree8e2af2134ac039f949c30b195e04bc6e14cc0c80
parentHandle 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.ml4
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