0
0
mirror of https://github.com/vim/vim.git synced 2025-09-24 03:44:06 -04:00

patch 9.0.0683: cannot specify a time for :echowindow

Problem:    Cannot specify a time for :echowindow.
Solution:   A count can be used to specify the display time. Add
            popup_findecho().
This commit is contained in:
Bram Moolenaar
2022-10-07 14:31:45 +01:00
parent cf3d0eaf47
commit bdc09a18fc
21 changed files with 147 additions and 25 deletions

View File

@@ -3269,7 +3269,7 @@ exec_instructions(ectx_T *ectx)
case ISN_ECHOCONSOLE:
case ISN_ECHOERR:
{
int count = iptr->isn_arg.number;
int count;
garray_T ga;
char_u buf[NUMBUFLEN];
char_u *p;
@@ -3277,6 +3277,10 @@ exec_instructions(ectx_T *ectx)
int failed = FALSE;
int idx;
if (iptr->isn_type == ISN_ECHOWINDOW)
count = iptr->isn_arg.echowin.ewin_count;
else
count = iptr->isn_arg.number;
ga_init2(&ga, 1, 80);
for (idx = 0; idx < count; ++idx)
{
@@ -3339,7 +3343,8 @@ exec_instructions(ectx_T *ectx)
#ifdef HAS_MESSAGE_WINDOW
else if (iptr->isn_type == ISN_ECHOWINDOW)
{
start_echowindow();
start_echowindow(
iptr->isn_arg.echowin.ewin_time);
msg_attr(ga.ga_data, echo_attr);
end_echowindow();
}
@@ -6094,8 +6099,13 @@ list_instructions(char *pfx, isn_T *instr, int instr_count, ufunc_T *ufunc)
(varnumber_T)(iptr->isn_arg.number));
break;
case ISN_ECHOWINDOW:
smsg("%s%4d ECHOWINDOW %lld", pfx, current,
(varnumber_T)(iptr->isn_arg.number));
if (iptr->isn_arg.echowin.ewin_time > 0)
smsg("%s%4d ECHOWINDOW %d (%ld sec)", pfx, current,
iptr->isn_arg.echowin.ewin_count,
iptr->isn_arg.echowin.ewin_time);
else
smsg("%s%4d ECHOWINDOW %d", pfx, current,
iptr->isn_arg.echowin.ewin_count);
break;
case ISN_ECHOCONSOLE:
smsg("%s%4d ECHOCONSOLE %lld", pfx, current,