b0o / incline.nvim

🎈 Floating statuslines for Neovim, winbar alternative
MIT License
759 stars 14 forks source link

When switching buffer writing a file, the previous buffer directory will be written too. #24

Closed AGou-ops closed 2 years ago

AGou-ops commented 2 years ago

Just like below:

https://user-images.githubusercontent.com/57939102/169734716-14b63651-5d9a-48f0-b135-53d1ca675530.mov

My config is default, and it works fine when I disable incline.nvim in my init.lua.

b0o commented 2 years ago

This is very strange. Incline never modifies the CWD or does anything with the filesystem, so I'm not sure why this would be happening. I tried to reproduce this issue, but I'm having trouble. Is your full config available on GitHub for me to test with?

AGou-ops commented 2 years ago

YES. full dotfiles here.

Maybe too much plugins. 😅 Thank you!

AGou-ops commented 2 years ago

It's very strange. I don't know what's wrong.

I use minimal configuration, with nvim-tree, bufferline and incline, and it works fine. Maybe incline conflict with other plugins?(change buffer but not change pwd automatically) I'm very confused.

b0o commented 2 years ago

I haven't tested your dotfiles yet. However I just noticed something in your video example. You did things differently in the first part versus the second part.

In the first run (with Incline enabled), you:

  1. opened main.go
  2. opened nvim-tree
  3. opened shortener/repository.go in a new tab
  4. ran command :w
  5. navigated back to tab containing main.go
  6. ran command :w

In the second run (with Incline disabled), you:

  1. opened main.go
  2. opened nvim-tree
  3. opened shortener/repository.go in a new tab
  4. ran command :w <---- you skipped this step
  5. navigated back to tab containing main.go
  6. ran command :w

If you re-try the second run again and do it exactly how you did the first run, does the issue still happen?

AGou-ops commented 2 years ago

@b0o Thank you for your reply!

It's same. I have tried several times before. But this video I forgot to do that.

:echo expand('%:p') output:

screenshoot ![image](https://user-images.githubusercontent.com/57939102/169925565-e02e0850-0815-4502-9e85-e105e02b5fd5.png)

when I close Incline, the output is, and this is the correct path:

screenshoot ![image](https://user-images.githubusercontent.com/57939102/169925631-5d3ce276-d3c2-4f37-8a8a-a3429c281487.png)
AGou-ops commented 2 years ago

I think it should be a conflict with some other plugin, I will try it myself.

AGou-ops commented 2 years ago

It's the fault of the wilder.nvim plugin....😂

" call wilder#setup({'modes': [':', '/', '?']})