diff options
author | Bart Trojanowski <bart@jukie.net> | 2009-11-21 00:04:52 -0500 |
---|---|---|
committer | Bart Trojanowski <bart@jukie.net> | 2009-11-25 00:48:53 -0500 |
commit | 42595845996e0495c40ca6a60987ffbef5c25704 (patch) | |
tree | ccbff86104cff852c0925c7a817e8ac298673bbb /vim | |
parent | 99f41984077c3e4cc9fa7a272c06149a2a029035 (diff) |
correct fold line counts
Diffstat (limited to 'vim')
-rw-r--r-- | vim/plugin/notmuch.vim | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/vim/plugin/notmuch.vim b/vim/plugin/notmuch.vim index abb3cb46..43f6f542 100644 --- a/vim/plugin/notmuch.vim +++ b/vim/plugin/notmuch.vim @@ -479,8 +479,10 @@ function! s:NM_cmd_show_parse(inlines) if (outlnum - mode_start) > g:notmuch_show_signature_lines_max let mode_type = '' elseif part_end - let foldinfo = [ mode_type, mode_start, outlnum, - \ printf('[ %d-line signature. Press "s" to show. ]', outlnum - mode_start) ] + if mode_start != outlnum + let foldinfo = [ mode_type, mode_start, outlnum-1, + \ printf('[ %d-line signature. Press "s" to show. ]', outlnum - mode_start) ] + endif let mode_type = '' endif endif @@ -534,7 +536,7 @@ function! s:NM_cmd_show_parse(inlines) let hdr_start = msg['hdr_start']+1 let hdr_end = len(info['disp']) let foldinfo = [ 'hdr', hdr_start, hdr_end, - \ printf('[ %d-line headers. Press "h" to show. ]', hdr_end - hdr_start) ] + \ printf('[ %d-line headers. Press "h" to show. ]', hdr_end + 1 - hdr_start) ] let msg['header'] = hdr let in_header = 0 let hdr = {} |