mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
vim-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().
eda1da0c9a
This commit is contained in:
parent
94b10d25da
commit
b8c3bb6790
@ -1844,7 +1844,7 @@ buf_T *buflist_new(char_u *ffname_arg, char_u *sfname_arg, linenr_T lnum,
|
||||
EMSG(_("W14: Warning: List of file names overflow"));
|
||||
if (emsg_silent == 0) {
|
||||
ui_flush();
|
||||
os_delay(3000L, true); // make sure it is noticed
|
||||
os_delay(3001L, true); // make sure it is noticed
|
||||
}
|
||||
top_file_num = 1;
|
||||
}
|
||||
|
@ -68,7 +68,7 @@ void change_warning(int col)
|
||||
(void)msg_end();
|
||||
if (msg_silent == 0 && !silent_mode && ui_active()) {
|
||||
ui_flush();
|
||||
os_delay(1000L, true); // give the user time to think about it
|
||||
os_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
|
||||
@ -109,7 +109,7 @@ void changed(void)
|
||||
// and don't let the emsg() set msg_scroll.
|
||||
if (need_wait_return && emsg_silent == 0) {
|
||||
ui_flush();
|
||||
os_delay(2000L, true);
|
||||
os_delay(2002L, true);
|
||||
wait_return(true);
|
||||
msg_scroll = save_msg_scroll;
|
||||
} else {
|
||||
|
@ -2058,7 +2058,7 @@ static bool check_compl_option(bool dict_opt)
|
||||
vim_beep(BO_COMPL);
|
||||
setcursor();
|
||||
ui_flush();
|
||||
os_delay(2000L, false);
|
||||
os_delay(2004L, false);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
@ -4947,11 +4947,11 @@ int buf_check_timestamp(buf_T *buf)
|
||||
(void)msg_end();
|
||||
if (emsg_silent == 0) {
|
||||
ui_flush();
|
||||
/* give the user some time to think about it */
|
||||
os_delay(1000L, true);
|
||||
// give the user some time to think about it
|
||||
os_delay(1004L, true);
|
||||
|
||||
/* don't redraw and erase the message */
|
||||
redraw_cmdline = FALSE;
|
||||
// don't redraw and erase the message
|
||||
redraw_cmdline = false;
|
||||
}
|
||||
}
|
||||
already_warned = TRUE;
|
||||
|
@ -630,9 +630,9 @@ static void normal_redraw_mode_message(NormalState *s)
|
||||
ui_cursor_shape(); // show different cursor shape
|
||||
ui_flush();
|
||||
if (msg_scroll || emsg_on_display) {
|
||||
os_delay(1000L, true); // wait at least one second
|
||||
os_delay(1003L, true); // wait at least one second
|
||||
}
|
||||
os_delay(3000L, false); // wait up to three seconds
|
||||
os_delay(3003L, false); // wait up to three seconds
|
||||
State = save_State;
|
||||
|
||||
msg_scroll = false;
|
||||
|
@ -62,6 +62,7 @@ uint64_t os_now(void)
|
||||
/// @param ignoreinput If true, only SIGINT (CTRL-C) can interrupt.
|
||||
void os_delay(uint64_t ms, bool ignoreinput)
|
||||
{
|
||||
DLOG("%" PRIu64 " ms", ms);
|
||||
if (ignoreinput) {
|
||||
if (ms > INT_MAX) {
|
||||
ms = INT_MAX;
|
||||
|
@ -6227,7 +6227,7 @@ void check_for_delay(int check_msg_scroll)
|
||||
&& !did_wait_return
|
||||
&& emsg_silent == 0) {
|
||||
ui_flush();
|
||||
os_delay(1000L, true);
|
||||
os_delay(1006L, true);
|
||||
emsg_on_display = false;
|
||||
if (check_msg_scroll) {
|
||||
msg_scroll = false;
|
||||
|
@ -2373,10 +2373,11 @@ showmatch(
|
||||
* brief pause, unless 'm' is present in 'cpo' and a character is
|
||||
* available.
|
||||
*/
|
||||
if (vim_strchr(p_cpo, CPO_SHOWMATCH) != NULL)
|
||||
os_delay(p_mat * 100L, true);
|
||||
else if (!char_avail())
|
||||
os_delay(p_mat * 100L, false);
|
||||
if (vim_strchr(p_cpo, CPO_SHOWMATCH) != NULL) {
|
||||
os_delay(p_mat * 100L + 8, true);
|
||||
} else if (!char_avail()) {
|
||||
os_delay(p_mat * 100L + 9, false);
|
||||
}
|
||||
curwin->w_cursor = save_cursor; // restore cursor position
|
||||
*so = save_so;
|
||||
*siso = save_siso;
|
||||
|
@ -625,7 +625,7 @@ do_tag(
|
||||
}
|
||||
if (ic && !msg_scrolled && msg_silent == 0) {
|
||||
ui_flush();
|
||||
os_delay(1000L, true);
|
||||
os_delay(1007L, true);
|
||||
}
|
||||
}
|
||||
|
||||
@ -2853,7 +2853,7 @@ static int jumpto_tag(
|
||||
MSG(_("E435: Couldn't find tag, just guessing!"));
|
||||
if (!msg_scrolled && msg_silent == 0) {
|
||||
ui_flush();
|
||||
os_delay(1000L, true);
|
||||
os_delay(1010L, true);
|
||||
}
|
||||
}
|
||||
retval = OK;
|
||||
|
Loading…
Reference in New Issue
Block a user