vim: run(): optimize non-debug path
authorFelipe Contreras <felipe.contreras@gmail.com>
Sat, 5 Jun 2010 11:12:41 +0000 (14:12 +0300)
committerCarl Worth <cworth@cworth.org>
Mon, 8 Nov 2010 18:00:18 +0000 (10:00 -0800)
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
vim/plugin/notmuch.vim

index 7b49015c4f7891a9e3c0b63615602fd894dd8ff7..8d5d1c34e377aca92680483ac55f091eb63a93b0 100644 (file)
@@ -1186,13 +1186,16 @@ function! s:NM_run(args)
         call map(words, 's:NM_shell_escape(v:val)')
         let cmd = g:notmuch_cmd . ' ' . join(words) . '< /dev/null'
 
-        let start = reltime()
-        let out = system(cmd)
-        let err = v:shell_error
-        let delta = reltime(start)
-
         if exists('g:notmuch_debug') && g:notmuch_debug
+                let start = reltime()
+                let out = system(cmd)
+                let err = v:shell_error
+                let delta = reltime(start)
+
                 echo printf('[%s] {%s} %s', reltimestr(delta), string(err), string(cmd))
+        else
+                let out = system(cmd)
+                let err = v:shell_error
         endif
 
         if err