Skip to content

Commit

Permalink
fix(term_previewer): ensure terms are closed (#3225)
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcusGrass authored Aug 15, 2024
1 parent cac2494 commit 5972437
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions lua/telescope/previewers/term_previewer.lua
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,6 @@ local get_maker = function(opts)
return maker
end

-- TODO: We shoudl make sure that all our terminals close all the way.
-- Otherwise it could be bad if they're just sitting around, waiting to be closed.
-- I don't think that's the problem, but it could be?
previewers.new_termopen_previewer = function(opts)
opts = opts or {}

Expand Down Expand Up @@ -192,7 +189,7 @@ previewers.new_termopen_previewer = function(opts)

local prev_bufnr = get_bufnr_by_bufentry(self, entry)
if prev_bufnr then
self.state.termopen_bufnr = prev_bufnr
set_bufnr(self, prev_bufnr)
utils.win_set_buf_noautocmd(preview_winid, self.state.termopen_bufnr)
self.state.termopen_id = term_ids[self.state.termopen_bufnr]
else
Expand Down

0 comments on commit 5972437

Please sign in to comment.