vim: include search terms when showing message
authorBart Trojanowski <bart@jukie.net>
Tue, 24 Nov 2009 01:25:47 +0000 (20:25 -0500)
committerBart Trojanowski <bart@jukie.net>
Wed, 25 Nov 2009 05:48:55 +0000 (00:48 -0500)
vim/plugin/notmuch.vim

index d2650855092e42beef62548481b69a16a04b8b01..aff492667b3d1db6773bbfebe79456b0d3fb277f 100644 (file)
@@ -230,7 +230,13 @@ endfunction
 function! s:NM_search_show_thread()
         let id = <SID>NM_search_thread_id()
         if id != ''
-                call <SID>NM_cmd_show([id])
+                let words = [id]
+                if exists('b:nm_search_words')
+                        let words = ['('] + b:nm_search_words + [')', 'and', id]
+                endif
+                if len(words)
+                        call <SID>NM_cmd_show(words)
+                endif
         endif
 endfunction