]> granicus.if.org Git - vim/commitdiff
updated for version 7.1-104 v7.1.104
authorBram Moolenaar <Bram@vim.org>
Thu, 13 Sep 2007 16:26:47 +0000 (16:26 +0000)
committerBram Moolenaar <Bram@vim.org>
Thu, 13 Sep 2007 16:26:47 +0000 (16:26 +0000)
src/digraph.c
src/edit.c
src/ex_cmds.c
src/ex_getln.c
src/getchar.c
src/normal.c
src/proto/getchar.pro
src/version.c
src/window.c

index e557680ec78a20a45391a17816558e197630f983..a0f16273de7a6a07eade40c9983133a8a4e3990f 100644 (file)
@@ -2028,7 +2028,7 @@ get_digraph(cmdline)
 
     ++no_mapping;
     ++allow_keys;
-    c = safe_vgetc();
+    c = plain_vgetc();
     --no_mapping;
     --allow_keys;
     if (c != ESC)              /* ESC cancels CTRL-K */
@@ -2050,7 +2050,7 @@ get_digraph(cmdline)
 #endif
        ++no_mapping;
        ++allow_keys;
-       cc = safe_vgetc();
+       cc = plain_vgetc();
        --no_mapping;
        --allow_keys;
        if (cc != ESC)      /* ESC cancels CTRL-K */
@@ -2350,7 +2350,7 @@ keymap_init()
     if (*curbuf->b_p_keymap == NUL)
     {
        /* Stop any active keymap and clear the table.  Also remove
-        * b:keymap_unload, as no keymap is active now. */
+        * b:keymap_name, as no keymap is active now. */
        keymap_unload();
        do_cmdline_cmd((char_u *)"unlet! b:keymap_name");
     }
index e5e0522f7964e195e0852b154dfe873b63294b80..2cdf532dddba10f266b8a210b44184a180d6c193 100644 (file)
@@ -788,7 +788,7 @@ edit(cmdchar, startln, count)
            ins_redraw(FALSE);
            ++no_mapping;
            ++allow_keys;
-           c = safe_vgetc();
+           c = plain_vgetc();
            --no_mapping;
            --allow_keys;
            if (c != Ctrl_N && c != Ctrl_G && c != Ctrl_O)
@@ -981,7 +981,7 @@ doESCkey:
 #ifdef FEAT_NETBEANS_INTG
        case K_F21:     /* NetBeans command */
            ++no_mapping;               /* don't map the next key hits */
-           i = safe_vgetc();
+           i = plain_vgetc();
            --no_mapping;
            netbeans_keycommand(i);
            break;
