+11
lua/javelin/ui.lua
+11
lua/javelin/ui.lua
···
64
64
open_buf(file)
65
65
end,
66
66
},
67
+
on_buf = function(self)
68
+
vim.api.nvim_create_autocmd("BufLeave", {
69
+
buffer = self.buf,
70
+
callback = function()
71
+
if not self.closed then
72
+
self:close()
73
+
end
74
+
return true
75
+
end,
76
+
})
77
+
end,
67
78
on_close = function(self)
68
79
if self.buf then
69
80
local lines = self:lines()