Skip to content

Commit eda1da0

Browse files
committed
patch 8.1.2313: debugging where a delay comes from is not easy
Problem: Debugging where a delay comes from is not easy. Solution: Use different values when calling ui_delay().
1 parent 077b9dd commit eda1da0

14 files changed

Lines changed: 22 additions & 17 deletions

File tree

src/buffer.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2103,7 +2103,7 @@ buflist_new(
21032103
if (emsg_silent == 0)
21042104
{
21052105
out_flush();
2106-
ui_delay(3000L, TRUE); /* make sure it is noticed */
2106+
ui_delay(3001L, TRUE); // make sure it is noticed
21072107
}
21082108
top_file_num = 1;
21092109
}

src/change.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ change_warning(int col)
5858
)
5959
{
6060
out_flush();
61-
ui_delay(1000L, TRUE); // give the user time to think about it
61+
ui_delay(1002L, TRUE); // give the user time to think about it
6262
}
6363
curbuf->b_did_warn = TRUE;
6464
redraw_cmdline = FALSE; // don't redraw and erase the message
@@ -118,7 +118,7 @@ changed(void)
118118
if (need_wait_return && emsg_silent == 0)
119119
{
120120
out_flush();
121-
ui_delay(2000L, TRUE);
121+
ui_delay(2002L, TRUE);
122122
wait_return(TRUE);
123123
msg_scroll = save_msg_scroll;
124124
}

src/fileio.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4191,7 +4191,7 @@ buf_check_timestamp(
41914191
if (!focus)
41924192
#endif
41934193
/* give the user some time to think about it */
4194-
ui_delay(1000L, TRUE);
4194+
ui_delay(1004L, TRUE);
41954195

41964196
/* don't redraw and erase the message */
41974197
redraw_cmdline = FALSE;

src/gui.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ gui_do_fork(void)
279279
}
280280

281281
if (pipe_error)
282-
ui_delay(300L, TRUE);
282+
ui_delay(301L, TRUE);
283283

284284
/* When swapping screens we may need to go to the next line, e.g.,
285285
* after a hit-enter prompt and using ":gui". */

src/if_xcmdsrv.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -556,7 +556,7 @@ ServerWait(
556556
time_t now;
557557
XEvent event;
558558

559-
#define UI_MSEC_DELAY 50
559+
#define UI_MSEC_DELAY 53
560560
#define SEND_MSEC_POLL 500
561561
#ifndef HAVE_SELECT
562562
struct pollfd fds;

src/insexpand.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ has_compl_option(int dict_opt)
304304
#ifdef FEAT_EVAL
305305
if (!get_vim_var_nr(VV_TESTING))
306306
#endif
307-
ui_delay(2000L, FALSE);
307+
ui_delay(2004L, FALSE);
308308
}
309309
return FALSE;
310310
}

src/main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2769,7 +2769,7 @@ check_tty(mparm_T *parmp)
27692769
if (parmp->tty_fail && (!stdout_isatty || !input_isatty))
27702770
exit(1);
27712771
if (scriptin[0] == NULL)
2772-
ui_delay(2000L, TRUE);
2772+
ui_delay(2005L, TRUE);
27732773
TIME_MSG("Warning delay");
27742774
}
27752775
}

src/normal.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1169,8 +1169,8 @@ normal_cmd(
11691169
cursor_on();
11701170
out_flush();
11711171
if (msg_scroll || emsg_on_display)
1172-
ui_delay(1000L, TRUE); /* wait at least one second */
1173-
ui_delay(3000L, FALSE); /* wait up to three seconds */
1172+
ui_delay(1003L, TRUE); /* wait at least one second */
1173+
ui_delay(3003L, FALSE); /* wait up to three seconds */
11741174
State = save_State;
11751175

11761176
msg_scroll = FALSE;

src/screen.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2406,7 +2406,7 @@ check_for_delay(int check_msg_scroll)
24062406
&& emsg_silent == 0)
24072407
{
24082408
out_flush();
2409-
ui_delay(1000L, TRUE);
2409+
ui_delay(1006L, TRUE);
24102410
emsg_on_display = FALSE;
24112411
if (check_msg_scroll)
24122412
msg_scroll = FALSE;

src/search.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2726,9 +2726,9 @@ showmatch(
27262726
* available.
27272727
*/
27282728
if (vim_strchr(p_cpo, CPO_SHOWMATCH) != NULL)
2729-
ui_delay(p_mat * 100L, TRUE);
2729+
ui_delay(p_mat * 100L + 8, TRUE);
27302730
else if (!char_avail())
2731-
ui_delay(p_mat * 100L, FALSE);
2731+
ui_delay(p_mat * 100L + 9, FALSE);
27322732
curwin->w_cursor = save_cursor; /* restore cursor position */
27332733
*so = save_so;
27342734
*siso = save_siso;

0 commit comments

Comments
 (0)