Closed numToStr closed 2 years ago
As missing values in lua results in nil value, this patch makes t:setup()
result in close_to_kill=true
while t:setup{ border = "single" }
will result in close_to_kill=false
.
I think you should either invert your variables meaning and renaming to something like no_autoclose
, or accept that in this context nil means true.
@jonathf Nice catch. I've now fixed that bug.
But there is still one big issue with this that there is no way to clear the stored window and terminal buffer handle when shells exit after [Process exited 0]
message. And for some reason, nvim_buf_is_valid
returns true
for the buffer id. I am still working on how to fix this.
I am not sure if I follow. Can't the user just manually trigger t:close(true)
?
Can't the user just manually trigger t:close(true)?
Yes, they can but it is not exposed to the user for the default terminal.
I'll rethink about the implementation once again considering #33. As I also want this feature.
@bigjazzsound @jonathf I fixed some bugs from last time and I think It is now good to go. Please let me know If everything is working as expected.
Edit: One thing I changed is the config which is auto_close
rather than close_on_kill
I am going to merge this for now. If you face any problem please feel free to report issues.
@jonathf Nice catch. I've now fixed that bug.
But there is still one big issue with this that there is no way to clear the stored window and terminal buffer handle when shells exit after
[Process exited 0]
message. And for some reason,nvim_buf_is_valid
returnstrue
for the buffer id. I am still working on how to fix this.
Is it normal I still have process exited 0 when I quit lazygit ? Is it because I use fish ?
By default, FTerm closes the terminal buffer as soon as the shell or command exists and there is no way to override this behavior.
This PR provides an option i.e.
auto_close
to override that behavior and prevents buffer from closing. FWIW this is also the neovim's default behavior for terminals.Fixes #18