1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-04-14 15:19:12 +08:00

fix(cmdheight): update cmdheight when send multiple line message

This commit is contained in:
wsdjeg 2022-05-03 23:37:50 +08:00
parent 96cdf65b71
commit d27c9fa896

View File

@ -339,6 +339,20 @@ function! s:update_msg_screen() abort
endfunction
function! s:echon() abort
let context = s:c_base . s:c_begin . s:c_char . s:c_end
if context =~# "\n"
let h = len(split(context, "\n"))
let end = context =~# "\n$" ? 1 : 0
let saved_cmdheight = &cmdheight
try
" here maybe cause E36
let &cmdheight = h + end
catch
let &cmdheight = saved_cmdheight
endtry
else
let &cmdheight = 1
endif
redraw
normal! :
echohl Comment | echon s:c_base