]> git.notmuchmail.org Git - notmuch/commitdiff
reverse order so that the latest is at top
authorBart Trojanowski <bart@jukie.net>
Thu, 19 Nov 2009 02:13:24 +0000 (21:13 -0500)
committerBart Trojanowski <bart@jukie.net>
Wed, 25 Nov 2009 05:48:49 +0000 (00:48 -0500)
vim/plugin/notmuch.vim

index a15f4df5960c5b11e01f5f3b4bc9fe4d2279f361..00ee98427ccca5269eba347f8d1265d02bf11b67 100644 (file)
@@ -25,10 +25,18 @@ if !exists('g:notmuch_cmd')
         let g:notmuch_cmd = 'notmuch'
 endif
 
+if !exists('g:notmuch_search_reverse')
+        let g:notmuch_search_reverse = 1
+endif
+
 " --- implement search screen
 
 function! s:NM_cmd_search(words)
-        let data = s:NM_run(['search'] + a:words)
+        let cmd = ['search']
+        if g:notmuch_search_reverse
+                let cmd = cmd + ['--reverse']
+        endif
+        let data = s:NM_run(cmd + a:words)
         "let data = substitute(data, '27/27', '25/27', '')
         "let data = substitute(data, '\[4/4\]', '[0/4]', '')
         let lines = split(data, "\n")