X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=vim%2Fplugin%2Fnotmuch.vim;h=f29dff1c1b995e11f43e9c3f819c73ddd3a311f0;hb=6c6c8a9c8589ee0a56469e8d8e7a31bd038eb3ae;hp=44108273762b2e62c1eb07dfd167664ee13a4718;hpb=bab653ce39f3d93ee0cf169b89468646c0ba54fd;p=notmuch diff --git a/vim/plugin/notmuch.vim b/vim/plugin/notmuch.vim index 44108273..f29dff1c 100644 --- a/vim/plugin/notmuch.vim +++ b/vim/plugin/notmuch.vim @@ -149,7 +149,7 @@ let g:notmuch_show_maps = { \ '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)', - \ 'i': ':call NM_show_fold_toggle(''s'', ''sig'', !g:notmuch_show_fold_signatures)', + \ 'i': ':call NM_show_fold_toggle(''i'', ''sig'', !g:notmuch_show_fold_signatures)', \ \ 'I': ':call NM_show_mark_read_thread()', \ 'a': ':call NM_show_archive_thread()', @@ -262,12 +262,12 @@ function! s:NM_cmd_search_fmtline(line) return 'ERROR PARSING: ' . a:line endif let max = g:notmuch_search_from_column_width - let flist = [] - for at in split(m[4], ", ") - let p = min([stridx(at, "."), stridx(at, "@")]) - call insert(flist, tolower(at[0:p - 1])) + let flist = {} + for at in split(m[4], '[|,] ') + let p = split(at, '[@.]') + let flist[p[0]] = 1 endfor - let from = join(flist, ", ") + let from = join(keys(flist), ", ") return printf("%-12s %3s %-20.20s | %s (%s)", m[2], m[3], from, m[5], m[6]) endfunction @@ -596,7 +596,7 @@ function! s:NM_show_advance_marking_read_and_archiving() let filter = NM_combine_tags('tag:', advance_tags, 'OR', '()') \ + ['AND'] \ + NM_combine_tags('', ids, 'OR', '()') - call map(advance_tags, '"+" . v:val') + call map(advance_tags, '"-" . v:val') call NM_tag(filter, advance_tags) call NM_show_next(1, 1) return @@ -757,7 +757,7 @@ function! s:NM_cmd_show_parse(inlines) let mode_type = '' elseif part_end let foldinfo = [ mode_type, mode_start, outlnum-1, len(info['msgs']), - \ printf('[ %d-line signature. Press "s" to show. ]', outlnum - mode_start) ] + \ printf('[ %d-line signature. Press "i" to show. ]', outlnum - mode_start) ] let mode_type = '' endif endif @@ -796,7 +796,14 @@ function! s:NM_cmd_show_parse(inlines) endif call add(info['disp'], \ printf('--- %s ---', in_part)) - let part_start = len(info['disp']) + 1 + " We don't yet handle nested parts, so pop + " multipart/* immediately so text/plain + " sub-parts are parsed properly + if match(in_part, '^multipart/') != -1 + let in_part = '' + else + let part_start = len(info['disp']) + 1 + endif endif elseif in_header