Fix gitgutter#utility#warn_once: use echom

This a) logs the message to be seen in `:mess` and b) avoids the
hit-ENTER prompt (which is likely caused by the message not being
logged and Vim deciding that you need to see it then).

So a) fixes b).
This commit is contained in:
Daniel Hahler
2018-03-01 02:07:48 +01:00
committed by Andy Stewart
parent 2fe748b48f
commit 41b951e64e

View File

@@ -37,7 +37,7 @@ function! gitgutter#utility#warn_once(bufnr, message, key) abort
if empty(gitgutter#utility#getbufvar(a:bufnr, a:key)) if empty(gitgutter#utility#getbufvar(a:bufnr, a:key))
call gitgutter#utility#setbufvar(a:bufnr, a:key, '1') call gitgutter#utility#setbufvar(a:bufnr, a:key, '1')
echohl WarningMsg echohl WarningMsg
redraw | echo 'vim-gitgutter: ' . a:message redraw | echom 'vim-gitgutter: ' . a:message
echohl None echohl None
let v:warningmsg = a:message let v:warningmsg = a:message
endif endif