Skip to content

Commit

Permalink
vim: flydiff: Perform flydiff forcedly at the first time
Browse files Browse the repository at this point in the history
  • Loading branch information
kana committed Jun 27, 2008
1 parent 679c826 commit b6c2f6f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion vim/dot.vim/autoload/flydiff.vim
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ function! s:flydiff_info(bufnr, ...) "{{{2
\ 'state': s:OFF,
\ 'diff_bufnr': s:INVALID_BUFNR,
\ 'base_bufnr': s:INVALID_BUFNR,
\ 'not_performed_p': s:TRUE,
\ }
endif
return bufvars.flydiff_info
Expand Down Expand Up @@ -171,7 +172,11 @@ function! s:perform_flydiff(timing) "{{{2
"
" But b:changedtick is a special variable and it cannot be accessed via
" getbufvar(), so another method cannot be used for the case of this plugin.
if a:timing ==# 'written' || getbufvar(base_bufnr, '&modified')
let diff_b_flydiff_info = s:flydiff_info(b_flydiff_info.diff_bufnr)
if diff_b_flydiff_info.not_performed_p
\ || a:timing ==# 'written'
\ || getbufvar(base_bufnr, '&modified')
let diff_b_flydiff_info.not_performed_p = s:FALSE
update
execute diff_winnr 'wincmd w'
setlocal modifiable
Expand Down

0 comments on commit b6c2f6f

Please sign in to comment.