summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2019-11-17 17:06:33 +0100
committerBram Moolenaar <Bram@vim.org>2019-11-17 17:06:33 +0100
commiteda1da0c9a8db1400649629117e7d248c07735f7 (patch)
treeb5357f17e49a2bc1cd71a44895b6d0621124605a
parent077b9dd3541339a23ade0cc6a23e804ee39312c5 (diff)
patch 8.1.2313: debugging where a delay comes from is not easyv8.1.2313
Problem: Debugging where a delay comes from is not easy. Solution: Use different values when calling ui_delay().
-rw-r--r--src/buffer.c2
-rw-r--r--src/change.c4
-rw-r--r--src/fileio.c2
-rw-r--r--src/gui.c2
-rw-r--r--src/if_xcmdsrv.c2
-rw-r--r--src/insexpand.c2
-rw-r--r--src/main.c2
-rw-r--r--src/normal.c4
-rw-r--r--src/screen.c2
-rw-r--r--src/search.c4
-rw-r--r--src/tag.c4
-rw-r--r--src/term.c4
-rw-r--r--src/ui.c3
-rw-r--r--src/version.c2
14 files changed, 22 insertions, 17 deletions
diff --git a/src/buffer.c b/src/buffer.c
index f7ff01ff97..cba84c629a 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -2103,7 +2103,7 @@ buflist_new(
if (emsg_silent == 0)
{
out_flush();
- ui_delay(3000L, TRUE); /* make sure it is noticed */
+ ui_delay(3001L, TRUE); // make sure it is noticed
}
top_file_num = 1;
}
diff --git a/src/change.c b/src/change.c
index f2542810ef..e274d5d98f 100644
--- a/src/change.c
+++ b/src/change.c
@@ -58,7 +58,7 @@ change_warning(int col)
)
{
out_flush();
- ui_delay(1000L, TRUE); // give the user time to think about it
+ ui_delay(1002L, TRUE); // give the user time to think about it
}
curbuf->b_did_warn = TRUE;
redraw_cmdline = FALSE; // don't redraw and erase the message
@@ -118,7 +118,7 @@ changed(void)
if (need_wait_return && emsg_silent == 0)
{
out_flush();
- ui_delay(2000L, TRUE);
+ ui_delay(2002L, TRUE);
wait_return(TRUE);
msg_scroll = save_msg_scroll;
}
diff --git a/src/fileio.c b/src/fileio.c
index 85c5e6827f..6f8c8f991d 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -4191,7 +4191,7 @@ buf_check_timestamp(
if (!focus)
#endif
/* give the user some time to think about it */
- ui_delay(1000L, TRUE);
+ ui_delay(1004L, TRUE);
/* don't redraw and erase the message */
redraw_cmdline = FALSE;
diff --git a/src/gui.c b/src/gui.c
index 53e073c7dd..94a0503d05 100644
--- a/src/gui.c
+++ b/src/gui.c
@@ -279,7 +279,7 @@ gui_do_fork(void)
}
if (pipe_error)
- ui_delay(300L, TRUE);
+ ui_delay(301L, TRUE);
/* When swapping screens we may need to go to the next line, e.g.,
* after a hit-enter prompt and using ":gui". */
diff --git a/src/if_xcmdsrv.c b/src/if_xcmdsrv.c
index 5904914978..b884a5bed5 100644
--- a/src/if_xcmdsrv.c
+++ b/src/if_xcmdsrv.c
@@ -556,7 +556,7 @@ ServerWait(
time_t now;
XEvent event;
-#define UI_MSEC_DELAY 50
+#define UI_MSEC_DELAY 53
#define SEND_MSEC_POLL 500
#ifndef HAVE_SELECT
struct pollfd fds;
diff --git a/src/insexpand.c b/src/insexpand.c
index e42819a18d..121e6ec52d 100644
--- a/src/insexpand.c
+++ b/src/insexpand.c
@@ -304,7 +304,7 @@ has_compl_option(int dict_opt)
#ifdef FEAT_EVAL
if (!get_vim_var_nr(VV_TESTING))
#endif
- ui_delay(2000L, FALSE);
+ ui_delay(2004L, FALSE);
}
return FALSE;
}
diff --git a/src/main.c b/src/main.c
index 2ec5c26317..103c53c363 100644
--- a/src/main.c
+++ b/src/main.c
@@ -2769,7 +2769,7 @@ check_tty(mparm_T *parmp)
if (parmp->tty_fail && (!stdout_isatty || !input_isatty))
exit(1);
if (scriptin[0] == NULL)
- ui_delay(2000L, TRUE);
+ ui_delay(2005L, TRUE);
TIME_MSG("Warning delay");
}
}
diff --git a/src/normal.c b/src/normal.c
index 76b1fa0644..363f539c73 100644
--- a/src/normal.c
+++ b/src/normal.c
@@ -1169,8 +1169,8 @@ getcount:
cursor_on();
out_flush();
if (msg_scroll || emsg_on_display)
- ui_delay(1000L, TRUE); /* wait at least one second */
- ui_delay(3000L, FALSE); /* wait up to three seconds */
+ ui_delay(1003L, TRUE); /* wait at least one second */
+ ui_delay(3003L, FALSE); /* wait up to three seconds */
State = save_State;
msg_scroll = FALSE;
diff --git a/src/screen.c b/src/screen.c
index 8453c8d8ee..edb93f8b78 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -2406,7 +2406,7 @@ check_for_delay(int check_msg_scroll)
&& emsg_silent == 0)
{
out_flush();
- ui_delay(1000L, TRUE);
+ ui_delay(1006L, TRUE);
emsg_on_display = FALSE;
if (check_msg_scroll)
msg_scroll = FALSE;
diff --git a/src/search.c b/src/search.c
index 00f0a08ffe..cff289cf50 100644
--- a/src/search.c
+++ b/src/search.c
@@ -2726,9 +2726,9 @@ showmatch(
* available.
*/
if (vim_strchr(p_cpo, CPO_SHOWMATCH) != NULL)
- ui_delay(p_mat * 100L, TRUE);
+ ui_delay(p_mat * 100L + 8, TRUE);
else if (!char_avail())
- ui_delay(p_mat * 100L, FALSE);
+ ui_delay(p_mat * 100L + 9, FALSE);
curwin->w_cursor = save_cursor; /* restore cursor position */
*so = save_so;
*siso = save_siso;
diff --git a/src/tag.c b/src/tag.c
index b72d82bf53..040325c627 100644
--- a/src/tag.c
+++ b/src/tag.c
@@ -738,7 +738,7 @@ do_tag(
if (ic && !msg_scrolled && msg_silent == 0)
{
out_flush();
- ui_delay(1000L, TRUE);
+ ui_delay(1007L, TRUE);
}
}
@@ -3599,7 +3599,7 @@ jumpto_tag(
if (!msg_scrolled && msg_silent == 0)
{
out_flush();
- ui_delay(1000L, TRUE);
+ ui_delay(1010L, TRUE);
}
}
retval = OK;
diff --git a/src/term.c b/src/term.c
index 94552a631d..5b8901ed12 100644
--- a/src/term.c
+++ b/src/term.c
@@ -1761,7 +1761,7 @@ report_default_term(char_u *term)
screen_start(); /* don't know where cursor is now */
out_flush();
if (!is_not_a_term())
- ui_delay(2000L, TRUE);
+ ui_delay(2007L, TRUE);
}
}
@@ -2810,7 +2810,7 @@ term_get_winpos(int *x, int *y, varnumber_T timeout)
*y = winpos_y;
return OK;
}
- ui_delay(10, FALSE);
+ ui_delay(10L, FALSE);
}
/* Do not reset "did_request_winpos", if we timed out the response might
* still come later and we must consume it. */
diff --git a/src/ui.c b/src/ui.c
index 2d33f7b304..cde97c3f30 100644
--- a/src/ui.c
+++ b/src/ui.c
@@ -532,6 +532,9 @@ ui_char_avail(void)
void
ui_delay(long msec, int ignoreinput)
{
+#ifdef FEAT_JOB_CHANNEL
+ ch_log(NULL, "ui_delay(%ld)", msec);
+#endif
#ifdef FEAT_GUI
if (gui.in_use && !ignoreinput)
gui_wait_for_chars(msec, typebuf.tb_change_cnt);
diff --git a/src/version.c b/src/version.c
index 2f0316fae7..cfd58460a8 100644
--- a/src/version.c
+++ b/src/version.c
@@ -742,6 +742,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 2313,
+/**/
2312,
/**/
2311,