diff --git a/lua/telescope/previewers/term_previewer.lua b/lua/telescope/previewers/term_previewer.lua index aa83374..6eeaa65 100644 --- a/lua/telescope/previewers/term_previewer.lua +++ b/lua/telescope/previewers/term_previewer.lua @@ -221,6 +221,10 @@ previewers.new_termopen_previewer = function(opts) local term_id = get_term_id(self) if term_id then + if not utils.job_is_running(term_id) then + return + end + vim.fn.chansend(term_id, termcode) end end