Просмотр исходного кода

Stop calling `s:Reset()`, fixing #8 and #87.

MRU tracking is now done dynamically as buffers come and go, so there is
no need to track buffers at plugin startup or session-load time.

- Issue #8 "Bufexplorer MRU sort doesn't work properly if using
  restore_session.vim" was caused by resetting the MRU list via
  `s:Reset()` after a session is loaded.  Removing the `SessionLoadPost`
  autocmd that invokes this function resolves this issue.

- Issue #87 "Bufexplorer interferes with the startinsert! command" was
  caused, as correctly diagnosed by the original poster, by the use of
  `:normal!` in the `s:CatalogBuffers()` function:

  ```vim
  silent execute 'normal! ' . tab . 'gt'
  ```

  `s:CatalogBuffers()` is no longer called at startup, resolving this
  issue.
Michael Henry 10 месяцев назад
Родитель
Сommit
1a76c2b459
1 измененных файлов с 0 добавлено и 5 удалено
  1. 0 5
      plugin/bufexplorer.vim

+ 0 - 5
plugin/bufexplorer.vim

@@ -139,13 +139,8 @@ let s:types = ["fullname", "homename", "path", "relativename", "relativepath", "
 " Setup the autocommands that handle the MRUList and other stuff. {{{2
 autocmd VimEnter * call s:Setup()
 
-" Reset MRUList and buffer->tab associations after loading a session. {{{2
-autocmd SessionLoadPost * call s:Reset()
-
 " Setup {{{2
 function! s:Setup()
-    call s:Reset()
-
     " Now that the MRUList is created, add the other autocmds.
     augroup BufExplorer
         autocmd!