mirror of
https://github.com/neovim/neovim.git
synced 2025-09-19 01:38:16 +00:00
@@ -7807,11 +7807,12 @@ static void ex_redir(exarg_T *eap)
|
|||||||
redir_off = FALSE;
|
redir_off = FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/// ":redraw": force redraw
|
||||||
* ":redraw": force redraw
|
|
||||||
*/
|
|
||||||
static void ex_redraw(exarg_T *eap)
|
static void ex_redraw(exarg_T *eap)
|
||||||
{
|
{
|
||||||
|
if (State & CMDPREVIEW) {
|
||||||
|
return; // Ignore :redraw during 'inccommand' preview. #9777
|
||||||
|
}
|
||||||
int r = RedrawingDisabled;
|
int r = RedrawingDisabled;
|
||||||
int p = p_lz;
|
int p = p_lz;
|
||||||
|
|
||||||
@@ -7840,11 +7841,12 @@ static void ex_redraw(exarg_T *eap)
|
|||||||
ui_flush();
|
ui_flush();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/// ":redrawstatus": force redraw of status line(s)
|
||||||
* ":redrawstatus": force redraw of status line(s)
|
|
||||||
*/
|
|
||||||
static void ex_redrawstatus(exarg_T *eap)
|
static void ex_redrawstatus(exarg_T *eap)
|
||||||
{
|
{
|
||||||
|
if (State & CMDPREVIEW) {
|
||||||
|
return; // Ignore :redrawstatus during 'inccommand' preview. #9777
|
||||||
|
}
|
||||||
int r = RedrawingDisabled;
|
int r = RedrawingDisabled;
|
||||||
int p = p_lz;
|
int p = p_lz;
|
||||||
|
|
||||||
|
@@ -2607,3 +2607,30 @@ it(':substitute with inccommand during :terminal activity', function()
|
|||||||
|
|
||||||
end)
|
end)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
it(':substitute with inccommand, timer-induced :redraw #9777', function()
|
||||||
|
local screen = Screen.new(30,12)
|
||||||
|
clear()
|
||||||
|
command('set cmdwinheight=3')
|
||||||
|
command('call timer_start(10, {-> execute("redraw")}, {"repeat":-1})')
|
||||||
|
command('call timer_start(10, {-> execute("redrawstatus")}, {"repeat":-1})')
|
||||||
|
common_setup(screen, 'split', 'foo bar baz\nbar baz fox\nbar foo baz')
|
||||||
|
|
||||||
|
feed('gg')
|
||||||
|
feed(':%s/foo/ZZZ')
|
||||||
|
sleep(20) -- Allow some timer activity.
|
||||||
|
screen:expect([[
|
||||||
|
{12:ZZZ} bar baz |
|
||||||
|
bar baz fox |
|
||||||
|
bar {12:ZZZ} baz |
|
||||||
|
{15:~ }|
|
||||||
|
{15:~ }|
|
||||||
|
{15:~ }|
|
||||||
|
{11:[No Name] [+] }|
|
||||||
|
|1| {12:ZZZ} bar baz |
|
||||||
|
|3| bar {12:ZZZ} baz |
|
||||||
|
{15:~ }|
|
||||||
|
{10:[Preview] }|
|
||||||
|
:%s/foo/ZZZ^ |
|
||||||
|
]])
|
||||||
|
end)
|
||||||
|
Reference in New Issue
Block a user