Commits

ZyX_I committed 32498ad

@aurum/vimdiff: Fixed inappropriate behavior in case of two subsequent :AuVimDiff calls with first having modifications to file during viewing diffsplit with g:aurum_usewin and &hidden on
Fixes #26

  • Participants
  • Parent commits 37f15ef

Comments (0)

Files changed (3)

File plugin/aurum/vimdiff.vim

         elseif !has_key(dbvar, 'diffsaved')
             return
         endif
-        augroup AurumDiff
+        augroup AuVimDiff
             autocmd! BufEnter <buffer>
         augroup END
+        unlet t:auvimdiff_origbufvar
         if b:changedtick!=dbvar.diffsaved.changedtick
             return
         endif
             endtry
         endfor
         call setpos('.', curpos)
-        unlet dbvar.diffsaved
-        unlet t:auvimdiff_origbufvar
-        augroup AuVimDiff
-            autocmd! BufEnter <buffer>
-        augroup END
     else
         for option in s:diffsaveopts
             call setbufvar(a:buf, '&'.option, dbvar.diffsaved[option])

File test/regression-vimdiff-nodiffoff.in

+:let g:aurum_usewin=1
+:set hidden
+:set splitright
+:set diffopt+=vertical
+:R edit   emerged.lst
+:R vsplit ablines.lst
+:wincmd p
+:AuVimDiff
+zR5ggdd,X:AuVimDiff
+,X:WW

File test/regression-vimdiff-nodiffoff.ok

+*1: %TMPDIR%/test/regression-vimdiff-nodiffoffrepo/emerged.lst
+#2: %TMPDIR%/test/regression-vimdiff-nodiffoffrepo/ablines.lst