Commits

ZyX_I  committed 5a46596

@%aurum/annotate: Fixed wrong relative offsets in case line('w0')!=1

  • Participants
  • Parent commits 6d53a99

Comments (0)

Files changed (2)

File autoload/aurum/annotate.vim

     endif
     execute annwin.'wincmd w'
     setlocal scrollbind cursorbind nowrap
+    " XXX I was unable to make scrollbinded windows behave sensibly without the 
+    "     following command. No matter what I tried, if initially buffer had any 
+    "     offset from the top (line("w0")!=1), saved vertical offset of 
+    "     scrollbinded buffers was invalid, even if I moved cursor to the top 
+    "     before setting scrollbind. It is good that my task allows :syncbind, 
+    "     but it would be a pain if I wanted to have different relative offsets.
+    syncbind
     augroup AuAnnotateBW
         execute 'autocmd BufWipeOut,BufHidden <buffer='.a:annbuf.'> '.
                     \':if bufexists('.buf.') | '.
         let annbuf=bufnr('%')
     else
         " TODO Check for errors
-        let existed=s:_r.run('silent edit', 'file', repo, rev, file)
+        let existed=s:_r.mrun('silent edit', 'file', repo, rev, file)
         let annbuf=bufnr('%')
         if !existed
             setlocal bufhidden=wipe

File autoload/aurum/cmdutils.vim

                             \bufwinnr(a:bvar.annbuf)!=-1
                     execute bufwinnr(a:bvar.annbuf).'wincmd w'
                 else
-                    setlocal scrollbind
-                    call s:_r.run('silent rightbelow vsplit',
-                                \ 'file', r.repo, r.rev, r.file)
+                    " FIXME It does not look like a proper place for doing this 
+                    "       job. More, it looks like some necessary autocommands 
+                    "       doing cleanup are missing.
+                    setlocal scrollbind cursorbind nowrap
+                    call s:_r.mrun('silent rightbelow vsplit',
+                                \  'file', r.repo, r.rev, r.file)
                     let a:bvar.annbuf=bufnr('%')
-                    setlocal scrollbind
+                    setlocal scrollbind cursorbind nowrap
+                    syncbind
                 endif
                 return 0
             endif