home *** CD-ROM | disk | FTP | other *** search
/ vim.ftp.fu-berlin.de / 2015-02-03.vim.ftp.fu-berlin.de.tar / vim.ftp.fu-berlin.de / patches / 7.4 / 7.4.601 < prev    next >
Encoding:
Internet Message Format  |  2015-01-27  |  3.6 KB

  1. To: vim_dev@googlegroups.com
  2. Subject: Patch 7.4.601
  3. Fcc: outbox
  4. From: Bram Moolenaar <Bram@moolenaar.net>
  5. Mime-Version: 1.0
  6. Content-Type: text/plain; charset=UTF-8
  7. Content-Transfer-Encoding: 8bit
  8. ------------
  9.  
  10. Patch 7.4.601
  11. Problem:    It is not possible to have feedkeys() insert characters.
  12. Solution:   Add the 'i' flag.
  13. Files:        src/eval.c, runtime/doc/eval.txt
  14.  
  15.  
  16. *** ../vim-7.4.600/src/eval.c    2015-01-27 13:49:27.883049396 +0100
  17. --- src/eval.c    2015-01-27 15:13:01.928187370 +0100
  18. ***************
  19. *** 10500,10505 ****
  20. --- 10500,10506 ----
  21.       typval_T    *rettv UNUSED;
  22.   {
  23.       int        remap = TRUE;
  24. +     int        insert = FALSE;
  25.       char_u    *keys, *flags;
  26.       char_u    nbuf[NUMBUFLEN];
  27.       int        typed = FALSE;
  28. ***************
  29. *** 10524,10529 ****
  30. --- 10525,10531 ----
  31.               case 'n': remap = FALSE; break;
  32.               case 'm': remap = TRUE; break;
  33.               case 't': typed = TRUE; break;
  34. +             case 'i': insert = TRUE; break;
  35.           }
  36.           }
  37.       }
  38. ***************
  39. *** 10534,10540 ****
  40.       if (keys_esc != NULL)
  41.       {
  42.           ins_typebuf(keys_esc, (remap ? REMAP_YES : REMAP_NONE),
  43. !                            typebuf.tb_len, !typed, FALSE);
  44.           vim_free(keys_esc);
  45.           if (vgetc_busy)
  46.           typebuf_was_filled = TRUE;
  47. --- 10536,10542 ----
  48.       if (keys_esc != NULL)
  49.       {
  50.           ins_typebuf(keys_esc, (remap ? REMAP_YES : REMAP_NONE),
  51. !                   insert ? 0 : typebuf.tb_len, !typed, FALSE);
  52.           vim_free(keys_esc);
  53.           if (vgetc_busy)
  54.           typebuf_was_filled = TRUE;
  55. *** ../vim-7.4.600/runtime/doc/eval.txt    2014-11-27 19:14:45.080940970 +0100
  56. --- runtime/doc/eval.txt    2015-01-27 15:12:52.908285780 +0100
  57. ***************
  58. *** 2957,2965 ****
  59.   
  60.   feedkeys({string} [, {mode}])                *feedkeys()*
  61.           Characters in {string} are queued for processing as if they
  62. !         come from a mapping or were typed by the user.    They are added
  63. !         to the end of the typeahead buffer, thus if a mapping is still
  64. !         being executed these characters come after them.
  65.           The function does not wait for processing of keys contained in
  66.           {string}.
  67.           To include special keys into {string}, use double-quotes
  68. --- 2965,2976 ----
  69.   
  70.   feedkeys({string} [, {mode}])                *feedkeys()*
  71.           Characters in {string} are queued for processing as if they
  72. !         come from a mapping or were typed by the user.
  73. !         By default the string is added to the end of the typeahead
  74. !         buffer, thus if a mapping is still being executed the
  75. !         characters come after them.  Use the 'i' flag to insert before
  76. !         other characters, they will be executed next, before any
  77. !         characters from a mapping.
  78.           The function does not wait for processing of keys contained in
  79.           {string}.
  80.           To include special keys into {string}, use double-quotes
  81. ***************
  82. *** 2973,2978 ****
  83. --- 2984,2990 ----
  84.           't'    Handle keys as if typed; otherwise they are handled as
  85.               if coming from a mapping.  This matters for undo,
  86.               opening folds, etc.
  87. +         'i'    Insert the string instead of appending (see above).
  88.           Return value is always 0.
  89.   
  90.   filereadable({file})                    *filereadable()*
  91. *** ../vim-7.4.600/src/version.c    2015-01-27 14:54:07.944583588 +0100
  92. --- src/version.c    2015-01-27 15:15:35.290514092 +0100
  93. ***************
  94. *** 743,744 ****
  95. --- 743,746 ----
  96.   {   /* Add new patch number below this line */
  97. + /**/
  98. +     601,
  99.   /**/
  100.  
  101. -- 
  102. hundred-and-one symptoms of being an internet addict:
  103. 127. You bring your laptop and cellular phone to church.
  104.  
  105.  /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
  106. ///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
  107. \\\  an exciting new programming language -- http://www.Zimbu.org        ///
  108.  \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///
  109.