ZyX_I avatar ZyX_I committed 2d5eea1

@%aurum/log: Added g:aurum_showprogress option

Comments (0)

Files changed (2)

autoload/aurum/log.vim

             \'procinput':      {'default': 1, 'checker': 'range 0 2'          },
             \'loglimit':       {'default': 0, 'checker': 'range 0 inf'        },
             \'autoaddlog':     {'default': 1,  'filter': 'bool'               },
+            \'showprogress':   {'default': 0,  'filter': 'bool'               },
         \}
 let s:_messages={
             \'nocontents': 'Log is empty',
     endif
     let r.opts=a:opts
     "▶3 Initialize variables used for progress bar
-    let hasprogress=(get(a:opts, 'progress', 0) &&
-                \    (has_key(r.csd, 'csnum') || a:opts.limit))
+    let hasprogress=(   (   has_key(r.csd, 'csnum')
+                \        || a:opts.limit)
+                \    && (has_key(a:opts, 'progress')
+                \           ? a:opts.progress
+                \           : s:_f.getoption('showprogress')))
     if hasprogress
         let r.prevprogress=0
         let r.prevbarwidth=-1
                 input will be processed while generating log.
                 Note If enabled, acts like g:aurum_procinput=2.
     [no]progress
-                Flag. Determines whether progress bar should be shown in the 
-                statusline while generating log.
+                Flag. Overrides |g:aurum_showprogress|: determines whether 
+                progress bar should be shown in the statusline while 
+                generating log.
 
                                                                      *:AuMove*
 AuMove [copy] [rightrepl] [leftpattern] [pretend] [repo {repo}] [args ...]
     (all if it is 0) will be shown in any case.
     Default: 1 (it does not make sense when loglimit is 0 though).
 
+showprogress                                            *g:aurum_showprogress*
+    Bool. Determines whether progress bar should be shown in statusline by 
+    default.
+    Default: 0.
+
 loglimit                                                    *g:aurum_loglimit*
     Natural number or 0. Determines, how many revisions should be shown by 
     default (0 stands for “all”).
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.