From e1796d9f1faea27823e50e3840514a74232c17b8 Mon Sep 17 00:00:00 2001 From: AMZ Date: Tue, 27 Sep 2022 02:22:44 +0300 Subject: [PATCH] Fix cur buffer littered w/ setline aft. PlugUpdate --- plug.vim | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/plug.vim b/plug.vim index 652caa8..3fae683 100644 --- a/plug.vim +++ b/plug.vim @@ -1338,7 +1338,12 @@ function! s:update_finish() return endtry call s:finish(s:update.pull) - call setline(1, 'Updated. Elapsed time: ' . split(reltimestr(reltime(s:update.start)))[0] . ' sec.') + let s:succ_line = 'Updated. Elapsed time: ' . split(reltimestr(reltime(s:update.start)))[0] . ' sec.' + if s:nvim + call s:warn('echo', s:succ_line) + else + call setline(1, s:succ_line) + endif call s:switch_out('normal! gg') endif endfunction @@ -1397,7 +1402,7 @@ function! s:job_cb(fn, job, ch, data) if !s:plug_window_exists() " plug window closed return s:job_abort() endif - call call(a:fn, [a:job, a:data]) + call(a:fn, [a:job, a:data]) endfunction function! s:nvim_cb(job_id, data, event) dict abort