- end
-
- if in_part && mode_type == ''
- if match(line, s:notmuch_show_signature_regexp) != -1
- let mode_type = 'sig'
- let mode_start = len(info['disp'])
- "echoe 'TYPE: ' . mode_type . ' @' . mode_start
- elseif match(line, s:notmuch_show_citation_regexp) != -1
- let mode_type = 'cit'
- let mode_start = len(info['disp'])
- "echoe 'TYPE: ' . mode_type . ' @' . mode_start
- endif
- elseif mode_type == 'cit'
- if !in_part || match(line, s:notmuch_show_citation_regexp) == -1
+ endif
+
+ if in_part == 'text/plain'
+ if !part_end && mode_type == ''
+ if match(line, s:notmuch_show_signature_regexp) != -1
+ let mode_type = 'sig'
+ let mode_start = len(info['disp'])
+ elseif match(line, s:notmuch_show_citation_regexp) != -1
+ let mode_type = 'cit'
+ let mode_start = len(info['disp'])
+ endif
+ elseif mode_type == 'cit'
+ if part_end || match(line, s:notmuch_show_citation_regexp) == -1
+ let outlnum = len(info['disp']) -1
+ let foldinfo = [ mode_type, mode_start, outlnum,
+ \ printf('[ %d-line citation. Press "c" to show. ]', outlnum - mode_start) ]
+ let mode_type = ''
+ endif
+ elseif mode_type == 'sig'