]> git.notmuchmail.org Git - notmuch/commitdiff
vim: make timing info a debug option
authorBart Trojanowski <bart@jukie.net>
Wed, 25 Nov 2009 05:06:11 +0000 (00:06 -0500)
committerBart Trojanowski <bart@jukie.net>
Wed, 25 Nov 2009 05:48:55 +0000 (00:48 -0500)
vim/plugin/notmuch.vim

index fbe4cd9ea61027d25b999379fc5cedbce9e4486b..e9763ebe8cc087e344130588876f51443feef657 100644 (file)
@@ -23,6 +23,7 @@
 
 let s:notmuch_defaults = {
         \ 'g:notmuch_cmd':                           'notmuch'                    ,
+        \ 'g:notmuch_debug':                         0                            ,
         \
         \ 'g:notmuch_search_newest_first':           1                            ,
         \ 'g:notmuch_search_from_column_width':      20                           ,
@@ -795,7 +796,9 @@ function! s:NM_run(args)
         let err = v:shell_error
         let delta = reltime(start)
 
-        echo printf('[%s] {%s} %s', reltimestr(delta), string(err), string(cmd))
+        if exists('g:notmuch_debug') && g:notmuch_debug
+                echo printf('[%s] {%s} %s', reltimestr(delta), string(err), string(cmd))
+        endif
 
         if err
                 echohl Error