Skip to content

Commit

Permalink
always reload if buffer is empty
Browse files Browse the repository at this point in the history
closes #102
  • Loading branch information
justinmk committed Dec 12, 2017
1 parent 17ee209 commit e4b3c4b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion autoload/dirvish.vim
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@ endfunction

function! s:should_reload() abort
if line('$') < 1000 || '' ==# glob(getline('$'),1)
return !s:buf_modified()
return !s:buf_modified() || (empty(getline(1)) && 1 == line('$'))
endif
redraw | echo 'dirvish: showing cached listing ("R" to reload)'
return 0
Expand Down

0 comments on commit e4b3c4b

Please sign in to comment.