numToStr / FTerm.nvim

:fire: No-nonsense floating terminal plugin for neovim :fire:
MIT License
721 stars 24 forks source link

Error when trying to quit with :xa #12

Open JakeAdler opened 3 years ago

JakeAdler commented 3 years ago

Steps to reproduce:

Error:

E948: Job still running                                                                                                                                                                                                                      
E676: No matching autocommands for acwrite buffer   

Nvim version: nightly@fe808f0

JakeAdler commented 3 years ago

From :h xa

:xa Write all changed buffers and exit Vim. If there are buffers without a file name, which are readonly or which cannot be written for another reason, Vim will not quit.

numToStr commented 3 years ago

IMO that's expected. When you toggle the terminal. the terminal buffer stays in the background for reuse and the terminal buffer is a modified buffer. But you can't save the terminal buffer.

Because of this behavior, I am also force closing the terminal buffer. https://github.com/numToStr/FTerm.nvim/blob/94e767f2f0fdd436c8aceadeae4d3e23166ee1f8/lua/FTerm/terminal.lua#L182

You can try to close (not toggle) the terminal and then try :xa.

AckslD commented 2 years ago

I also encountered this. Not really an issue with fterm but curious to hear if anyone has some solution which doesn't involve manually closing the terminal buffer before wqa.

AckslD commented 2 years ago

Actually @numToStr how do you mean "close" the buffer? I tried both lua require('FTerm').close() and :q but neither help with wqa.

The confusing thing is that wa followed by qa works but not wqa.