From dd852401ee902745b67fc09a83d113b3fe82a96f Mon Sep 17 00:00:00 2001 From: Iron-E <36409591+Iron-E@users.noreply.github.com> Date: Sat, 26 Aug 2023 19:44:03 +0000 Subject: [PATCH] fix(events): `:term` stays open after job finishes on 0.10-nightly (#524) From `:h news`: > Terminal buffers started with no arguments (and use 'shell') close > automatically if the job exited without error, eliminating the (often > unwanted) "[Process exited 0]" message. Closes #522 --- lua/barbar/events.lua | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lua/barbar/events.lua b/lua/barbar/events.lua index 5aba50bc..089acfe1 100644 --- a/lua/barbar/events.lua +++ b/lua/barbar/events.lua @@ -256,6 +256,11 @@ function events.enable() group = augroup_render, }) + create_autocmd('TermClose', { + callback = function() render.update(true) end, + group = augroup_render, + }) + create_autocmd('User', { callback = function() local relative = require('barbar.fs').relative