Commits

ZyX_I committed 5c071d7

@%aurum/drivers/mercurial: Fixed updating in non-python version of mercurial driver
@%aurum/log/templates: Fixed revision highlighting in some cases
Fixed highlighting in case text is the only element on the line

  • Participants
  • Parent commits 03620d7

Comments (0)

Files changed (2)

autoload/aurum/drivers/mercurial.vim

 else
     function s:F.getupdates(repo, start)
         let r={}
-        let tip_hex=a:repo.functions.getrevhex(a:repo, 'tip')
+        let tip_hex=a:repo.functions.gettiphex(a:repo)
         let cschange=1
         if a:start isnot 0
             try
         return
     endif
     call map(d.css, 'extend(v:val, {"children": []})')
-    if !empty(a:repo.mutable.cslist)
+    if !empty(a:repo.mutable.cslist) && !empty(d.css)
         call s:F.removechangesets(a:repo, d.startrev)
     endif
     for key in a:repo.updkeys

autoload/aurum/log/templates.vim

             \'renames': {'files': 1, 'renames': 1},
             \ 'copies': {'files': 1, 'copies': 1},
             \}
-call map(s:kwreqseqkw, 'extend(s:kwreqs, {v:val : {substitute(v:val, "_$", "", "") : 1}})')
+call map(s:kwreqseqkw, 'extend(s:kwreqs, {v:val : '.
+            \'{substitute(v:val, "_$", "", "") : 1}})')
 unlet s:kwreqseqkw
 "▶1 beatycode       :: function::[String] → function::[String]
 let s:indents={
     endif
 endfunction
 "▶1 getkwreg
-function s:F.getkwreg(kw, nextlit)
+function s:F.getkwreg(repo, kw, nextlit)
     if has_key(s:kwreg, a:kw)
         return s:kwreg[a:kw]
+    elseif a:kw is# 'rev'
+        return get(a:repo, 'revreg', '\v\d+')
+    elseif a:kw is# 'parents' || a:kw is# 'children'
+        let reg=get(a:repo, 'hexreg', '\x{12,}')
+        return '\v'.reg.'(\ '.reg.')*'
     " XXX 0 is empty
     elseif !empty(a:nextlit)
         return '\V\%(\%('.escape(a:nextlit, '\/').'\)\@!\.\)\*'
                 let skname='auLog'.skname
                 call s:F.addgroup(r, nlgroups, skname)
                 let r+=['syn match '.skname.' ']
-                if lmeta>j
-                    let r[-1].='/\V'.escape(str, '\/').'/'
-                else
-                    let r[-1].='/\v.*/'
-                endif
+                let r[-1].='/\V'.escape(str, '\/').'/'
                 let r[-1].=' contained nextgroup='
             endif
             if lmeta>j
                         call s:F.addgroup(r, nlgroups, 'auLog_'.kw.trail)
                     endif
                     let nextlit=get(arg, 'suf', get(lit, j+1, 0))
-                    if kw is# 'rev'
-                        let reg=get(a:repo, 'revreg', '\v\d+')
-                    elseif kw is# 'parents' || kw is# 'children'
-                        let reg=get(a:repo, 'hexreg', '\x{12,}')
-                        let reg='\v'.reg.'(\ '.reg.')*'
-                    else
-                        let reg=s:F.getkwreg(kw, nextlit)
-                    endif
-                    let r+=['syn match auLog_'.kw.' /'.reg.'/ '.
+                    let r+=['syn match auLog_'.kw.' /'.
+                                \s:F.getkwreg(a:repo, kw, nextlit).'/ '.
                                 \'contained nextgroup=']
                     if has_key(arg, 'suf')
                         let r[-1].='auLog_'.kw.'_suf'
                 else
                     call s:F.addgroup(r, nlgroups, 'auLog_'.kw)
                     let r+=['syn match auLog_'.kw.' /'.
-                                \s:F.getkwreg(kw, get(lit, j+1, 0)).'/ '.
-                                \'contained nextgroup=']
+                                \    s:F.getkwreg(a:repo, kw, get(lit, j+1, 0)).
+                                \'/ contained nextgroup=']
                 endif
             endif
             let j+=1