From 10627e889e82a82560b6fc48ea0ca20e1963d07f Mon Sep 17 00:00:00 2001 From: Simon Hauser Date: Wed, 24 Feb 2021 02:41:00 +0100 Subject: feat: advanced normal mode (#463) Add j and k to normal mode and H and L to jump at top and bottom of displayed results --- lua/telescope/actions/set.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lua/telescope/actions/set.lua') diff --git a/lua/telescope/actions/set.lua b/lua/telescope/actions/set.lua index 13cc75f..4e92848 100644 --- a/lua/telescope/actions/set.lua +++ b/lua/telescope/actions/set.lua @@ -26,7 +26,9 @@ local set = setmetatable({}, { ---@param prompt_bufnr number: The prompt bufnr ---@param change number: The amount to shift the selection by set.shift_selection = function(prompt_bufnr, change) - action_state.get_current_picker(prompt_bufnr):move_selection(change) + local count = vim.v.count + count = count == 0 and 1 or count + action_state.get_current_picker(prompt_bufnr):move_selection(change * count) end --- Select the current entry. This is the action set to overwrite common -- cgit v1.2.3