aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2020-05-09 17:21:50 +1200
committerTom Ryder <tom@sanctum.geek.nz>2020-05-09 17:21:50 +1200
commite4facc11162aab634e1a60746f07e22ae6f13403 (patch)
treea803dc77ae400d996b0176c0bd6c6d1cc6dfdd94
parent8c849183f8723086e6b61a0644292bdb1ad99c1b (diff)
downloadvim-squeeze-repeat-blanks-e4facc11162aab634e1a60746f07e22ae6f13403.tar.gz
vim-squeeze-repeat-blanks-e4facc11162aab634e1a60746f07e22ae6f13403.zip
Copy list of deletions before reversing it
This doesn't break anything in this case, but it might cause unexpected results later on.
-rw-r--r--autoload/squeeze_repeat_blanks.vim2
1 files changed, 1 insertions, 1 deletions
diff --git a/autoload/squeeze_repeat_blanks.vim b/autoload/squeeze_repeat_blanks.vim
index 9a9eb8b..11550e7 100644
--- a/autoload/squeeze_repeat_blanks.vim
+++ b/autoload/squeeze_repeat_blanks.vim
@@ -35,7 +35,7 @@ function! squeeze_repeat_blanks#(start, end) abort
" Delete each flagged line, in reverse order so that renumbering doesn't
" bite us
- for num in reverse(deletions)
+ for num in reverse(copy(deletions))
silent execute num . 'delete'
endfor