]> git.notmuchmail.org Git - notmuch/blobdiff - vim/plugin/notmuch.vim
vim: fix from list reformatting in search view
[notmuch] / vim / plugin / notmuch.vim
index 49a52eb44fc31006dc31eca88cbaa1f8a41f860c..255df071a707d5d0e86c0964d6bbd986bf29c8b3 100644 (file)
@@ -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