mirror of
https://github.com/vim/vim.git
synced 2025-07-24 10:45:12 -04:00
patch 9.0.0513: may not be able to use a pattern ad the debug prompt
Problem: May not be able to use a pattern ad the debug prompt. Solution: Temporarily disable the timeout. (closes #11164)
This commit is contained in:
parent
c14bfc31d9
commit
9781d9c005
@ -87,6 +87,7 @@ do_debug(char_u *cmd)
|
|||||||
msg_silent = FALSE; // display messages
|
msg_silent = FALSE; // display messages
|
||||||
emsg_silent = FALSE; // display error messages
|
emsg_silent = FALSE; // display error messages
|
||||||
redir_off = TRUE; // don't redirect debug commands
|
redir_off = TRUE; // don't redirect debug commands
|
||||||
|
save_timeout_for_debugging(); // disable regexp timeout flag
|
||||||
|
|
||||||
State = MODE_NORMAL;
|
State = MODE_NORMAL;
|
||||||
debug_mode = TRUE;
|
debug_mode = TRUE;
|
||||||
@ -293,6 +294,7 @@ do_debug(char_u *cmd)
|
|||||||
redraw_all_later(UPD_NOT_VALID);
|
redraw_all_later(UPD_NOT_VALID);
|
||||||
need_wait_return = FALSE;
|
need_wait_return = FALSE;
|
||||||
msg_scroll = save_msg_scroll;
|
msg_scroll = save_msg_scroll;
|
||||||
|
restore_timeout_for_debugging();
|
||||||
lines_left = Rows - 1;
|
lines_left = Rows - 1;
|
||||||
State = save_State;
|
State = save_State;
|
||||||
debug_mode = FALSE;
|
debug_mode = FALSE;
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
/* regexp.c */
|
/* regexp.c */
|
||||||
void init_regexp_timeout(long msec);
|
void init_regexp_timeout(long msec);
|
||||||
void disable_regexp_timeout(void);
|
void disable_regexp_timeout(void);
|
||||||
|
void save_timeout_for_debugging(void);
|
||||||
|
void restore_timeout_for_debugging(void);
|
||||||
int re_multiline(regprog_T *prog);
|
int re_multiline(regprog_T *prog);
|
||||||
char_u *skip_regexp(char_u *startp, int delim, int magic);
|
char_u *skip_regexp(char_u *startp, int delim, int magic);
|
||||||
char_u *skip_regexp_err(char_u *startp, int delim, int magic);
|
char_u *skip_regexp_err(char_u *startp, int delim, int magic);
|
||||||
|
28
src/regexp.c
28
src/regexp.c
@ -80,6 +80,34 @@ disable_regexp_timeout(void)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(FEAT_EVAL) || defined(PROTO)
|
||||||
|
# ifdef FEAT_RELTIME
|
||||||
|
static sig_atomic_t *saved_timeout_flag;
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Used at the debug prompt: disable the timeout so that expression evaluation
|
||||||
|
* can used patterns.
|
||||||
|
* Must be followed by calling restore_timeout_for_debugging().
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
save_timeout_for_debugging(void)
|
||||||
|
{
|
||||||
|
# ifdef FEAT_RELTIME
|
||||||
|
saved_timeout_flag = (sig_atomic_t *)timeout_flag;
|
||||||
|
timeout_flag = &dummy_timeout_flag;
|
||||||
|
# endif
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
restore_timeout_for_debugging(void)
|
||||||
|
{
|
||||||
|
# ifdef FEAT_RELTIME
|
||||||
|
timeout_flag = saved_timeout_flag;
|
||||||
|
# endif
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The first byte of the BT regexp internal "program" is actually this magic
|
* The first byte of the BT regexp internal "program" is actually this magic
|
||||||
* number; the start node begins in the second byte. It's used to catch the
|
* number; the start node begins in the second byte. It's used to catch the
|
||||||
|
@ -699,6 +699,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
513,
|
||||||
/**/
|
/**/
|
||||||
512,
|
512,
|
||||||
/**/
|
/**/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user