Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions autoload/wiki/tags.vim
Original file line number Diff line number Diff line change
Expand Up @@ -407,8 +407,6 @@ function! s:tags.rename(old_tag, new_tag, ...) abort dict " {{{1

call wiki#log#info('Renaming tag "' . a:old_tag . '" to "' . a:new_tag . '".')

let l:tagpages = self.collection[a:old_tag]

let l:bufnr = bufnr('')
" Get list of open wiki buffers
let l:bufs =
Expand All @@ -425,12 +423,12 @@ function! s:tags.rename(old_tag, new_tag, ...) abort dict " {{{1
endfor

let l:num_files = 0
let l:tagpages = remove(self.collection, a:old_tag)

" We already know where the tag is in the file, thanks to the cache
for [l:file, l:lnum] in l:tagpages
if s:update_tag_in_wiki(l:file, l:lnum, a:old_tag, a:new_tag)
call self.add(a:new_tag, l:file, l:lnum)
call remove(self.collection, a:old_tag)
let l:num_files += 1
endif
endfor
Expand Down