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.0 / 7.0.039 < prev    next >
Encoding:
Internet Message Format  |  2006-07-11  |  3.2 KB

  1. To: vim-dev@vim.org
  2. Subject: Patch 7.0.039
  3. Fcc: outbox
  4. From: Bram Moolenaar <Bram@moolenaar.net>
  5. Mime-Version: 1.0
  6. Content-Type: text/plain; charset=ISO-8859-1
  7. Content-Transfer-Encoding: 8bit
  8. ------------
  9.  
  10. Patch 7.0.039
  11. Problem:    Calling inputdialog() with a third argument in the console doesn't
  12.             work.
  13. Solution:   Make a separate function for input() and inputdialog(). (Yegappan
  14.             Lakshmanan)
  15. Files:      src/eval.c
  16.  
  17.  
  18. *** ../vim-7.0.038/src/eval.c    Wed Jul 12 21:48:56 2006
  19. --- src/eval.c    Mon Jul 10 23:03:13 2006
  20. ***************
  21. *** 11321,11334 ****
  22.   
  23.   static int inputsecret_flag = 0;
  24.   
  25.   /*
  26. !  * "input()" function
  27. !  *     Also handles inputsecret() when inputsecret is set.
  28.    */
  29.       static void
  30. ! f_input(argvars, rettv)
  31.       typval_T    *argvars;
  32.       typval_T    *rettv;
  33.   {
  34.       char_u    *prompt = get_tv_string_chk(&argvars[0]);
  35.       char_u    *p = NULL;
  36. --- 11321,11339 ----
  37.   
  38.   static int inputsecret_flag = 0;
  39.   
  40. + static void get_user_input __ARGS((typval_T *argvars, typval_T *rettv, int inputdialog));
  41.   /*
  42. !  * This function is used by f_input() and f_inputdialog() functions. The third
  43. !  * argument to f_input() specifies the type of completion to use at the
  44. !  * prompt. The third argument to f_inputdialog() specifies the value to return
  45. !  * when the user cancels the prompt.
  46.    */
  47.       static void
  48. ! get_user_input(argvars, rettv, inputdialog)
  49.       typval_T    *argvars;
  50.       typval_T    *rettv;
  51. +     int        inputdialog;
  52.   {
  53.       char_u    *prompt = get_tv_string_chk(&argvars[0]);
  54.       char_u    *p = NULL;
  55. ***************
  56. *** 11378,11384 ****
  57.           if (defstr != NULL)
  58.           stuffReadbuffSpec(defstr);
  59.   
  60. !         if (argvars[2].v_type != VAR_UNKNOWN)
  61.           {
  62.           char_u    *xp_name;
  63.           int    xp_namelen;
  64. --- 11383,11389 ----
  65.           if (defstr != NULL)
  66.           stuffReadbuffSpec(defstr);
  67.   
  68. !         if (!inputdialog && argvars[2].v_type != VAR_UNKNOWN)
  69.           {
  70.           char_u    *xp_name;
  71.           int    xp_namelen;
  72. ***************
  73. *** 11413,11418 ****
  74. --- 11418,11435 ----
  75.   }
  76.   
  77.   /*
  78. +  * "input()" function
  79. +  *     Also handles inputsecret() when inputsecret is set.
  80. +  */
  81. +     static void
  82. + f_input(argvars, rettv)
  83. +     typval_T    *argvars;
  84. +     typval_T    *rettv;
  85. + {
  86. +     get_user_input(argvars, rettv, FALSE);
  87. + }
  88. + /*
  89.    * "inputdialog()" function
  90.    */
  91.       static void
  92. ***************
  93. *** 11452,11458 ****
  94.       }
  95.       else
  96.   #endif
  97. !     f_input(argvars, rettv);
  98.   }
  99.   
  100.   /*
  101. --- 11469,11475 ----
  102.       }
  103.       else
  104.   #endif
  105. !     get_user_input(argvars, rettv, TRUE);
  106.   }
  107.   
  108.   /*
  109. *** ../vim-7.0.038/src/version.c    Wed Jul 12 21:48:56 2006
  110. --- src/version.c    Wed Jul 12 21:56:30 2006
  111. ***************
  112. *** 668,669 ****
  113. --- 668,671 ----
  114.   {   /* Add new patch number below this line */
  115. + /**/
  116. +     39,
  117.   /**/
  118.  
  119. -- 
  120. A consultant is a person who takes your money and annoys your employees while
  121. tirelessly searching for the best way to extend the consulting contract.
  122.                 (Scott Adams - The Dilbert principle)
  123.  
  124.  /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
  125. ///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
  126. \\\        download, build and distribute -- http://www.A-A-P.org        ///
  127.  \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///
  128.