Skip to content

Commit

Permalink
Fix file-marks building up in viminfo (prabirshrestha#1337)
Browse files Browse the repository at this point in the history
  • Loading branch information
Christoffer Aasted committed Jul 18, 2022
1 parent 9a510cd commit ff6efb5
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions autoload/vital/_lsp/VS/Vim/Buffer.vim
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,16 @@ endfunction
" ensure
"
function! s:ensure(expr) abort
if !bufexists(a:expr)
if !exists('g:__VS_Vim_Buffers')
let g:__VS_Vim_Buffers = {}
endif
if !has_key(g:__VS_Vim_Buffers, a:expr)
if type(a:expr) == type(0)
throw printf('VS.Vim.Buffer: `%s` is not valid expr.', a:expr)
endif
badd `=a:expr`
call extend(g:__VS_Vim_Buffers, {a:expr : bufadd('')})
endif
return bufnr(a:expr)
return g:__VS_Vim_Buffers[a:expr]
endfunction

"
Expand Down

0 comments on commit ff6efb5

Please sign in to comment.