@@ -5224,10 +5224,7 @@ get_literal()
     i = 0;
     for (;;)
     {
-       do
-           nc = safe_vgetc();
-       while (nc == K_IGNORE || nc == K_VER_SCROLLBAR
-                                                   || nc == K_HOR_SCROLLBAR);
+       nc = plain_vgetc();
 #ifdef FEAT_CMDL_INFO
        if (!(State & CMDLINE)
 # ifdef FEAT_MBYTE
@@ -7575,7 +7572,7 @@ ins_reg()
      * deleted when ESC is hit.
      */
     ++no_mapping;
-    regname = safe_vgetc();
+    regname = plain_vgetc();
 #ifdef FEAT_LANGMAP
     LANGMAP_ADJUST(regname, TRUE);
 #endif
@@ -7586,7 +7583,7 @@ ins_reg()
 #ifdef FEAT_CMDL_INFO
        add_to_showcmd_c(literally);
 #endif
-       regname = safe_vgetc();
+       regname = plain_vgetc();
 #ifdef FEAT_LANGMAP
        LANGMAP_ADJUST(regname, TRUE);
 #endif
@@ -7677,7 +7674,7 @@ ins_ctrl_g()
      * deleted when ESC is hit.
      */
     ++no_mapping;
-    c = safe_vgetc();
+    c = plain_vgetc();
     --no_mapping;
     switch (c)
     {
@@ -9356,7 +9353,7 @@ ins_digraph()
      * mode message to be deleted when ESC is hit */
     ++no_mapping;
     ++allow_keys;
-    c = safe_vgetc();
+    c = plain_vgetc();
     --no_mapping;
     --allow_keys;
     if (IS_SPECIAL(c) || mod_mask)         /* special key */
@@ -9388,7 +9385,7 @@ ins_digraph()
        }
        ++no_mapping;
        ++allow_keys;
-       cc = safe_vgetc();
+       cc = plain_vgetc();
        --no_mapping;
        --allow_keys;
        if (cc != ESC)
index 958f3abd3952497735a260d9094cde28280f7ea3..32de576105dd35e2d68fa5c7e5a17f2961e16fc0 100644 (file)
@@ -4498,7 +4498,7 @@ do_sub(eap)
             *
             * The new text is built up in new_start[].  It has some extra
             * room to avoid using alloc()/free() too often.  new_start_len is
-            * the lenght of the allocated memory at new_start.
+            * the length of the allocated memory at new_start.
             *
             * Make a copy of the old line, so it won't be taken away when
             * updating the screen or handling a multi-line match.  The "old_"
@@ -4669,7 +4669,7 @@ do_sub(eap)
 #endif
                            ++no_mapping;       /* don't map this key */
                            ++allow_keys;       /* allow special keys */
-                           i = safe_vgetc();
+                           i = plain_vgetc();
                            --allow_keys;
                            --no_mapping;
 
index 3ddec29607b90ca272091e126c63320fe5be2f9f..4a311b4c1c172a69fa51517301f3ccdd32cdc9b6 100644 (file)
@@ -641,7 +641,7 @@ getcmdline(firstc, count, indent)
        {
            ++no_mapping;
            ++allow_keys;
-           c = safe_vgetc();
+           c = plain_vgetc();
            --no_mapping;
            --allow_keys;
            /* CTRL-\ e doesn't work when obtaining an expression. */
@@ -1091,11 +1091,11 @@ getcmdline(firstc, count, indent)
 #endif
                putcmdline('"', TRUE);
                ++no_mapping;
-               i = c = safe_vgetc();   /* CTRL-R <char> */
+               i = c = plain_vgetc();  /* CTRL-R <char> */
                if (i == Ctrl_O)
                    i = Ctrl_R;         /* CTRL-R CTRL-O == CTRL-R CTRL-R */
                if (i == Ctrl_R)
-                   c = safe_vgetc();   /* CTRL-R CTRL-R <char> */
+                   c = plain_vgetc();  /* CTRL-R CTRL-R <char> */
                --no_mapping;
 #ifdef FEAT_EVAL
                /*
index f77ddc2a8612e49701071fdafe1622c49b0da01e..4d6da38ddaeeb4652b7dcce88804f5fc19025633 100644 (file)
@@ -1597,12 +1597,13 @@ vgetc()
            }
 #endif
 #ifdef FEAT_GUI
-           /* The caller doesn't need to know that the focus event is delayed
-            * until getting a character. */
+           /* Handle focus event here, so that the caller doesn't need to
+            * know about it.  Return K_IGNORE so that we loop once (needed if
+            * 'lazyredraw' is set). */
            if (c == K_FOCUSGAINED || c == K_FOCUSLOST)
            {
                ui_focus_change(c == K_FOCUSGAINED);
-               continue;
+               c = K_IGNORE;
            }
 
            /* Translate K_CSI to CSI.  The special key is only used to avoid
@@ -1747,6 +1748,22 @@ safe_vgetc()
     return c;
 }
 
+/*
+ * Like safe_vgetc(), but loop to handle K_IGNORE.
+ * Also ignore scrollbar events.
+ */
+    int
+plain_vgetc()
+{
+    int c;
+
+    do
+    {
+       c = safe_vgetc();
+    } while (c == K_IGNORE || c == K_VER_SCROLLBAR || c == K_HOR_SCROLLBAR);
+    return c;
+}
+
 /*
  * Check if a character is available, such that vgetc() will not block.
  * If the next character is a special character or multi-byte, the returned
index 65f7773f8810b4e2097f524a31d9837303761d1d..fbc430a9f76f3b2b463519cd1a758a4eb7e5f53a 100644 (file)
@@ -696,7 +696,7 @@ getcount:
                ++allow_keys;           /* no mapping for nchar, but keys */
            }
            ++no_zero_mapping;          /* don't map zero here */
-           c = safe_vgetc();
+           c = plain_vgetc();
 #ifdef FEAT_LANGMAP
            LANGMAP_ADJUST(c, TRUE);
 #endif
@@ -721,7 +721,7 @@ getcount:
            ca.count0 = 0;
            ++no_mapping;
            ++allow_keys;               /* no mapping for nchar, but keys */
-           c = safe_vgetc();           /* get next character */
+           c = plain_vgetc();          /* get next character */
 #ifdef FEAT_LANGMAP
            LANGMAP_ADJUST(c, TRUE);
 #endif
@@ -900,7 +900,7 @@ getcount:
             * For 'g' get the next character now, so that we can check for
             * "gr", "g'" and "g`".
             */
-           ca.nchar = safe_vgetc();
+           ca.nchar = plain_vgetc();
 #ifdef FEAT_LANGMAP
            LANGMAP_ADJUST(ca.nchar, TRUE);
 #endif
@@ -957,7 +957,7 @@ getcount:
                im_set_active(TRUE);
 #endif
 
-           *cp = safe_vgetc();
+           *cp = plain_vgetc();
 
            if (langmap_active)
            {
@@ -1045,7 +1045,7 @@ getcount:
                }
                if (c > 0)
                {
-                   c = safe_vgetc();
+                   c = plain_vgetc();
                    if (c != Ctrl_N && c != Ctrl_G)
                        vungetc(c);
                    else
@@ -1064,7 +1064,7 @@ getcount:
            while (enc_utf8 && lang && (c = vpeekc()) > 0
                                 && (c >= 0x100 || MB_BYTE2LEN(vpeekc()) > 1))
            {
-               c = safe_vgetc();
+               c = plain_vgetc();
                if (!utf_iscomposing(c))
                {
                    vungetc(c);         /* it wasn't, put it back */
@@ -4564,7 +4564,7 @@ nv_zet(cap)
 #endif
            ++no_mapping;
            ++allow_keys;   /* no mapping for nchar, but allow key codes */
-           nchar = safe_vgetc();
+           nchar = plain_vgetc();
 #ifdef FEAT_LANGMAP
            LANGMAP_ADJUST(nchar, TRUE);
 #endif
@@ -4922,7 +4922,7 @@ dozet:
     case 'u':  /* "zug" and "zuw": undo "zg" and "zw" */
                ++no_mapping;
                ++allow_keys;   /* no mapping for nchar, but allow key codes */
-               nchar = safe_vgetc();
+               nchar = plain_vgetc();
 #ifdef FEAT_LANGMAP
                LANGMAP_ADJUST(nchar, TRUE);
 #endif
index cc033a3ec52cd8db488e749a91357d3985b7ecab..06081c321145673aeb09bce5fd52e8bab8aa0d7e 100644 (file)
@@ -38,6 +38,7 @@ void before_blocking __ARGS((void));
 void updatescript __ARGS((int c));
 int vgetc __ARGS((void));
 int safe_vgetc __ARGS((void));
+int plain_vgetc __ARGS((void));
 int vpeekc __ARGS((void));
 int vpeekc_nomap __ARGS((void));
 int vpeekc_any __ARGS((void));
index bb8be8d2c1534144420cf5a44f7238d0b5e6602c..b43dcc761b279c69293ab41c346b2136f04ed341 100644 (file)
@@ -666,6 +666,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    104,
 /**/
     103,
 /**/
index b94fc34a5030f5305c84b36daafdc28b3d636b17..62a39d56763dfa3bfc81c0720770e3418524f8c7 100644 (file)
@@ -584,7 +584,7 @@ wingotofile:
                ++no_mapping;
                ++allow_keys;   /* no mapping for xchar, but allow key codes */
                if (xchar == NUL)
-                   xchar = safe_vgetc();
+                   xchar = plain_vgetc();
 #ifdef FEAT_LANGMAP
                LANGMAP_ADJUST(xchar, TRUE);
 #endif