mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
Merge pull request #21666 from bfredl/padbell
fix(tui): do not invoke loop recursively for pad()
This commit is contained in:
commit
0996430392
@ -1626,7 +1626,7 @@ static void pad(void *ctx, size_t delay, int scale FUNC_ATTR_UNUSED, int force)
|
|||||||
}
|
}
|
||||||
|
|
||||||
flush_buf(tui);
|
flush_buf(tui);
|
||||||
loop_uv_run(tui->loop, (int64_t)(delay / 10), false);
|
uv_sleep((unsigned int)(delay/10));
|
||||||
}
|
}
|
||||||
|
|
||||||
static void unibi_set_if_empty(unibi_term *ut, enum unibi_string str, const char *val)
|
static void unibi_set_if_empty(unibi_term *ut, enum unibi_string str, const char *val)
|
||||||
|
@ -1469,6 +1469,33 @@ describe('TUI', function()
|
|||||||
|
|
|
|
||||||
{3:-- TERMINAL --} |]]))
|
{3:-- TERMINAL --} |]]))
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
it('visual bell (padding) does not crash #21610', function()
|
||||||
|
feed_data ':set visualbell\n'
|
||||||
|
screen:expect{grid=[[
|
||||||
|
{1: } |
|
||||||
|
{4:~ }|
|
||||||
|
{4:~ }|
|
||||||
|
{4:~ }|
|
||||||
|
{5:[No Name] }|
|
||||||
|
:set visualbell |
|
||||||
|
{3:-- TERMINAL --} |
|
||||||
|
]]}
|
||||||
|
|
||||||
|
-- move left is enough to invoke the bell
|
||||||
|
feed_data 'h'
|
||||||
|
-- visual change to show we process events after this
|
||||||
|
feed_data 'i'
|
||||||
|
screen:expect{grid=[[
|
||||||
|
{1: } |
|
||||||
|
{4:~ }|
|
||||||
|
{4:~ }|
|
||||||
|
{4:~ }|
|
||||||
|
{5:[No Name] }|
|
||||||
|
{3:-- INSERT --} |
|
||||||
|
{3:-- TERMINAL --} |
|
||||||
|
]]}
|
||||||
|
end)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
describe('TUI', function()
|
describe('TUI', function()
|
||||||
|
Loading…
Reference in New Issue
Block a user