Commits

ZyX_I committed e21f6a7

Fixed errors shown when template resolves to outputting nothing (bug with `$copies')

  • Participants
  • Parent commits 2e59f51

Comments (0)

Files changed (3)

plugin/aurum/log.vim

                     \' nextgroup='.join(nlgroups, ',')]
     endif
     call add(r, remove(r, 0))
+    if len(r)==1
+        return []
+    endif
     let s:syncache[cid]=r
     return r
 endfunction
             " TODO Check whether it causes a problem with more then one parent
             return
         endif
+        " TODO Also track copies
         let rename=get(cs.renames, file, 0)
         if type(rename)!=type('')
             let rename=file

test/log-templates.in

 :let g:template='$empty'
-:R AuLog template g:template showfiles patch stat showrenames
+:R AuLog template g:template showfiles patch stat showrenames showcopies
 :command -nargs=1 ST :W{{{1 <args> | let g:template=<q-args> | Run! silent edit
 :ST $hide#-#
 :ST $empty
 :ST $changes#;;#
 :ST $renames
 :ST $renames#->#
+:ST $copies
+:ST $copies#->#
 :source addmessages.vim

test/log-templates.ok

 |  
 o  
 |  
+{{{1 $copies
+@  
+|  
+o  
+|  
+o  
+|  
+o  
+|  
+o  hglines.lst to hglines2.lst
+|  
+o    
+|\   
+o |    
+|\ \   
+| | o    
+| | |\   
+| | o |    
+| | |\ \   
+| | | | | o  
+| | | | |/   
+| +-----o  
+| | | |    
+| +-----o  
+| | | |    
+| o | |  
+| | | |  
+o | | |    
+|\ \ \ \   
+| | o | |  
+| |/ / /   
+| o---+  
+|  / /   
+| | o  
+| |/   
+| o  
+|/   
+o  
+|  
+o  
+|  
+o  
+|  
+o  
+|  
+o  
+|  
+{{{1 $copies#->#
+@  
+|  
+o  
+|  
+o  
+|  
+o  
+|  
+o  hglines.lst->hglines2.lst
+|  
+o    
+|\   
+o |    
+|\ \   
+| | o    
+| | |\   
+| | o |    
+| | |\ \   
+| | | | | o  
+| | | | |/   
+| +-----o  
+| | | |    
+| +-----o  
+| | | |    
+| o | |  
+| | | |  
+o | | |    
+|\ \ \ \   
+| | o | |  
+| |/ / /   
+| o---+  
+|  / /   
+| | o  
+| |/   
+| o  
+|/   
+o  
+|  
+o  
+|  
+o  
+|  
+o  
+|  
+o  
+|