Commits

ZyX_I committed 7451272

Fixed date (gD) filter, made glog mappings close window before opening anything

Comments (0)

Files changed (1)

ftplugin/aurumgraphlog.vim

     "▶3 date: add `date' filter (only show commits done in the current month)
     elseif spname is# 'date'
         let cmd='edit '.fnameescape('aurum://glog:'.epath.':'.opts.
-                    \               'date:'.strftime('*\:%m\:%Y', cs.time).','.
+                    \               'date:'.strftime('%Y-%m', cs.time).','.
                     \               'crrestrict:date')
     "▶3 changeset: show only ancestors of the current changeset
     elseif spname is# 'changeset'
         let file=cs.files[+spname[4:]]
         let cmd='edit '.fnameescape('aurum://file:'.epath.':'.hex.':'.file)
     "▶3 diff: view diff between changeset and current state
-    elseif spname is# 'diff'
+    elseif spname is# 'curdiff'
         let cmd='edit '.fnameescape('aurum://diff:'.epath.'::'.hex)
         if has_key(bvar.opts, 'files') && !has_key(bvar.opts.ignorefiles,'diff')
             let cmd.=fnameescape(':'.join(map(copy(bvar.opts.files),
         let cmd='edit '.fnameescape('aurum://diff:'.epath.':'.hex)
     endif
     "▲3
-    return ':'.cmd."\n"
+    return ":wincmd c\n:".cmd."\n"
 endfunction
 "▶1 gethexfile
 function s:F.gethexfile()
             \    'Date': {'lhs': 'gD', 'rhs': ['date']                        },
             \  'Branch': {'lhs': 'gb', 'rhs': ['branch']                      },
             \     'Rev': {'lhs': 'gr', 'rhs': ['changeset']                   },
-            \    'Diff': {'lhs':  'd', 'rhs': ['diff']                        },
+            \    'Diff': {'lhs':  'd', 'rhs': ['curdiff']                     },
             \   'RDiff': {'lhs':  'c', 'rhs': ['revdiff']                     },
             \   'VDiff': {'lhs':  'D', 'rhs': [1],         'func': s:F.vimdiff},
             \  'RVDiff': {'lhs':  'C', 'rhs': s:F.vimdiff                     },