X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=vim%2Fplugin%2Fnotmuch.vim;h=f33d0582c9153018e084f0625d8eca062a159493;hp=cb7f34f5e2e14985ecea8403e9c574f40d9245ce;hb=8a3352e619de6d347e1eb42011e65a85f0f4c7ca;hpb=dffee11a40dd85b174b726b602a3f53112229aff diff --git a/vim/plugin/notmuch.vim b/vim/plugin/notmuch.vim index cb7f34f5..f33d0582 100644 --- a/vim/plugin/notmuch.vim +++ b/vim/plugin/notmuch.vim @@ -114,7 +114,8 @@ let g:notmuch_folders_maps = { " --- --- bindings for search screen {{{2 let g:notmuch_search_maps = { - \ '': ':call NM_search_show_thread()', + \ '': ':call NM_search_show_thread(0)', + \ '': ':call NM_search_show_thread(1)', \ '': ':call NM_search_expand('''')', \ 'a': ':call NM_search_archive_thread()', \ 'f': ':call NM_search_filter()', @@ -137,11 +138,12 @@ let g:notmuch_show_maps = { \ '': ':call NM_show_next(1, 0)', \ '': ':call NM_search_expand('''')', \ 'q': ':call NM_kill_this_buffer()', + \ 's': ':call NM_search_prompt()', \ \ 'b': ':call NM_show_fold_toggle(''b'', ''bdy'', !g:notmuch_show_fold_bodies)', \ 'c': ':call NM_show_fold_toggle(''c'', ''cit'', !g:notmuch_show_fold_citations)', \ 'h': ':call NM_show_fold_toggle(''h'', ''hdr'', !g:notmuch_show_fold_headers)', - \ 's': ':call NM_show_fold_toggle(''s'', ''sig'', !g:notmuch_show_fold_signatures)', + \ 'i': ':call NM_show_fold_toggle(''s'', ''sig'', !g:notmuch_show_fold_signatures)', \ \ 'a': ':call NM_show_archive_thread()', \ 'A': ':call NM_show_mark_read_then_archive_thread()', @@ -265,17 +267,14 @@ endfunction " --- --- search screen action functions {{{2 -function! s:NM_search_show_thread() - let id = NM_search_thread_id() - if id != '' - let words = [id] - if exists('b:nm_search_words') - let words = ['('] + b:nm_search_words + [')', 'AND', id] - endif - if len(words) - call NM_cmd_show(words) - endif +function! s:NM_search_show_thread(everything) + let words = [ NM_search_thread_id() ] + if !a:everything && exists('b:nm_search_words') + call extend(words, ['AND', '(']) + call extend(words, b:nm_search_words) + call add(words, ')') endif + call NM_cmd_show(words) endfunction function! s:NM_search_prompt() @@ -409,7 +408,7 @@ endfunction function! s:NM_cmd_show(words) let prev_bufnr = bufnr('%') - let data = s:NM_run(['show'] + a:words) + let data = s:NM_run(['show', '--entire-thread'] + a:words) let lines = split(data, "\n") let info = s:NM_cmd_show_parse(lines)