kassio/neoterm

Tclose & TcloseAll not closing Terminal window

Closed this issue · 5 comments

So, I could be totally missing something (and apologies if so!)

Describe the bug
:Tclose or :TcloseAll isn't closing the opened terminal.

To Reproduce
Steps to reproduce the behavior:

  1. Open nvim
  2. Run :Tnew
    • This opens a Terminal in the buffer
  3. Run :Tclose or :TcloseAll
  4. Nothing happens (the terminal session doesn't close)

Expected behavior
I would have expected the Terminal buffer to close

Screenshots
neoterm-tclose

Versions (please complete the following information):

  • OS: MacOS
  • neoterm commit sha1
    • Latest (installed this evening w/ Plug) - 5146f7e
  • Vim or Neovim
    • Vim
    • Neovim
  • Version 0.4.3

Additional context

I removed all plugins and all settings from my init.vim file - only having neoterm installed (shown in the gif above).

It should be fixed now, thanks for opening the issue.

@kassio thank you!

And thank you for your amazing work on this project!

@kassio I just updated with Plug, and tried again - unfortunately it is still not working.

I tried removing all plugins/config from init.vim (aside from neoterm), and double-checked the commit history of the code that got pulled when installing.

Am I missing something?

If you have only a neoterm opened, you'll need to use :Tclose! (with the !).
Can you put the step by step of your test, please?

What I tried:

  • Scenario 1
  1. nvim file
  2. :Tnew
  3. :Tclose
  4. It closes the neoterm and goes back to the file
  • Scenario 2
  1. nvim
  2. :Tnew
  3. :Tclose
  4. Does nothing, because it's the only window with a buffer opened
  5. :Tclose! goes to an empty buffer.

@kassio you're completely right!

I didn't realize that I had to use Tclose! in this specific instance.

Thanks very much!