diff options
| author | elianiva <dicha.arkana03@gmail.com> | 2021-02-24 21:40:11 +0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-02-24 21:40:11 +0700 |
| commit | 8b3d08d7a6e8eccc2997ccbf91a7e12d506196e5 (patch) | |
| tree | 46c00cfe4d97351a7c0041e7b17f72fd45def20b /lua/telescope/actions/init.lua | |
| parent | b5051eeb01bfbff2df2b46f59c13318987ed1e59 (diff) | |
fix: scroll misbehaving + fixed jump to middle (#547)
* fix: scroll misbehaving + fixed jump to middle
* add test
* fixx
* fix nil
Diffstat (limited to 'lua/telescope/actions/init.lua')
| -rw-r--r-- | lua/telescope/actions/init.lua | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lua/telescope/actions/init.lua b/lua/telescope/actions/init.lua index 19a6d04..bf6bd4f 100644 --- a/lua/telescope/actions/init.lua +++ b/lua/telescope/actions/init.lua @@ -80,7 +80,11 @@ end function actions.move_to_middle(prompt_bufnr) local current_picker = actions.get_current_picker(prompt_bufnr) - current_picker:set_selection(p_scroller.middle(nil, current_picker.max_results, nil)) + current_picker:set_selection(p_scroller.middle( + current_picker.sorting_strategy, + current_picker.max_results, + current_picker.manager:num_results() + )) end function actions.move_to_bottom(prompt_bufnr) |
