diff options
Diffstat (limited to 'lua/telescope/actions/init.lua')
| -rw-r--r-- | lua/telescope/actions/init.lua | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/lua/telescope/actions/init.lua b/lua/telescope/actions/init.lua index 7ca47c7..1faaf30 100644 --- a/lua/telescope/actions/init.lua +++ b/lua/telescope/actions/init.lua @@ -113,10 +113,15 @@ function actions.select_all(prompt_bufnr) if not current_picker._multi:is_selected(entry) then current_picker._multi:add(entry) if current_picker:can_select_row(row) then + local caret = current_picker:update_prefix(entry, row) + if current_picker._selection_entry == entry and current_picker._selection_row == row then + current_picker.highlighter:hi_selection(row, caret:match "(.*%S)") + end current_picker.highlighter:hi_multiselect(row, current_picker._multi:is_selected(entry)) end end end) + current_picker:get_status_updater(current_picker.prompt_win, current_picker.prompt_bufnr)() end --- Drop all entries from the current multi selection. @@ -126,9 +131,14 @@ function actions.drop_all(prompt_bufnr) action_utils.map_entries(prompt_bufnr, function(entry, _, row) current_picker._multi:drop(entry) if current_picker:can_select_row(row) then + local caret = current_picker:update_prefix(entry, row) + if current_picker._selection_entry == entry and current_picker._selection_row == row then + current_picker.highlighter:hi_selection(row, caret:match "(.*%S)") + end current_picker.highlighter:hi_multiselect(row, current_picker._multi:is_selected(entry)) end end) + current_picker:get_status_updater(current_picker.prompt_win, current_picker.prompt_bufnr)() end --- Toggle multi selection for all entries. @@ -139,9 +149,14 @@ function actions.toggle_all(prompt_bufnr) action_utils.map_entries(prompt_bufnr, function(entry, _, row) current_picker._multi:toggle(entry) if current_picker:can_select_row(row) then + local caret = current_picker:update_prefix(entry, row) + if current_picker._selection_entry == entry and current_picker._selection_row == row then + current_picker.highlighter:hi_selection(row, caret:match "(.*%S)") + end current_picker.highlighter:hi_multiselect(row, current_picker._multi:is_selected(entry)) end end) + current_picker:get_status_updater(current_picker.prompt_win, current_picker.prompt_bufnr)() end function actions.preview_scrolling_up(prompt_bufnr) |
