aboutsummaryrefslogtreecommitdiffhomepage
path: root/vim
diff options
context:
space:
mode:
authorGravatar Bart Trojanowski <bart@jukie.net>2009-11-21 23:48:39 -0500
committerGravatar Bart Trojanowski <bart@jukie.net>2009-11-25 00:48:53 -0500
commit5736ea3027a5ebf9824997fa05d05dd74284d66a (patch)
tree21cadd402c04b035a425649322bf7189c9f0be4b /vim
parente8971117ff1c71c8eee85ba87ad9f91bb1184108 (diff)
vim: place ... more inteligently when shortening 'from' list in search
Diffstat (limited to 'vim')
-rw-r--r--vim/plugin/notmuch.vim2
1 files changed, 1 insertions, 1 deletions
diff --git a/vim/plugin/notmuch.vim b/vim/plugin/notmuch.vim
index d786cedf..9cee5008 100644
--- a/vim/plugin/notmuch.vim
+++ b/vim/plugin/notmuch.vim
@@ -212,7 +212,7 @@ function! s:NM_cmd_search_fmtline(line)
let max = g:notmuch_search_from_column_width
let from = m[3]
if strlen(from) >= max
- let from = m[3][0:max-4] . '...'
+ let from = substitute(m[3][0:max-4], '[^A-Za-z1-9_]*$', '', '') . '...'
endif
return printf('%s %-20s | %s (%s)', m[2], from, m[4], m[5])
endfunction