From 2478db8c75fd6d2ff3fa7f41b2c1c7c52c7147df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ole=20J=C3=B8rgen=20Br=C3=B8nner?= Date: Sun, 17 Sep 2017 11:35:31 +0200 Subject: [PATCH] PreviewedWindowNavigator: Don't wrap around when preview not visible --- tiling.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tiling.js b/tiling.js index 6e92ce8..7327482 100644 --- a/tiling.js +++ b/tiling.js @@ -563,11 +563,11 @@ PreviewedWindowNavigator = new Lang.Class({ _initialSelection: function(backward, binding) { if (backward) - this._select(this._previous()); + this._select(Math.min(this._selectedIndex, this._previous())); else if (this._items.length == 1) this._select(0); else - this._select(this._next()); + this._select(Math.max(this._selectedIndex, this._next())); }, _getWindowList: function() {