You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Environment (please complete the following information):
OS: macOS Catalina 10.15.6
(Neo)Vim version: 0.4.4
vim-clap version: 0.23 (8b618fc)
Have you reproduced with a minimal vimrc: yes
Have you updated to the latest plugin version: yes
Have you upgraded to/compiled the latest Rust binary: yes
Describe the bug
After selecting multiple files to open using <tab> and updating the search pattern, the files selected change. Put differently, the selections appear to be index-based and when the list updates in response to a change in search pattern, the same indices are selected even though the filenames in those indices are now different.
Clap debug
has cargo: 1
has maple: /<user_path>/.vim/plugged/vim-clap/target/release/maple
maple info: version 0.1.23, built for x86_64-apple-darwin by rustc 1.50.0 (cb75ad5db 2021-02-10).
has +python3: 1
has py dynamic module: 1
has ctags:
vim-clap: Ensure ctags executable is in your PATH and has the JSON output featurectags without JSON output support
Current sync impl: Python
Current FileType:
Third Party Providers: []
Global Options:
let g:clap#autoload_dir = '/<user_path>/.vim/plugged/vim-clap/autoload'
let g:clap#provider_alias = {'gfiles': 'git_files', 'hist:': 'command_history', 'hist/': 'search_history'}
let g:clap_background_shadow_blend = 50
let g:clap_disable_bottom_top = 0
let g:clap_disable_matches_indicator = v:false
let g:clap_disable_optional_async = v:false
let g:clap_disable_run_rooter = v:false
let g:clap_enable_background_shadow = v:true
let g:clap_enable_debug = v:false
let g:clap_enable_icon = 0
let g:clap_forerunner_status_sign = {'done': '•', 'running': '!', 'using_cache': '*'}
let g:clap_insert_mode_only = v:false
let g:clap_multi_selection_warning_silent = 0
let g:clap_no_matches_msg = 'NO MATCHES FOUND'
let g:clap_open_action = {'ctrl-v': 'vsplit', 'ctrl-x': 'split', 'ctrl-t': 'tab split'}
let g:clap_open_preview = 'always'
let g:clap_popup_border = 'rounded'
let g:clap_preview_direction = 'LR'
let g:clap_preview_size = 5
let g:clap_providers_relaunch_code = '@@'
let g:clap_search_box_border_style = 'nil'
let g:clap_search_box_border_symbols = {'nil': ['', ''], 'curve': ['', ''], 'arrow': ['', '']}
Provider Variables:
[]
Note that the selections have updated to different files. Hitting <Enter> now will open the visible files, not the original selection.
Expected behavior
One of either:
When a file is selected and the search pattern is changed, the selected file is persisted. This behavior would make Clap files much more powerful as it would allow the user to quickly add files adhering to different patterns to the quickfix list for easy navigation.
If this behavior is not the desired behavior, then all selections should be cleared upon pattern change. I struggle to think of a use case where updating the selected files in place based on the pattern is desirable.
Screenshots
Selecting first 5:
Updating pattern:
Hitting enter:
The text was updated successfully, but these errors were encountered:
That would be better and more intuitive behavior for sure.
The ability to retain selected entries across different patterns within a single Clap search session would be amazing though. I imagine the current implementation is largely "stateless", and therefore persisting selections and displaying them would require some nontrivial changes to the existing implementation. Happy to make a separate feature request for this though.
Environment (please complete the following information):
8b618fc
)Describe the bug
After selecting multiple files to open using
<tab>
and updating the search pattern, the files selected change. Put differently, the selections appear to be index-based and when the list updates in response to a change in search pattern, the same indices are selected even though the filenames in those indices are now different.Clap debug
To Reproduce
Steps to reproduce the behavior:
min.vim
:Start (neo)vim with command:
vim -u min.vim
Create a directory with the following structure:
base/
:Clap files
sub2
<Enter>
now will open the visible files, not the original selection.Expected behavior
One of either:
Clap files
much more powerful as it would allow the user to quickly add files adhering to different patterns to the quickfix list for easy navigation.Screenshots
Selecting first 5:
Updating pattern:
Hitting
enter
:The text was updated successfully, but these errors were encountered: