LeaderF icon indicating copy to clipboard operation
LeaderF copied to clipboard

how does g:Lf_RootMarkers effect working directory?

Open xaljer opened this issue 5 years ago • 1 comments

  • vim or neovim?
    • [ ] vim
    • [x] neovim
  • Output of vim --version or nvim --version:
  • Output of :echo has("python"): 0
  • Output of :echo has("python3"): 1
  • Output of :echo &pythondll(only vim, not neovim):
  • Output of :echo &pythonthreedll(only vim, not neovim):
  • Output of :py print(sys.version):
  • Output of :py3 print(sys.version):
  • Output of :echo g:Lf_Debug_Cmd:
  • Output of :echo g:Lf_FilesFromCache:
  • Operating system:
    • [x] Linux
    • [ ] Mac OS X
    • [ ] Windows
    • [ ] Etc.
  • Configurations related to LeaderF in vimrc:

Describe your question, feature request, or bug.

I use follow code to detect git root in a vim plugin: let s:git_root = finddir('.git/..', expand('%:p:h').';') I always keep my pwd but I found that when I set g:Lf_RootMarkers to mark a sub directory of pwd and search using Leaderf rg, finddir('.git/..', expand('%:p:h').';') will return the path relative to the sub directory indicate by g:Lf_RootMarkers but not the pwd. And at this time, I use :echo(finddir('.git/..', expand('%:p:h').';')), result is OK. Is there some case that Leader rg lunch window using g:Lf_RootMarkers will effect finddir?

Steps to reproduce

Actual behaviour

Expected behaviour

xaljer avatar Sep 13 '20 02:09 xaljer

Leaderf rg also uses g:Lf_WorkingDirectoryMode.

Yggdroot avatar Sep 15 '20 04:09 Yggdroot