Commits

ZyX_I committed 541bf43

Fixed `special' stuff

Comments (0)

Files changed (1)

     let a:state[0]=coldiff
     let a:state[1]=idx
     call map(lines, 'printf("%-*s ", indentation_level, join(v:val, ""))')
-    let curspecial=values(a:text.specials)[0]
+    let curspecial=a:text.special
     let shiftlen=len(lines[0])
     call s:F.comm.addcols(a:text, shiftlen)
     let curspecial.blockstart=[0, shiftlen]
 "▶3 glog.summary
 function s:F.glog.summary(cs)
     return      {'text': [a:cs.rev.':'.a:cs.hex],
-                \'specials': {a:cs.hex: {}}}
+                \'special': {}}
 endfunction
 "▶3 glog.generate
 function s:F.glog.generate(css, showparents, Dumper)
     let seen=[]
     let state=[0, 0]
     let r=      {'text': [],
-                \'specials': {}}
+                \'specials': {},
+                \'rectangles': [],}
     for cs in a:css
         let char=((has_key(a:showparents, cs.hex))?('@'):('o'))
         let text=call(a:Dumper, [cs], {})
                     \     s:F.glog.utfedges(seen, cs.hex, cs.parents_hex))
         call s:F.comm.addlines(text, len(r.text))
         let r.text+=text.text
-        call extend(r.specials, text.specials)
+        let r.specials[cs.hex]=text.special
+        let r.rectangles+=[text.special.blockstart+text.special.blockend]
     endfor
     return r
 endfunction
 "▶3 comm.addlines
 function s:F.comm.addlines(text, lnum)
     let mapexpr='[v:val[0]+'.a:lnum.']+v:val[1:]'
-    call map(a:text.specials, 'v:key[-1:] is# "s"?'.
-                \                   'map(v:val, '.string(mapexpr).'):'.
-                \                   mapexpr)
+    call map(a:text.special, 'v:key[-1:] is# "s"?'.
+                \                  'map(v:val, '.string(mapexpr).'):'.
+                \                  mapexpr)
     return a:text
 endfunction
 "▶3 comm.addcols
 function s:F.comm.addcols(text, cnum)
     let mapexpr='[v:val[0], v:val[1]+'.a:cnum.']+v:val[2:]'
-    call map(a:text.specials, 'v:key[-1:] is# "s"?'.
-                \                   'map(v:val, '.string(mapexpr).'):'.
-                \                   mapexpr)
+    call map(a:text.special, 'v:key[-1:] is# "s"?'.
+                \                  'map(v:val, '.string(mapexpr).'):'.
+                \                  mapexpr)
     return a:text
 endfunction
 "▶3 comm.hasrepo
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.