]> git.notmuchmail.org Git - notmuch/blobdiff - vim/plugin/notmuch.vim
vim: include search terms when showing message
[notmuch] / 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