• R/O
  • SSH

vim: コミット

Mirror of the Vim source from https://github.com/vim/vim


コミットメタ情報

リビジョン6412b0befebc17db58a1e8acbef86d3a3e4f742c (tree)
日時2008-06-28 22:09:56
作者vimboss
コミッターvimboss

ログメッセージ

updated for version 7.2a-007

変更サマリ

差分

diff -r 0eef0f621811 -r 6412b0befebc src/eval.c
--- a/src/eval.c Sat Jun 28 11:03:50 2008 +0000
+++ b/src/eval.c Sat Jun 28 13:09:56 2008 +0000
@@ -405,8 +405,8 @@
405405 static int eval3 __ARGS((char_u **arg, typval_T *rettv, int evaluate));
406406 static int eval4 __ARGS((char_u **arg, typval_T *rettv, int evaluate));
407407 static int eval5 __ARGS((char_u **arg, typval_T *rettv, int evaluate));
408-static int eval6 __ARGS((char_u **arg, typval_T *rettv, int evaluate));
409-static int eval7 __ARGS((char_u **arg, typval_T *rettv, int evaluate));
408+static int eval6 __ARGS((char_u **arg, typval_T *rettv, int evaluate, int want_string));
409+static int eval7 __ARGS((char_u **arg, typval_T *rettv, int evaluate, int want_string));
410410
411411 static int eval_index __ARGS((char_u **arg, typval_T *rettv, int evaluate, int verbose));
412412 static int get_option_tv __ARGS((char_u **arg, typval_T *rettv, int evaluate));
@@ -4458,7 +4458,7 @@
44584458 /*
44594459 * Get the first variable.
44604460 */
4461- if (eval6(arg, rettv, evaluate) == FAIL)
4461+ if (eval6(arg, rettv, evaluate, FALSE) == FAIL)
44624462 return FAIL;
44634463
44644464 /*
@@ -4494,7 +4494,7 @@
44944494 * Get the second variable.
44954495 */
44964496 *arg = skipwhite(*arg + 1);
4497- if (eval6(arg, &var2, evaluate) == FAIL)
4497+ if (eval6(arg, &var2, evaluate, op == '.') == FAIL)
44984498 {
44994499 clear_tv(rettv);
45004500 return FAIL;
@@ -4624,10 +4624,11 @@
46244624 * Return OK or FAIL.
46254625 */
46264626 static int
4627-eval6(arg, rettv, evaluate)
4627+eval6(arg, rettv, evaluate, want_string)
46284628 char_u **arg;
46294629 typval_T *rettv;
46304630 int evaluate;
4631+ int want_string; /* after "." operator */
46314632 {
46324633 typval_T var2;
46334634 int op;
@@ -4641,7 +4642,7 @@
46414642 /*
46424643 * Get the first variable.
46434644 */
4644- if (eval7(arg, rettv, evaluate) == FAIL)
4645+ if (eval7(arg, rettv, evaluate, want_string) == FAIL)
46454646 return FAIL;
46464647
46474648 /*
@@ -4676,7 +4677,7 @@
46764677 * Get the second variable.
46774678 */
46784679 *arg = skipwhite(*arg + 1);
4679- if (eval7(arg, &var2, evaluate) == FAIL)
4680+ if (eval7(arg, &var2, evaluate, FALSE) == FAIL)
46804681 return FAIL;
46814682
46824683 if (evaluate)
@@ -4790,10 +4791,11 @@
47904791 * Return OK or FAIL.
47914792 */
47924793 static int
4793-eval7(arg, rettv, evaluate)
4794+eval7(arg, rettv, evaluate, want_string)
47944795 char_u **arg;
47954796 typval_T *rettv;
47964797 int evaluate;
4798+ int want_string; /* after "." operator */
47974799 {
47984800 long n;
47994801 int len;
@@ -4838,8 +4840,10 @@
48384840
48394841 /* We accept a float when the format matches
48404842 * "[0-9]\+\.[0-9]\+\([eE][+-]\?[0-9]\+\)\?". This is very
4841- * strict to avoid backwards compatibility problems. */
4842- if (p[0] == '.' && vim_isdigit(p[1]))
4843+ * strict to avoid backwards compatibility problems.
4844+ * Don't look for a float after the "." operator, so that
4845+ * ":let vers = 1.2.3" doesn't fail. */
4846+ if (!want_string && p[0] == '.' && vim_isdigit(p[1]))
48434847 {
48444848 get_float = TRUE;
48454849 p = skipdigits(p + 2);
diff -r 0eef0f621811 -r 6412b0befebc src/version.c
--- a/src/version.c Sat Jun 28 11:03:50 2008 +0000
+++ b/src/version.c Sat Jun 28 13:09:56 2008 +0000
@@ -677,6 +677,8 @@
677677 static int included_patches[] =
678678 { /* Add new patch number below this line */
679679 /**/
680+ 7,
681+/**/
680682 6,
681683 /**/
682684 5,
旧リポジトリブラウザで表示