X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=vim%2Fplugin%2Fnotmuch.vim;h=a9754f2b4b2e94de332931806260323ff674bfaa;hp=b415f500a167619151afc3d623542a8aabb7efaa;hb=2805a243b5564bb99196923f96118ace4c55e870;hpb=c835e2a5059ebc10580f8ae2a79c4f0f81374798 diff --git a/vim/plugin/notmuch.vim b/vim/plugin/notmuch.vim index b415f500..a9754f2b 100644 --- a/vim/plugin/notmuch.vim +++ b/vim/plugin/notmuch.vim @@ -178,7 +178,7 @@ let g:notmuch_compose_imaps = { function! s:NM_cmd_folders(words) if len(a:words) - throw 'Not exapecting any arguments for folders command.' + throw 'Not expecting any arguments for folders command.' endif let cmd = ['count'] let disp = [] @@ -275,6 +275,7 @@ function! s:NM_search_show_thread(everything) call add(words, ')') endif call NM_cmd_show(words) + let b:nm_show_everything = a:everything endfunction function! s:NM_search_prompt() @@ -408,7 +409,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) @@ -430,6 +431,7 @@ function! s:NM_cmd_show(words) endfunction function! s:NM_show_previous(can_change_thread, find_matching) + let everything = exists('b:nm_show_everything') ? b:nm_show_everything : 0 let info = b:nm_raw_info let lnum = line('.') for msg in reverse(copy(info['msgs'])) @@ -450,7 +452,7 @@ function! s:NM_show_previous(can_change_thread, find_matching) call NM_kill_this_buffer() if line('.') > 1 norm k - call NM_search_show_thread() + call NM_search_show_thread(everything) norm G call NM_show_previous(0, a:find_matching) else @@ -479,10 +481,11 @@ function! s:NM_show_next(can_change_thread, find_matching) endfunction function! s:NM_show_next_thread() + let everything = exists('b:nm_show_everything') ? b:nm_show_everything : 0 call NM_kill_this_buffer() if line('.') != line('$') norm j - call NM_search_show_thread() + call NM_search_show_thread(everything) else echo 'No more messages.' endif