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 178 forks source link

Leader mru --project的一个Bug #999

Closed vimerzhao closed 1 year ago

vimerzhao commented 1 year ago

感谢之前对这个Issue的修复 https://github.com/Yggdroot/LeaderF/issues/990

但使用过程中发现有时候两个工程会混乱,原因是只判断前缀是不够的,比如:

在wrok1 里面, mru --project 会匹配到 work 的文件。需要多加一个判断,比如这样

# autoload/leaderf/python/leaderf/mruExpl.py
            lines = [name for name in lines if lfDecode(name).startswith(project_root) and lfDecode(name)[len(project_root)].startswith(os.sep)]
Yggdroot commented 1 year ago

谢谢,修复了。