Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The `BTags` command is declared with optional `[QUERY]` while the `Tags` command is declared with optional `[PREFIX]`. The query behavior in `BTags` source generator is less restrictive compared to `Tags` whose source is generated using the `readtags` external command, where tags are only listed if `PREFIX` is an exact match. This commit relaxes the exact prefix match when `readtags` is used to allow for a fuzzy prefix similar to the source generator of `BTags`. The `fzf` fuzzy score ranking in the `s:tags_sink` will still rank the best fuzzy match on top, same as if the match was exact like in the current implementation. The changes in this commit are useful for tags that contain some scope prefixes like the functions `s:tags_sink` or `fzf#vim#tags` in vim-script code, in combination with a key mapping of the form ```vim nnoremap <silent> <leader>l :execute "Tags '" . expand('<cword>')<CR> nnoremap <silent> <leader>bl :execute "BTags '" . expand('<cword>')<CR> ``` If the cursor is placed on the word "tags" in this example `fzf#vim#tags`, the relaxed `Tags` query call will list the tags entry if `<cword>` expands to "tags", while the current implementation will not. Inconsistently, the `BTags` call will list the tags entry with its current implementation.
- Loading branch information