aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjörn Linse <bjorn.linse@gmail.com>2021-03-23 10:46:29 +0100
committerGitHub <noreply@github.com>2021-03-23 10:46:29 +0100
commit3e5efa50b689955beb36ce9f8cca7138fd5f0f8e (patch)
treebe85a6233fda42cf039f3447efed4eff7f52b315
parent691a72bb68cb64218f41007dcd07fde59d8e7a62 (diff)
parent80e122ae5d6bc02c8bea33528f0e1d16e48489b6 (diff)
downloadrneovim-3e5efa50b689955beb36ce9f8cca7138fd5f0f8e.tar.gz
rneovim-3e5efa50b689955beb36ce9f8cca7138fd5f0f8e.tar.bz2
rneovim-3e5efa50b689955beb36ce9f8cca7138fd5f0f8e.zip
Merge pull request #14193 from bfredl/msginit
screen: setup scrolling main screen when starting with display-=msgsep
-rw-r--r--src/nvim/ui.c1
-rw-r--r--test/functional/ui/screen_basic_spec.lua44
2 files changed, 37 insertions, 8 deletions
diff --git a/src/nvim/ui.c b/src/nvim/ui.c
index c6c09c80d7..94b6e9e39d 100644
--- a/src/nvim/ui.c
+++ b/src/nvim/ui.c
@@ -110,6 +110,7 @@ static char uilog_last_event[1024] = { 0 };
void ui_init(void)
{
default_grid.handle = 1;
+ msg_grid_adj.target = &default_grid;
ui_comp_init();
}
diff --git a/test/functional/ui/screen_basic_spec.lua b/test/functional/ui/screen_basic_spec.lua
index ff9f30d0a1..958e137f65 100644
--- a/test/functional/ui/screen_basic_spec.lua
+++ b/test/functional/ui/screen_basic_spec.lua
@@ -24,10 +24,6 @@ describe('screen', function()
} )
end)
- after_each(function()
- screen:detach()
- end)
-
it('default initial screen', function()
screen:expect([[
^ |
@@ -67,10 +63,6 @@ local function screen_tests(linegrid)
} )
end)
- after_each(function()
- screen:detach()
- end)
-
describe(':suspend', function()
it('is forwarded to the UI', function()
local function check()
@@ -1004,3 +996,39 @@ describe('Screen default colors', function()
end}
end)
end)
+
+
+describe('screen with msgsep deactivated on startup', function()
+ local screen
+
+ before_each(function()
+ clear('--cmd', 'set display-=msgsep')
+ screen = Screen.new()
+ screen:attach()
+ screen:set_default_attr_ids {
+ [0] = {bold=true, foreground=255};
+ [7] = {bold = true, foreground = Screen.colors.SeaGreen};
+ }
+ end)
+
+ it('execute command with multi-line output', function()
+ feed ':ls<cr>'
+ screen:expect([[
+ {0:~ }|
+ {0:~ }|
+ {0:~ }|
+ {0:~ }|
+ {0:~ }|
+ {0:~ }|
+ {0:~ }|
+ {0:~ }|
+ {0:~ }|
+ {0:~ }|
+ {0:~ }|
+ :ls |
+ 1 %a "[No Name]" line 1 |
+ {7:Press ENTER or type command to continue}^ |
+ ]])
+ feed '<cr>' -- skip the "Press ENTER..." state or tests will hang
+ end)
+end)