summaryrefslogtreecommitdiff
path: root/lua/telescope/pickers/scroller.lua
diff options
context:
space:
mode:
authorTJ DeVries <devries.timothyj@gmail.com>2021-02-27 15:06:04 -0500
committerGitHub <noreply@github.com>2021-02-27 21:06:04 +0100
commit11674ac021e39f92eb51d2884904b0300c5133a3 (patch)
treeced317f650b35b9ea7466097a730f76740de1725 /lua/telescope/pickers/scroller.lua
parentca92ec1a830a61a0b88fff925f2146ab46e0f7c9 (diff)
feat: multi selection. Only integrates with send_selected_to_qflist (#551)
This will not yet work with select actions. More work is needed in that case. Co-authored-by: Simon Hauser <Simon-Hauser@outlook.de>
Diffstat (limited to 'lua/telescope/pickers/scroller.lua')
-rw-r--r--lua/telescope/pickers/scroller.lua12
1 files changed, 12 insertions, 0 deletions
diff --git a/lua/telescope/pickers/scroller.lua b/lua/telescope/pickers/scroller.lua
index b77fc96..d2aed2c 100644
--- a/lua/telescope/pickers/scroller.lua
+++ b/lua/telescope/pickers/scroller.lua
@@ -99,4 +99,16 @@ scroller.bottom = function(sorting_strategy, max_results, num_results)
return max_results - 1
end
+scroller.better = function(sorting_strategy)
+ if sorting_strategy == 'ascending' then
+ return -1
+ else
+ return 1
+ end
+end
+
+scroller.worse = function(sorting_strategy)
+ return -(scroller.better(sorting_strategy))
+end
+
return scroller