vim: return nothing instead of failting if there is no message id
[notmuch] / 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