]> granicus.if.org Git - vim/commitdiff
updated for version 7.0173
authorBram Moolenaar <Bram@vim.org>
Sun, 18 Dec 2005 22:02:33 +0000 (22:02 +0000)
committerBram Moolenaar <Bram@vim.org>
Sun, 18 Dec 2005 22:02:33 +0000 (22:02 +0000)
runtime/doc/insert.txt
src/fileio.c
src/gui.c
src/os_unix.c
src/os_win32.c

index 405af2f9a0163f0013b2ae7a486b95efdedbfac0..9fc2f5ada11796febb1dcf0d32db307c96d0c9c9 100644 (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|
index 0cfbc2222709394f9830bf2762e2a7ec11e2aaaa..5b083f950ad6ba7dc25b73de496af7bc3b6d5b53 100644 (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
index 32416cb59cffe3d579edcb88f554db91895aab68..75085ced291acf5d6122feb28c768c940ab5968f 100644 (file)
--- a/src/gui.c
+++ b/src/gui.c
@@ -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);
                }
            }
index 6165e9f6ad1de0abadd70a58960f1f186964113d..73693b632fdfa6a7f88c0b6a75bb42994e62e7e1 100644 (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;
index 91bc87e88229fc36e05b5e835c83bbd04a8254a8..08df912cee5d564815a32c5f48d8366e22e96be9 100644 (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;