benwainwright / fzf-project

A vim plugin to make project switching easier using fzf.vim
MIT License
48 stars 11 forks source link

neovim: tabs with different projects selected #15

Closed rakesh-mth closed 2 years ago

rakesh-mth commented 2 years ago

Steps to repro:

Open tab and switch to a project Open another tab and switch to a different project switch back to previous tab and run GFiles It finds files from project selected in 2nd tab.

To resolve this issue, had to change execute command in fzfproject#changeDir from

call fzfproject#execute('cd', fnameescape(a:dir), a:context)

to

call fzfproject#execute('lcd', fnameescape(a:dir), a:context)

Do you have any other recommendation to resolve this ? Please let me know if I can create a PR.

benwainwright commented 2 years ago

Thanks for raising the issue!

There was actually a general bug in the autorooting behaviour that I'd missed (not just for tabs). Should be fixed now. Please reopen if it isn't!

rakesh-mth commented 2 years ago

I still have same issue after upgrading this plugin. Could you please try reproduce using above steps ?

benwainwrightcinch commented 2 years ago

@rakesh-mth sorry! In fixing a different bug I introduced a regression in this behaviour :( need to find a way of integration testing vim plugins!

Try now, I think I've fixed it.

rakesh-mth commented 2 years ago

It is still not working for me after update. Thanks for looking into this issue.

benwainwrightcinch commented 2 years ago

Yeah I know why @rakesh-mth I'm looking into it. Its because of this: https://github.com/junegunn/fzf/blob/master/plugin/fzf.vim#L590-L604

benwainwrightcinch commented 2 years ago

@rakesh-mth try now

rakesh-mth commented 2 years ago

After update I am getting below error by just running nvim:

Error detected while processing function fzfproject#autoroot#doroot[14]..fzfproject#autoroot#doroot[14]..fzfproject#autoroot#doroot [14]..fzfproject#autoroot#doroot[14]..fzfproject#autoroot#doroot[14]..

line 14: E132: Function call depth is higher than 'maxfuncdepth'

rakesh-mth commented 2 years ago

Original issue is fixed now, but I see above error on switching tabs and on first start of neovim.

benwainwrightcinch commented 2 years ago

@rakesh-mth I can't replicate. I was getting that bug before but I fixed it on my end; what system are you on?

benwainwrightcinch commented 2 years ago

@rakesh-mth I've made a change. See if your problem is fixed now.

rakesh-mth commented 2 years ago

Looks good now. Thank You!

benwainwright commented 2 years ago

@rakesh-mth no problem! Sorry for the back and forth. Definitely the next thing I'm going to do is work out how to add automatic testing into this codebase 🙄

rakesh-mth commented 2 years ago

@benwainwright Thanks for your help on this issue. I switched to windows and new changes did not work, I had to make some changes to get project selection working. Change is part of this PR #17 . This issue (#15) is not fixed on windows even after my change. Need your help on this since I may not able to figure it out.

benwainwright commented 2 years ago

@rakesh-mth I don't own a windows machine so I'm unable to support windows I'm afraid. Happy to accept windows related PRs, but you are on your own on this front. Sorry!