0
0
mirror of https://github.com/vim/vim.git synced 2025-09-04 21:33:48 -04:00

updated for version 7.0173

This commit is contained in:
Bram Moolenaar 2005-12-18 22:02:33 +00:00
parent da1b1a7357
commit d35f9711d4
5 changed files with 25 additions and 11 deletions

View File

@ -1,4 +1,4 @@
*insert.txt* For Vim version 7.0aa. Last change: 2005 Dec 14
*insert.txt* For Vim version 7.0aa. Last change: 2005 Dec 18
VIM REFERENCE MANUAL by Bram Moolenaar
@ -965,6 +965,8 @@ While the menu is displayed these keys have a special meaning:
<CR> and <Enter>: Accept the currently selected match
<Up>: Select the previous match, as if CTRL-P was used
<Down>: Select the next match, as if CTRL-N was used
<PageUp>: Select a match several entries back
<PageDown>: Select a match several entries further
The colors of the menu can be changed with these highlight groups:
Pmenu normal item |hl-Pmenu|

View File

@ -7483,6 +7483,8 @@ au_event_restore(old_ei)
* :autocmd bufleave * set tw=79 nosmartindent ic infercase
*
* :autocmd * *.c show all autocommands for *.c files.
*
* Mostly a {group} argument can optionally appear before <event>.
*/
void
do_autocmd(arg, forceit)
@ -8168,11 +8170,26 @@ apply_autocmds_retval(event, fname, fname_io, force, buf, retval)
}
#if defined(FEAT_AUTOCMD) || defined(PROTO)
/*
* Return TRUE when there is a CursorHold autocommand defined.
*/
int
has_cursorhold()
{
return (first_autopat[(int)EVENT_CURSORHOLD] != NULL);
}
/*
* Return TRUE if the CursorHold event can be triggered.
*/
int
trigger_cursorhold()
{
return (!did_cursorhold
&& has_cursorhold()
&& !Recording
&& get_real_state() == NORMAL_BUSY);
}
#endif
static int

View File

@ -2653,8 +2653,7 @@ gui_wait_for_chars(wtime)
if (gui_mch_wait_for_chars(p_ut) == OK)
retval = OK;
#ifdef FEAT_AUTOCMD
else if (!did_cursorhold && has_cursorhold()
&& get_real_state() == NORMAL_BUSY)
else if (trigger_cursorhold())
{
char_u buf[3];
@ -4639,7 +4638,7 @@ gui_do_findrepl(flags, find_text, repl_text, down)
u_sync();
del_bytes((long)(regmatch.endp[0] - regmatch.startp[0]),
FALSE);
FALSE, FALSE);
ins_str(repl_text);
}
}

View File

@ -342,11 +342,8 @@ mch_inchar(buf, maxlen, wtime, tb_change_cnt)
if (WaitForChar(p_ut) == 0)
{
#ifdef FEAT_AUTOCMD
if (!did_cursorhold
&& has_cursorhold()
&& get_real_state() == NORMAL_BUSY
&& maxlen >= 3
&& !typebuf_changed(tb_change_cnt))
if (trigger_cursorhold() && maxlen >= 3
&& !typebuf_changed(tb_change_cnt))
{
buf[0] = K_SPECIAL;
buf[1] = KS_EXTRA;

View File

@ -1383,8 +1383,7 @@ mch_inchar(
if (!WaitForChar(p_ut))
{
#ifdef FEAT_AUTOCMD
if (!did_cursorhold && has_cursorhold()
&& get_real_state() == NORMAL_BUSY && maxlen >= 3)
if (trigger_cursorhold() && maxlen >= 3)
{
buf[0] = K_SPECIAL;
buf[1] = KS_EXTRA;