From 3fb9beacbcaca974d989a11aff74d324d09ed335 Mon Sep 17 00:00:00 2001 From: Tim Pope Date: Sun, 12 Dec 2021 13:28:01 -0500 Subject: [PATCH] Fix possible infinite loop --- autoload/fugitive.vim | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/autoload/fugitive.vim b/autoload/fugitive.vim index 192c3f2..4ce0b12 100644 --- a/autoload/fugitive.vim +++ b/autoload/fugitive.vim @@ -3515,9 +3515,10 @@ if !exists('s:resume_queue') endif function! fugitive#Resume() abort while len(s:resume_queue) - if s:resume_queue[0][2] isnot# '' + let enqueued = remove(s:resume_queue, 0) + if enqueued[2] isnot# '' try - call call('s:RunWait', remove(s:resume_queue, 0)) + call call('s:RunWait', enqueued) endtry endif endwhile