|
Karsten Hopp |
a9a4a4 |
To: vim_dev@googlegroups.com
|
|
Karsten Hopp |
a9a4a4 |
Subject: Patch 7.3.1181
|
|
Karsten Hopp |
a9a4a4 |
Fcc: outbox
|
|
Karsten Hopp |
a9a4a4 |
From: Bram Moolenaar <Bram@moolenaar.net>
|
|
Karsten Hopp |
a9a4a4 |
Mime-Version: 1.0
|
|
Karsten Hopp |
a9a4a4 |
Content-Type: text/plain; charset=UTF-8
|
|
Karsten Hopp |
a9a4a4 |
Content-Transfer-Encoding: 8bit
|
|
Karsten Hopp |
a9a4a4 |
------------
|
|
Karsten Hopp |
a9a4a4 |
|
|
Karsten Hopp |
a9a4a4 |
Patch 7.3.1181
|
|
Karsten Hopp |
a9a4a4 |
Problem: Wrong error message for 1.0[0].
|
|
Karsten Hopp |
a9a4a4 |
Solution: Check for funcref and float separately. (Yasuhiro Matsumoto)
|
|
Karsten Hopp |
a9a4a4 |
Files: src/eval.c
|
|
Karsten Hopp |
a9a4a4 |
|
|
Karsten Hopp |
a9a4a4 |
|
|
Karsten Hopp |
a9a4a4 |
*** ../vim-7.3.1180/src/eval.c 2013-06-12 18:13:31.000000000 +0200
|
|
Karsten Hopp |
a9a4a4 |
--- src/eval.c 2013-06-12 22:06:30.000000000 +0200
|
|
Karsten Hopp |
a9a4a4 |
***************
|
|
Karsten Hopp |
a9a4a4 |
*** 112,117 ****
|
|
Karsten Hopp |
a9a4a4 |
--- 112,118 ----
|
|
Karsten Hopp |
a9a4a4 |
static char *e_letwrong = N_("E734: Wrong variable type for %s=");
|
|
Karsten Hopp |
a9a4a4 |
static char *e_nofunc = N_("E130: Unknown function: %s");
|
|
Karsten Hopp |
a9a4a4 |
static char *e_illvar = N_("E461: Illegal variable name: %s");
|
|
Karsten Hopp |
a9a4a4 |
+ static char *e_float_as_string = N_("E806: using Float as a String");
|
|
Karsten Hopp |
a9a4a4 |
|
|
Karsten Hopp |
a9a4a4 |
static dictitem_T globvars_var; /* variable used for g: */
|
|
Karsten Hopp |
a9a4a4 |
#define globvarht globvardict.dv_hashtab
|
|
Karsten Hopp |
a9a4a4 |
***************
|
|
Karsten Hopp |
a9a4a4 |
*** 5268,5283 ****
|
|
Karsten Hopp |
a9a4a4 |
char_u *s;
|
|
Karsten Hopp |
a9a4a4 |
char_u *key = NULL;
|
|
Karsten Hopp |
a9a4a4 |
|
|
Karsten Hopp |
a9a4a4 |
! if (rettv->v_type == VAR_FUNC
|
|
Karsten Hopp |
a9a4a4 |
! #ifdef FEAT_FLOAT
|
|
Karsten Hopp |
a9a4a4 |
! || rettv->v_type == VAR_FLOAT
|
|
Karsten Hopp |
a9a4a4 |
! #endif
|
|
Karsten Hopp |
a9a4a4 |
! )
|
|
Karsten Hopp |
a9a4a4 |
{
|
|
Karsten Hopp |
a9a4a4 |
if (verbose)
|
|
Karsten Hopp |
a9a4a4 |
EMSG(_("E695: Cannot index a Funcref"));
|
|
Karsten Hopp |
a9a4a4 |
return FAIL;
|
|
Karsten Hopp |
a9a4a4 |
}
|
|
Karsten Hopp |
a9a4a4 |
|
|
Karsten Hopp |
a9a4a4 |
if (**arg == '.')
|
|
Karsten Hopp |
a9a4a4 |
{
|
|
Karsten Hopp |
a9a4a4 |
--- 5269,5288 ----
|
|
Karsten Hopp |
a9a4a4 |
char_u *s;
|
|
Karsten Hopp |
a9a4a4 |
char_u *key = NULL;
|
|
Karsten Hopp |
a9a4a4 |
|
|
Karsten Hopp |
a9a4a4 |
! if (rettv->v_type == VAR_FUNC)
|
|
Karsten Hopp |
a9a4a4 |
{
|
|
Karsten Hopp |
a9a4a4 |
if (verbose)
|
|
Karsten Hopp |
a9a4a4 |
EMSG(_("E695: Cannot index a Funcref"));
|
|
Karsten Hopp |
a9a4a4 |
return FAIL;
|
|
Karsten Hopp |
a9a4a4 |
}
|
|
Karsten Hopp |
a9a4a4 |
+ #ifdef FEAT_FLOAT
|
|
Karsten Hopp |
a9a4a4 |
+ else if (rettv->v_type == VAR_FLOAT)
|
|
Karsten Hopp |
a9a4a4 |
+ {
|
|
Karsten Hopp |
a9a4a4 |
+ if (verbose)
|
|
Karsten Hopp |
a9a4a4 |
+ EMSG(_(e_float_as_string));
|
|
Karsten Hopp |
a9a4a4 |
+ return FAIL;
|
|
Karsten Hopp |
a9a4a4 |
+ }
|
|
Karsten Hopp |
a9a4a4 |
+ #endif
|
|
Karsten Hopp |
a9a4a4 |
|
|
Karsten Hopp |
a9a4a4 |
if (**arg == '.')
|
|
Karsten Hopp |
a9a4a4 |
{
|
|
Karsten Hopp |
a9a4a4 |
***************
|
|
Karsten Hopp |
a9a4a4 |
*** 20085,20091 ****
|
|
Karsten Hopp |
a9a4a4 |
break;
|
|
Karsten Hopp |
a9a4a4 |
#ifdef FEAT_FLOAT
|
|
Karsten Hopp |
a9a4a4 |
case VAR_FLOAT:
|
|
Karsten Hopp |
a9a4a4 |
! EMSG(_("E806: using Float as a String"));
|
|
Karsten Hopp |
a9a4a4 |
break;
|
|
Karsten Hopp |
a9a4a4 |
#endif
|
|
Karsten Hopp |
a9a4a4 |
case VAR_STRING:
|
|
Karsten Hopp |
a9a4a4 |
--- 20090,20096 ----
|
|
Karsten Hopp |
a9a4a4 |
break;
|
|
Karsten Hopp |
a9a4a4 |
#ifdef FEAT_FLOAT
|
|
Karsten Hopp |
a9a4a4 |
case VAR_FLOAT:
|
|
Karsten Hopp |
a9a4a4 |
! EMSG(_(e_float_as_string));
|
|
Karsten Hopp |
a9a4a4 |
break;
|
|
Karsten Hopp |
a9a4a4 |
#endif
|
|
Karsten Hopp |
a9a4a4 |
case VAR_STRING:
|
|
Karsten Hopp |
a9a4a4 |
*** ../vim-7.3.1180/src/version.c 2013-06-12 21:25:04.000000000 +0200
|
|
Karsten Hopp |
a9a4a4 |
--- src/version.c 2013-06-12 22:08:02.000000000 +0200
|
|
Karsten Hopp |
a9a4a4 |
***************
|
|
Karsten Hopp |
a9a4a4 |
*** 730,731 ****
|
|
Karsten Hopp |
a9a4a4 |
--- 730,733 ----
|
|
Karsten Hopp |
a9a4a4 |
{ /* Add new patch number below this line */
|
|
Karsten Hopp |
a9a4a4 |
+ /**/
|
|
Karsten Hopp |
a9a4a4 |
+ 1181,
|
|
Karsten Hopp |
a9a4a4 |
/**/
|
|
Karsten Hopp |
a9a4a4 |
|
|
Karsten Hopp |
a9a4a4 |
--
|
|
Karsten Hopp |
a9a4a4 |
The CIA drives around in cars with the "Intel inside" logo.
|
|
Karsten Hopp |
a9a4a4 |
|
|
Karsten Hopp |
a9a4a4 |
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
|
|
Karsten Hopp |
a9a4a4 |
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
|
|
Karsten Hopp |
a9a4a4 |
\\\ an exciting new programming language -- http://www.Zimbu.org ///
|
|
Karsten Hopp |
a9a4a4 |
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
|