mirror of
https://github.com/zoriya/noctalia-shell.git
synced 2026-08-15 18:43:59 +00:00
Launcher: implement wrapping versions of select next/previous
This commit is contained in:
@@ -221,6 +221,18 @@ NPanel {
|
||||
}
|
||||
}
|
||||
|
||||
function selectNextWrapped() {
|
||||
if (results.length > 0) {
|
||||
selectedIndex = (selectedIndex + 1) % results.length
|
||||
}
|
||||
}
|
||||
|
||||
function selectPreviousWrapped() {
|
||||
if (results.length > 0) {
|
||||
selectedIndex = (((selectedIndex - 1) % results.length) + results.length) % results.length
|
||||
}
|
||||
}
|
||||
|
||||
function selectFirst() {
|
||||
selectedIndex = 0
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user