X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;f=vim%2Fplugin%2Fnotmuch.vim;h=255df071a707d5d0e86c0964d6bbd986bf29c8b3;hb=f5c20b8b08c35b5026538b14c45e115a991b3bdd;hp=44108273762b2e62c1eb07dfd167664ee13a4718;hpb=bab653ce39f3d93ee0cf169b89468646c0ba54fd;p=notmuch diff --git a/vim/plugin/notmuch.vim b/vim/plugin/notmuch.vim index 44108273..255df071 100644 --- a/vim/plugin/notmuch.vim +++ b/vim/plugin/notmuch.vim @@ -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