vim: return nothing instead of failting if there is no message id
authorBart Trojanowski <bart@jukie.net>
Wed, 25 Nov 2009 05:36:11 +0000 (00:36 -0500)
committerBart Trojanowski <bart@jukie.net>
Wed, 25 Nov 2009 05:48:55 +0000 (00:48 -0500)
vim/plugin/notmuch.vim

index e9763ebe8cc087e344130588876f51443feef657..3ceefe58f411fefa3339a75db379dd0769066949 100644 (file)
@@ -525,8 +525,10 @@ function! s:NM_show_message_id()
                 if lnum > msg['end']
                         continue
                 endif
-
-                return msg['id']
+                if has_key(msg,'id')
+                        return msg['id']
+                endif
+                return ''
         endfor
         return ''
 endfunction