Skip to content

Commit

Permalink
less eager to avoid reloads
Browse files Browse the repository at this point in the history
The goal of avoiding reloads on user-modified buffers is to allow
hacking around and keeping the results available without needing to
manage an extra temp buffer.  But avoiding reloads in s:on_bufenter() is
too eager, and not really that important.

closes #102
  • Loading branch information
justinmk committed Dec 11, 2017
1 parent aab1925 commit 202e37d
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions autoload/dirvish.vim
Original file line number Diff line number Diff line change
Expand Up @@ -148,10 +148,6 @@ function! s:on_bufenter() abort
" Ensure w:dirvish for window splits, `:b <nr>`, etc.
let w:dirvish = extend(get(w:, 'dirvish', {}), b:dirvish, 'keep')

if s:buf_modified() " User modified the buffer, don't re-init it.
return
endif

if empty(getline(1)) && 1 == line('$')
Dirvish %
return
Expand Down

0 comments on commit 202e37d

Please sign in to comment.