diff options
author | Björn Linse <bjorn.linse@gmail.com> | 2019-09-02 13:32:25 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-09-02 13:32:25 +0200 |
commit | cb339ca0fb27976daca1909557d2862be9629d0e (patch) | |
tree | 028e65927ae113a042e2c8a40a9fcc7dfcc73bc3 | |
parent | 099445cc07b0154edc6ecd562a28e86c87c0096b (diff) | |
parent | 66f4e8aee0bb810342364eaf6c9486918cbf1f17 (diff) | |
download | rneovim-cb339ca0fb27976daca1909557d2862be9629d0e.tar.gz rneovim-cb339ca0fb27976daca1909557d2862be9629d0e.tar.bz2 rneovim-cb339ca0fb27976daca1909557d2862be9629d0e.zip |
Merge pull request #10913 from bfredl/nomsgsep
screen: fixes for `set display-=msgsep`, fixes #10912
-rw-r--r-- | src/nvim/message.c | 4 | ||||
-rw-r--r-- | src/nvim/screen.c | 6 | ||||
-rw-r--r-- | test/functional/ui/embed_spec.lua | 14 |
3 files changed, 19 insertions, 5 deletions
diff --git a/src/nvim/message.c b/src/nvim/message.c index 2354cce2b7..ac731210d7 100644 --- a/src/nvim/message.c +++ b/src/nvim/message.c @@ -154,8 +154,8 @@ void msg_grid_validate(void) { grid_assign_handle(&msg_grid); bool should_alloc = msg_dothrottle(); - if (msg_grid.Rows != Rows || msg_grid.Columns != Columns - || (should_alloc && !msg_grid.chars)) { + if (should_alloc && (msg_grid.Rows != Rows || msg_grid.Columns != Columns + || !msg_grid.chars)) { // TODO(bfredl): eventually should be set to "invalid". I e all callers // will use the grid including clear to EOS if necessary. grid_alloc(&msg_grid, Rows, Columns, false, true); diff --git a/src/nvim/screen.c b/src/nvim/screen.c index 8f415a8ed5..b9469686b5 100644 --- a/src/nvim/screen.c +++ b/src/nvim/screen.c @@ -404,7 +404,7 @@ int update_screen(int type) default_grid.valid = true; } - if (type == NOT_VALID && msg_dothrottle()) { + if (type == NOT_VALID && (msg_dothrottle() || msg_grid.chars)) { grid_fill(&default_grid, Rows-p_ch, Rows, 0, Columns, ' ', ' ', 0); } @@ -7288,9 +7288,9 @@ void screen_resize(int width, int height) } } } + ui_flush(); } - ui_flush(); - --busy; + busy--; } /// Check if the new Nvim application "shell" dimensions are valid. diff --git a/test/functional/ui/embed_spec.lua b/test/functional/ui/embed_spec.lua index 5e09dc4289..f3cd223f53 100644 --- a/test/functional/ui/embed_spec.lua +++ b/test/functional/ui/embed_spec.lua @@ -81,6 +81,20 @@ local function test_embed(ext_linegrid) eq(Screen.colors.Green, screen.default_colors.rgb_bg) end} end) + + it("set display-=msgsep before first redraw", function() + startup('--cmd', 'set display-=msgsep') + screen:expect{grid=[[ + ^ | + {3:~ }| + {3:~ }| + {3:~ }| + {3:~ }| + {3:~ }| + {3:~ }| + | + ]]} + end) end describe('--embed UI on startup (ext_linegrid=true)', function() test_embed(true) end) |