From cd712212509884d959c464f94bca15f881d95f1b Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Fri, 20 Mar 2026 18:23:39 -0400 Subject: [PATCH] fix(intro): crash on small screen #38397 --- src/nvim/version.c | 2 +- test/functional/ui/messages_spec.lua | 19 ++++++++++++++----- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/src/nvim/version.c b/src/nvim/version.c index 0c441facb6..016db17dbf 100644 --- a/src/nvim/version.c +++ b/src/nvim/version.c @@ -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++; diff --git a/test/functional/ui/messages_spec.lua b/test/functional/ui/messages_spec.lua index 4e6dc2eff1..ce8f7b71e3 100644 --- a/test/functional/ui/messages_spec.lua +++ b/test/functional/ui/messages_spec.lua @@ -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 /\') + screen:expect({ any = 'NVIM' }) + feed('') + assert_alive() + end) + it('no wait return before delayed exception error message', function() screen:try_resize(70, 7) feed('ia:lua vim.cmd.quit()')