File tree Expand file tree Collapse file tree 3 files changed +4
-9
lines changed
Expand file tree Collapse file tree 3 files changed +4
-9
lines changed Original file line number Diff line number Diff line change 44 push :
55 branches :
66 - master
7+ - stevearc-*
78 pull_request :
89 branches :
910 - master
Original file line number Diff line number Diff line change @@ -343,7 +343,7 @@ function Task:is_disposed()
343343end
344344
345345--- Get the buffer containing the task output. Will be nil if task is PENDING.
346- --- @return number | nil
346+ --- @return integer | nil
347347function Task :get_bufnr ()
348348 local bufnr = self .strategy :get_bufnr ()
349349 if bufnr and vim .api .nvim_buf_is_valid (bufnr ) then
@@ -562,13 +562,7 @@ function Task:dispose(force)
562562 self .strategy :dispose ()
563563 self :dispatch (" on_dispose" )
564564 task_list .remove (self )
565- if bufnr and vim .api .nvim_buf_is_valid (bufnr ) then
566- if bufnr_visible then
567- vim .bo [bufnr ].bufhidden = " wipe"
568- else
569- vim .api .nvim_buf_delete (bufnr , { force = true })
570- end
571- end
565+ util .soft_delete_buf (bufnr )
572566 return true
573567end
574568
Original file line number Diff line number Diff line change @@ -688,7 +688,7 @@ M.status_to_log_level = function(status)
688688end
689689
690690--- Delete buffer. If buffer is visible, set bufhidden=wipe instead
691- --- @param bufnr integer
691+ --- @param bufnr ? integer
692692M .soft_delete_buf = function (bufnr )
693693 if bufnr and vim .api .nvim_buf_is_valid (bufnr ) then
694694 if M .is_bufnr_visible (bufnr ) then
You can’t perform that action at this time.
0 commit comments