diff options
| -rw-r--r-- | popups/launcher/components/App.qml | 6 | ||||
| -rw-r--r-- | popups/launcher/components/Clip.qml | 11 |
2 files changed, 14 insertions, 3 deletions
diff --git a/popups/launcher/components/App.qml b/popups/launcher/components/App.qml index a88c24a..d0bb5a6 100644 --- a/popups/launcher/components/App.qml +++ b/popups/launcher/components/App.qml @@ -25,7 +25,7 @@ IComponent { } } - property string predictiveCompletion: valid ? entries[selectedIndex].name.slice(input.length) : "" + property string predictiveCompletion: valid ? entries[selectedIndex]?.name.slice(input.length) || "" : "" process: function () { const isValid = entries.length > 0; @@ -53,13 +53,13 @@ IComponent { } home: function () { - if (listView.count === 0) + if (selectedIndex <= 0) return true; selectedIndex = -1; selectedIndex = 0; } end: function () { - if (listView.count === 0) + if (selectedIndex + 1 > listView.count - 1) return true; selectedIndex = listView.count; selectedIndex = listView.count - 1; diff --git a/popups/launcher/components/Clip.qml b/popups/launcher/components/Clip.qml index 138cb10..b4daea9 100644 --- a/popups/launcher/components/Clip.qml +++ b/popups/launcher/components/Clip.qml @@ -41,6 +41,17 @@ IComponent { return true; selectedIndex++; } + home: function () { + if (selectedIndex <= 0) + return true; + selectedIndex = -1; + selectedIndex = 0; + } + end: function () { + if (selectedIndex + 1 > listView.count - 1) + return true; + selectedIndex = listView.count - 1; + } onClipHistChanged: { if (selectedIndex !== -1) { |
