mirror of
https://github.com/neovim/neovim.git
synced 2026-03-30 20:32:08 +00:00
fix(intro): crash on small screen #38397
This commit is contained in:
@@ -4251,7 +4251,7 @@ void intro_message(bool colon)
|
||||
}
|
||||
}
|
||||
|
||||
if (*mesg != NUL) {
|
||||
if (*mesg != NUL && row < Rows - 1) {
|
||||
do_intro_line(row, mesg, colon, i < 3);
|
||||
}
|
||||
row++;
|
||||
|
||||
@@ -1768,11 +1768,12 @@ describe('ui/builtin messages', function()
|
||||
-- ignore final whitespace inside string
|
||||
-- luacheck: push ignore
|
||||
eq(
|
||||
[[--- Syntax items ---
|
||||
vimComment xxx match /\s"[^\-:.%#=*].*$/ms=s+1,lc=1 excludenl contains=@vimCommentGroup,vimCommentString
|
||||
match /\<endif\s\+".*$/ms=s+5,lc=5 contains=@vimCommentGroup,vimCommentString
|
||||
match /\<else\s\+".*$/ms=s+4,lc=4 contains=@vimCommentGroup,vimCommentString
|
||||
links to Comment]],
|
||||
t.dedent [[
|
||||
--- Syntax items ---
|
||||
vimComment xxx match /\s"[^\-:.%#=*].*$/ms=s+1,lc=1 excludenl contains=@vimCommentGroup,vimCommentString
|
||||
match /\<endif\s\+".*$/ms=s+5,lc=5 contains=@vimCommentGroup,vimCommentString
|
||||
match /\<else\s\+".*$/ms=s+4,lc=4 contains=@vimCommentGroup,vimCommentString
|
||||
links to Comment]],
|
||||
exec_capture('syntax list vimComment')
|
||||
)
|
||||
-- luacheck: pop
|
||||
@@ -2176,6 +2177,14 @@ vimComment xxx match /\s"[^\-:.%#=*].*$/ms=s+1,lc=1 excludenl contains=@vim
|
||||
assert_alive()
|
||||
end)
|
||||
|
||||
it(':intro with small screen #38396', function()
|
||||
screen:try_resize(80, 6)
|
||||
feed(':intro<CR>')
|
||||
screen:expect({ any = 'NVIM' })
|
||||
feed('<CR>')
|
||||
assert_alive()
|
||||
end)
|
||||
|
||||
it('no wait return before delayed exception error message', function()
|
||||
screen:try_resize(70, 7)
|
||||
feed('ia<esc>:lua vim.cmd.quit()<CR>')
|
||||
|
||||
Reference in New Issue
Block a user