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