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:
parent
96cdf65b71
commit
d27c9fa896
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user