-
-
Notifications
You must be signed in to change notification settings - Fork 853
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
only_cwd on paths with partial matches #2843
Labels
Comments
Thanks for the detailed bug report. I can reproduce this. Let me take a look at what's happening. |
jamestrew
added a commit
that referenced
this issue
Jan 3, 2024
closes #2843 Previously, bad partial matches between cwd and target buffer path would result in non-cwd buffers showing up in the picker despite using `only_cwd=true`. eg. cwd = `/foo/bar` target buffer = `foo/bar1/baz.txt` The target buffer starts with the cwd path. This is fixed by appending a path separator before comparing/matching: eg. cwd = `/foo/bar/` target buffer = `foo/bar1/baz.txt`
jamestrew
added a commit
that referenced
this issue
Jan 4, 2024
closes #2843 Previously, bad partial matches between cwd and target buffer path would result in non-cwd buffers showing up in the picker despite using `only_cwd=true`. eg. cwd = `/foo/bar` target buffer = `foo/bar1/baz.txt` The target buffer starts with the cwd path. This is fixed by appending a path separator before comparing/matching: eg. cwd = `/foo/bar/` target buffer = `foo/bar1/baz.txt`
jamestrew
added a commit
that referenced
this issue
Jan 4, 2024
closes #2843 Previously, bad partial matches between cwd and target buffer path would result in non-cwd buffers showing up in the picker despite using `only_cwd=true`. eg. cwd = `/foo/bar` target buffer = `foo/bar1/baz.txt` The target buffer starts with the cwd path. This is fixed by appending a path separator before comparing/matching: eg. cwd = `/foo/bar/` target buffer = `foo/bar1/baz.txt`
jamestrew
added a commit
that referenced
this issue
Jan 4, 2024
#2845) closes #2843 Previously, bad partial matches between cwd and target buffer path would result in non-cwd buffers showing up in the picker despite using `only_cwd=true`. eg. cwd = `/foo/bar` target buffer = `foo/bar1/baz.txt` The target buffer starts with the cwd path. This is fixed by appending a path separator before comparing/matching: eg. cwd = `/foo/bar/` target buffer = `foo/bar1/baz.txt`
Conni2461
pushed a commit
that referenced
this issue
Mar 11, 2024
#2845) closes #2843 Previously, bad partial matches between cwd and target buffer path would result in non-cwd buffers showing up in the picker despite using `only_cwd=true`. eg. cwd = `/foo/bar` target buffer = `foo/bar1/baz.txt` The target buffer starts with the cwd path. This is fixed by appending a path separator before comparing/matching: eg. cwd = `/foo/bar/` target buffer = `foo/bar1/baz.txt` (cherry picked from commit c621f71)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
This doesn't work on directories with partial matches in their names:
test1
,test12
Neovim version
Operating system and version
arch linux
Telescope version / branch / rev
main
checkhealth telescope
Steps to reproduce
Create the following tree structure on a new folder (any name will do) and
cd
into it.. ├── repro.lua ├── test1 │ └── test1.md (content is not necessary) └── test12 └── test12.md (content is not necessary) 3 directories, 3 files
Paste the following snippet into
repro.lua
and open vim with this commandnvim --clean +'so repro.lua'
Steps
tcd test1
and opentest1.md
filetcd test12
and opentest12.md
file<leader>fb
You will notice that
test12
folder only has 1 buffer (as it should) buttest1
folder is not respecting theonly_cwd
option because it shows 2 buffers.Expected behavior
only_cwd
should workActual behavior
only_cwd
doesn't workMinimal config
The text was updated successfully, but these errors were encountered: