Skip to content

Commit

Permalink
fix: argdo on innit, rewind only once in the end
Browse files Browse the repository at this point in the history
  • Loading branch information
Maxim Gonchar committed Feb 28, 2023
1 parent 268ed66 commit bb02b39
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions autoload/ctrlspace/init.vim
Expand Up @@ -47,12 +47,12 @@ function! ctrlspace#init#Init() abort
let curaltBuff=bufnr('#')
let currBuff=bufnr('%')

if curaltBuff >= 0
if curaltBuff >= 0
execute 'buffer ' . curaltBuff
endif
execute 'buffer ' . currBuff

autocmd CtrlSpaceInit VimEnter * silent argdo call ctrlspace#buffers#AddBuffer() | rewind
autocmd CtrlSpaceInit VimEnter * exe 'silent argdo call ctrlspace#buffers#AddBuffer()' | rewind
endif

autocmd CtrlSpaceInit BufEnter * call ctrlspace#buffers#AddBuffer()
Expand Down

0 comments on commit bb02b39

Please sign in to comment.