Yggdroot / LeaderF

An efficient fuzzy finder that helps to locate files, buffers, mrus, gtags, etc. on the fly for both vim and neovim.
Apache License 2.0
2.14k stars 180 forks source link

Regex mode of Leaderf rg matching result is unexpected #1067

Closed bbchung closed 4 months ago

bbchung commented 4 months ago

Describe your question, feature request, or bug.

use :Leaderf rg with regex mode should not match with file name

Steps to reproduce

when there is a file named "item.cpp" under folders, use :Leaderf rg then type is.*ok(regex mode)

Actual behaviour

the "i" of item.cpp will be matched

Expected behaviour

the "i" of item.cpp should not be matched

Yggdroot commented 4 months ago

image

i is not matched.

bbchung commented 4 months ago

Another easy example: there are 2 txt files, both have single line enough image image image image

The last image show that when I insert is.*enough match the line in is.txt(seems is matches in file path, enough matches in file content), it should be a unexpected matching?

Yggdroot commented 4 months ago

Oh, it works as disigned. It's better not use the regex mode, use the fuzzy mode instead.