crude order toggle
authorBart Trojanowski <bart@jukie.net>
Fri, 20 Nov 2009 17:16:32 +0000 (12:16 -0500)
committerBart Trojanowski <bart@jukie.net>
Wed, 25 Nov 2009 05:48:51 +0000 (00:48 -0500)
vim/README
vim/plugin/notmuch.vim

index d6ee2384b54b8208119d2e86ba4941c00c04e62f..37cbf77d58aae9f366135cdc69831d89202a096e 100644 (file)
@@ -20,6 +20,7 @@ Buffer types:
             <Enter> - show the selected message
             a       - archive message (remove inbox tag)
             f       - filter the current search terms
+            o       - toggle search screen order
             s       - enter search criteria
             S       - alter search criteria
             f       - filter the current search terms with tags
index dbe198539299364ced8f3bf8706af2ea1b273059..ed67d34a332688c3375b17732fff49347c0ab4bf 100644 (file)
@@ -181,7 +181,10 @@ function! s:NM_new_mail()
 endfunction
 
 function! s:NM_search_toggle_order()
-        echoe 'Not implemented'
+        let g:notmuch_search_reverse = !g:notmuch_search_reverse
+        " FIXME: maybe this would be better done w/o reading re-reading the lines
+        "         reversing the b:nm_raw_lines and the buffer lines would be better
+        call <SID>NM_search_refresh_view()
 endfunction
 
 function! s:NM_search_reply_to_thread()
@@ -198,6 +201,7 @@ endfunction
 
 function! s:NM_search_refresh_view()
         let lno = line('.')
+        setlocal bufhidden=delete
         call <SID>NM_cmd_search(b:nm_search_words)
         " FIXME: should find the line of the thread we were on if possible
         exec printf('norm %dG', lno)