]> git.notmuchmail.org Git - notmuch/blobdiff - vim/plugin/notmuch.vim
clear the nmap before creating our bindings
[notmuch] / vim / plugin / notmuch.vim
index c45b8e15a782b9fa1d4f3829bd5b572ad216dcac..d3b11ba63ea8f6c6c98fb8345d1286b9f76c2391 100644 (file)
@@ -468,8 +468,10 @@ function! s:NM_cmd_show_parse(inlines)
                                 elseif mode_type == 'cit'
                                         if part_end || match(line, g:notmuch_show_citation_regexp) == -1
                                                 let outlnum = len(info['disp'])
-                                                let foldinfo = [ mode_type, mode_start, outlnum-1,
-                                                               \ printf('[ %d-line citation.  Press "c" to show. ]', outlnum - mode_start) ]
+                                                if mode_start != outlnum
+                                                        let foldinfo = [ mode_type, mode_start, outlnum-1,
+                                                                       \ printf('[ %d-line citation.  Press "c" to show. ]', outlnum - mode_start) ]
+                                                endif
                                                 let mode_type = ''
                                         endif
                                 elseif mode_type == 'sig'
@@ -741,6 +743,7 @@ endif
 " --- assign keymaps {{{1
 
 function! s:NM_set_map(maps)
+        nmapclear
         for [key, code] in items(a:maps)
                 exec printf('nnoremap <buffer> %s %s', key, code)
         endfor