Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Neotree close_if_last_window does not work #358

Closed
sand4rt opened this issue May 18, 2024 · 8 comments · Fixed by #364
Closed

Neotree close_if_last_window does not work #358

sand4rt opened this issue May 18, 2024 · 8 comments · Fixed by #364
Labels
not confirmed when a bug is reported but not yet reproduced

Comments

@sand4rt
Copy link

sand4rt commented May 18, 2024

Steps to reproduce

  1. open NNP
  2. open neo-tree with close_if_last_window = true
  3. close the window

Expected behavior

Neovim should close, but it doesn't. It likely detects that NNP is still open, preventing it to close

Environment

  • Neovim version: 10
  • no-neck-pain.nvim version: latest
  • Plugin clash: neo-tree
@shortcuts
Copy link
Owner

Hey @sand4rt thanks for reporting the issue, would you mind describe the steps you've done to reproduce this? so far if I have the neo-tree open along with nnp and I :q on the centered buffer, it closes nvim properly

@shortcuts shortcuts added the not confirmed when a bug is reported but not yet reproduced label May 19, 2024
shortcuts added a commit that referenced this issue May 26, 2024
@shortcuts
Copy link
Owner

@sand4rt
Copy link
Author

sand4rt commented May 26, 2024

Hi @shortcuts, just tested the latest release and the issue is still there:

issue.mov

nvim should close at the end, but it doesn't. It's probably because neo-tree does not think it's the last window because NNP is open.

@shortcuts
Copy link
Owner

Hi @shortcuts, just tested the latest release and the issue is still there:

issue.mov
nvim should close at the end, but it doesn't. It's probably because neo-tree does not think it's the last window because NNP is open.

oh that's weird it's exactly what I tried, i'll write a test case for this to see if it behaves differently

@shortcuts
Copy link
Owner

Hey @sand4rt would you mind letting me know if those steps reproduce your issue on your side? #366

@sand4rt
Copy link
Author

sand4rt commented May 26, 2024

hi @shortcuts, thanks for your reply. Im not sure how to reproduce the steps in #366? This is what i did:

  1. :NoNeckPain -- open NNP
  2. :Neotree -- open Neotree
  3. <C-w><C-l> -- Move focus to the main window
  4. :q -- close nvim and make sure close_if_last_window is was to true in Neotree
  5. neovim should be closed

close_if_last_window in Neotree does work if NNP is not enabled btw.

@shortcuts
Copy link
Owner

hi @shortcuts, thanks for your reply. Im not sure how to reproduce the steps in #366? This is what i did:

it looks like what I've executed in the test suite, I'll change it to match your input 1:1 and see how it behaves

@shortcuts
Copy link
Owner

shortcuts commented May 31, 2024

Screen.Recording.2024-05-31.at.09.59.52.mov

Here's a screen recording with the configuration I've used at the end

(width related options shouldn't matter here, they are only used for test cases and avoiding opening too-big instances)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
not confirmed when a bug is reported but not yet reproduced
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants