forked from aniani/vim
updated for version 7.0046
This commit is contained in:
144
src/auto/configure
vendored
144
src/auto/configure
vendored
@@ -9721,30 +9721,24 @@ fi
|
||||
if test -z "$SKIP_ATHENA" -o -z "$SKIP_NEXTAW" -o -z "$SKIP_MOTIF"; then
|
||||
cppflags_save=$CPPFLAGS
|
||||
CPPFLAGS="$CPPFLAGS $X_CFLAGS"
|
||||
|
||||
for ac_header in X11/Xmu/Editres.h
|
||||
do
|
||||
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
|
||||
if eval "test \"\${$as_ac_Header+set}\" = set"; then
|
||||
echo "$as_me:$LINENO: checking for $ac_header" >&5
|
||||
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
|
||||
if eval "test \"\${$as_ac_Header+set}\" = set"; then
|
||||
echo $ECHO_N "(cached) $ECHO_C" >&6
|
||||
fi
|
||||
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
|
||||
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
|
||||
else
|
||||
# Is the header compilable?
|
||||
echo "$as_me:$LINENO: checking $ac_header usability" >&5
|
||||
echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
|
||||
cat >conftest.$ac_ext <<_ACEOF
|
||||
echo "$as_me:$LINENO: checking for X11/Xmu/Editres.h" >&5
|
||||
echo $ECHO_N "checking for X11/Xmu/Editres.h... $ECHO_C" >&6
|
||||
cat >conftest.$ac_ext <<_ACEOF
|
||||
/* confdefs.h. */
|
||||
_ACEOF
|
||||
cat confdefs.h >>conftest.$ac_ext
|
||||
cat >>conftest.$ac_ext <<_ACEOF
|
||||
/* end confdefs.h. */
|
||||
$ac_includes_default
|
||||
#include <$ac_header>
|
||||
|
||||
#include <X11/Intrinsic.h>
|
||||
#include <X11/Xmu/Editres.h>
|
||||
int
|
||||
main ()
|
||||
{
|
||||
int i; i = 0;
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
rm -f conftest.$ac_objext
|
||||
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
|
||||
@@ -9768,109 +9762,20 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
|
||||
ac_status=$?
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); }; }; then
|
||||
ac_header_compiler=yes
|
||||
echo "$as_me:$LINENO: result: yes" >&5
|
||||
echo "${ECHO_T}yes" >&6
|
||||
cat >>confdefs.h <<\_ACEOF
|
||||
#define HAVE_X11_XMU_EDITRES_H 1
|
||||
_ACEOF
|
||||
|
||||
else
|
||||
echo "$as_me: failed program was:" >&5
|
||||
sed 's/^/| /' conftest.$ac_ext >&5
|
||||
|
||||
ac_header_compiler=no
|
||||
echo "$as_me:$LINENO: result: no" >&5
|
||||
echo "${ECHO_T}no" >&6
|
||||
fi
|
||||
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
|
||||
echo "${ECHO_T}$ac_header_compiler" >&6
|
||||
|
||||
# Is the header present?
|
||||
echo "$as_me:$LINENO: checking $ac_header presence" >&5
|
||||
echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
|
||||
cat >conftest.$ac_ext <<_ACEOF
|
||||
/* confdefs.h. */
|
||||
_ACEOF
|
||||
cat confdefs.h >>conftest.$ac_ext
|
||||
cat >>conftest.$ac_ext <<_ACEOF
|
||||
/* end confdefs.h. */
|
||||
#include <$ac_header>
|
||||
_ACEOF
|
||||
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
|
||||
(eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
|
||||
ac_status=$?
|
||||
grep -v '^ *+' conftest.er1 >conftest.err
|
||||
rm -f conftest.er1
|
||||
cat conftest.err >&5
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); } >/dev/null; then
|
||||
if test -s conftest.err; then
|
||||
ac_cpp_err=$ac_c_preproc_warn_flag
|
||||
ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
|
||||
else
|
||||
ac_cpp_err=
|
||||
fi
|
||||
else
|
||||
ac_cpp_err=yes
|
||||
fi
|
||||
if test -z "$ac_cpp_err"; then
|
||||
ac_header_preproc=yes
|
||||
else
|
||||
echo "$as_me: failed program was:" >&5
|
||||
sed 's/^/| /' conftest.$ac_ext >&5
|
||||
|
||||
ac_header_preproc=no
|
||||
fi
|
||||
rm -f conftest.err conftest.$ac_ext
|
||||
echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
|
||||
echo "${ECHO_T}$ac_header_preproc" >&6
|
||||
|
||||
# So? What about this header?
|
||||
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
|
||||
yes:no: )
|
||||
{ echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
|
||||
echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
|
||||
{ echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
|
||||
echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
|
||||
ac_header_preproc=yes
|
||||
;;
|
||||
no:yes:* )
|
||||
{ echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
|
||||
echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
|
||||
{ echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
|
||||
echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
|
||||
{ echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
|
||||
echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
|
||||
{ echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
|
||||
echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
|
||||
{ echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
|
||||
echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
|
||||
{ echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
|
||||
echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
|
||||
(
|
||||
cat <<\_ASBOX
|
||||
## ------------------------------------------ ##
|
||||
## Report this to the AC_PACKAGE_NAME lists. ##
|
||||
## ------------------------------------------ ##
|
||||
_ASBOX
|
||||
) |
|
||||
sed "s/^/$as_me: WARNING: /" >&2
|
||||
;;
|
||||
esac
|
||||
echo "$as_me:$LINENO: checking for $ac_header" >&5
|
||||
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
|
||||
if eval "test \"\${$as_ac_Header+set}\" = set"; then
|
||||
echo $ECHO_N "(cached) $ECHO_C" >&6
|
||||
else
|
||||
eval "$as_ac_Header=\$ac_header_preproc"
|
||||
fi
|
||||
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
|
||||
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
|
||||
|
||||
fi
|
||||
if test `eval echo '${'$as_ac_Header'}'` = yes; then
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
|
||||
_ACEOF
|
||||
|
||||
fi
|
||||
|
||||
done
|
||||
|
||||
CPPFLAGS=$cppflags_save
|
||||
fi
|
||||
|
||||
@@ -9879,7 +9784,12 @@ if test -z "$SKIP_MOTIF"; then
|
||||
CPPFLAGS="$CPPFLAGS $X_CFLAGS"
|
||||
|
||||
|
||||
for ac_header in Xm/Xm.h Xm/XpmP.h
|
||||
|
||||
|
||||
|
||||
|
||||
for ac_header in Xm/Xm.h Xm/XpmP.h Xm/JoinSideT.h Xm/TraitP.h Xm/Manager.h \
|
||||
Xm/UnhighlightT.h
|
||||
do
|
||||
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
|
||||
if eval "test \"\${$as_ac_Header+set}\" = set"; then
|
||||
|
||||
@@ -234,6 +234,10 @@
|
||||
#undef HAVE_X11_SUNKEYSYM_H
|
||||
#undef HAVE_XM_XM_H
|
||||
#undef HAVE_XM_XPMP_H
|
||||
#undef HAVE_XM_TRAITP_H
|
||||
#undef HAVE_XM_MANAGER_H
|
||||
#undef HAVE_XM_UNHIGHLIGHTT_H
|
||||
#undef HAVE_XM_JOINSIDET_H
|
||||
#undef HAVE_X11_XPM_H
|
||||
#undef HAVE_X11_XMU_EDITRES_H
|
||||
#undef HAVE_X11_SM_SMLIB_H
|
||||
|
||||
@@ -2120,7 +2120,15 @@ fi
|
||||
if test -z "$SKIP_ATHENA" -o -z "$SKIP_NEXTAW" -o -z "$SKIP_MOTIF"; then
|
||||
cppflags_save=$CPPFLAGS
|
||||
CPPFLAGS="$CPPFLAGS $X_CFLAGS"
|
||||
AC_CHECK_HEADERS(X11/Xmu/Editres.h)
|
||||
dnl Xmu/Editres.h may exist but can only be used after including Intrinsic.h
|
||||
AC_MSG_CHECKING([for X11/Xmu/Editres.h])
|
||||
AC_TRY_COMPILE([
|
||||
#include <X11/Intrinsic.h>
|
||||
#include <X11/Xmu/Editres.h>],
|
||||
[int i; i = 0;],
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(HAVE_X11_XMU_EDITRES_H),
|
||||
AC_MSG_RESULT(no))
|
||||
CPPFLAGS=$cppflags_save
|
||||
fi
|
||||
|
||||
@@ -2128,7 +2136,8 @@ dnl Only use the Xm directory when compiling Motif, don't use it for Athena
|
||||
if test -z "$SKIP_MOTIF"; then
|
||||
cppflags_save=$CPPFLAGS
|
||||
CPPFLAGS="$CPPFLAGS $X_CFLAGS"
|
||||
AC_CHECK_HEADERS(Xm/Xm.h Xm/XpmP.h)
|
||||
AC_CHECK_HEADERS(Xm/Xm.h Xm/XpmP.h Xm/JoinSideT.h Xm/TraitP.h Xm/Manager.h \
|
||||
Xm/UnhighlightT.h)
|
||||
CPPFLAGS=$cppflags_save
|
||||
fi
|
||||
|
||||
|
||||
@@ -1828,8 +1828,8 @@ ex_compiler(eap)
|
||||
do_cmdline_cmd((char_u *)
|
||||
"command -nargs=* CompilerSet setlocal <args>");
|
||||
}
|
||||
do_unlet((char_u *)"current_compiler");
|
||||
do_unlet((char_u *)"b:current_compiler");
|
||||
do_unlet((char_u *)"current_compiler", TRUE);
|
||||
do_unlet((char_u *)"b:current_compiler", TRUE);
|
||||
|
||||
sprintf((char *)buf, "compiler/%s.vim", eap->arg);
|
||||
if (cmd_runtime(buf, TRUE) == FAIL)
|
||||
@@ -1853,7 +1853,7 @@ ex_compiler(eap)
|
||||
vim_free(old_cur_comp);
|
||||
}
|
||||
else
|
||||
do_unlet((char_u *)"current_compiler");
|
||||
do_unlet((char_u *)"current_compiler", TRUE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3831,7 +3831,7 @@ gui_mch_destroy_sign(sign)
|
||||
#if defined(FEAT_BEVAL) || defined(PROTO)
|
||||
|
||||
/* BALLOON-EVAL IMPLEMENTATION FOR WINDOWS.
|
||||
* Added by Sergey Khorev
|
||||
* Added by Sergey Khorev <sergey.khorev@gmail.com>
|
||||
*
|
||||
* The only reused thing is gui_beval.h and gui_mch_get_beval_info()
|
||||
* from gui_beval.c (note it uses x and y of the BalloonEval struct
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/* vi:set ts=8 sts=4 sw=4:
|
||||
*
|
||||
* CSCOPE support for Vim added by Andy Kahn <kahn@zk3.dec.com>
|
||||
* Ported to Win32 by Sergey Khorev <khorev@softlab.ru>
|
||||
* Ported to Win32 by Sergey Khorev <sergey.khorev@gmail.com>
|
||||
*
|
||||
* The basic idea/structure of cscope for Vim was borrowed from Nvi. There
|
||||
* might be a few lines of code that look similar to what Nvi has.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/* vi:set ts=8 sts=4 sw=4:
|
||||
*
|
||||
* CSCOPE support for Vim added by Andy Kahn <kahn@zk3.dec.com>
|
||||
* Ported to Win32 by Sergey Khorev <khorev@softlab.ru>
|
||||
* Ported to Win32 by Sergey Khorev <sergey.khorev@gmail.com>
|
||||
*
|
||||
* The basic idea/structure of cscope for Vim was borrowed from Nvi.
|
||||
* There might be a few lines of code that look similar to what Nvi
|
||||
|
||||
@@ -35,7 +35,6 @@
|
||||
#define NBDLEVEL(flags) (nb_debug != NULL && (nb_dlevel & (flags)))
|
||||
|
||||
#define NBDEBUG_TRACE 1
|
||||
//#define NBDEBUG_SENSE 2
|
||||
|
||||
typedef enum {
|
||||
WT_ENV = 1, /* look for env var if set */
|
||||
|
||||
@@ -4908,7 +4908,7 @@ did_set_string_option(opt_idx, varp, new_value_alloced, oldval, errbuf,
|
||||
/* The color scheme must have set 'background' back to another
|
||||
* value, that's not what we want here. Disable the color
|
||||
* scheme and set the colors again. */
|
||||
do_unlet((char_u *)"g:colors_name");
|
||||
do_unlet((char_u *)"g:colors_name", TRUE);
|
||||
free_string_option(p_bg);
|
||||
p_bg = vim_strsave((char_u *)(dark ? "dark" : "light"));
|
||||
check_string_option(&p_bg);
|
||||
|
||||
@@ -27,7 +27,8 @@ void free_for_info __ARGS((void *fi_void));
|
||||
void set_context_for_expression __ARGS((expand_T *xp, char_u *arg, cmdidx_T cmdidx));
|
||||
void ex_call __ARGS((exarg_T *eap));
|
||||
void ex_unlet __ARGS((exarg_T *eap));
|
||||
int do_unlet __ARGS((char_u *name));
|
||||
void ex_lockvar __ARGS((exarg_T *eap));
|
||||
int do_unlet __ARGS((char_u *name, int forceit));
|
||||
void del_menutrans_vars __ARGS((void));
|
||||
char_u *get_user_var_name __ARGS((expand_T *xp, int idx));
|
||||
char_u *get_function_name __ARGS((expand_T *xp, int idx));
|
||||
@@ -42,7 +43,6 @@ char_u *v_throwpoint __ARGS((char_u *oldval));
|
||||
char_u *set_cmdarg __ARGS((exarg_T *eap, char_u *oldarg));
|
||||
char_u *get_var_value __ARGS((char_u *name));
|
||||
void new_script_vars __ARGS((scid_T id));
|
||||
void vars_init __ARGS((hashtab_T *ht));
|
||||
void init_var_dict __ARGS((dict_T *dict, dictitem_T *dict_var));
|
||||
void vars_clear __ARGS((hashtab_T *ht));
|
||||
void ex_echo __ARGS((exarg_T *eap));
|
||||
|
||||
@@ -4165,8 +4165,8 @@ win_line(wp, lnum, startrow, endrow)
|
||||
#ifdef FEAT_MBYTE
|
||||
/* When there is a multi-byte character, just output a
|
||||
* space to keep it simple. */
|
||||
if (has_mbyte && mb_off2cells(LineOffset[screen_row - 1]
|
||||
+ (unsigned)Columns - 1) != 1)
|
||||
if (has_mbyte && MB_BYTE2LEN(ScreenLines[LineOffset[
|
||||
screen_row - 1] + (Columns - 1)]) > 1)
|
||||
out_char(' ');
|
||||
else
|
||||
#endif
|
||||
|
||||
@@ -963,7 +963,8 @@ typedef struct dictvar_S dict_T;
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
char v_type; /* see below: VAR_NUMBER, VAR_STRING, etc. */
|
||||
char v_type; /* see below: VAR_NUMBER, VAR_STRING, etc. */
|
||||
char v_lock; /* see below: VAR_LOCKED, VAR_FIXED */
|
||||
union
|
||||
{
|
||||
varnumber_T v_number; /* number value */
|
||||
@@ -981,6 +982,10 @@ typedef struct
|
||||
#define VAR_LIST 4 /* "v_list" is used */
|
||||
#define VAR_DICT 5 /* "v_dict" is used */
|
||||
|
||||
/* Values for "v_lock". */
|
||||
#define VAR_LOCKED 1 /* locked with lock(), can use unlock() */
|
||||
#define VAR_FIXED 2 /* locked forever */
|
||||
|
||||
/*
|
||||
* Structure to hold an item of a list: an internal variable without a name.
|
||||
*/
|
||||
@@ -1013,6 +1018,7 @@ struct listvar_S
|
||||
listitem_T *lv_first; /* first item, NULL if none */
|
||||
listitem_T *lv_last; /* last item, NULL if none */
|
||||
listwatch_T *lv_watch; /* first watcher, NULL if none */
|
||||
char lv_lock; /* zero, VAR_LOCKED, VAR_FIXED */
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -1032,6 +1038,7 @@ typedef struct dictitem_S dictitem_T;
|
||||
#define DI_FLAGS_RO 1 /* "di_flags" value: read-only variable */
|
||||
#define DI_FLAGS_RO_SBX 2 /* "di_flags" value: read-only in the sandbox */
|
||||
#define DI_FLAGS_FIX 4 /* "di_flags" value: fixed variable, not allocated */
|
||||
#define DI_FLAGS_LOCK 8 /* "di_flags" value: locked variable */
|
||||
|
||||
/*
|
||||
* Structure to hold info about a Dictionary.
|
||||
@@ -1040,6 +1047,7 @@ struct dictvar_S
|
||||
{
|
||||
int dv_refcount; /* reference count */
|
||||
hashtab_T dv_hashtab; /* hashtab that refers to the items */
|
||||
char dv_lock; /* zero, VAR_LOCKED, VAR_FIXED */
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -3212,7 +3212,7 @@ syn_cmd_clear(eap, syncing)
|
||||
else
|
||||
{
|
||||
syntax_clear(curbuf);
|
||||
do_unlet((char_u *)"b:current_syntax");
|
||||
do_unlet((char_u *)"b:current_syntax", TRUE);
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -3313,7 +3313,7 @@ syn_cmd_enable(eap, syncing)
|
||||
{
|
||||
set_internal_string_var((char_u *)"syntax_cmd", (char_u *)"enable");
|
||||
syn_cmd_onoff(eap, "syntax");
|
||||
do_unlet((char_u *)"g:syntax_cmd");
|
||||
do_unlet((char_u *)"g:syntax_cmd", TRUE);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -3330,7 +3330,7 @@ syn_cmd_reset(eap, syncing)
|
||||
{
|
||||
set_internal_string_var((char_u *)"syntax_cmd", (char_u *)"reset");
|
||||
do_cmdline_cmd((char_u *)"runtime! syntax/syncolor.vim");
|
||||
do_unlet((char_u *)"g:syntax_cmd");
|
||||
do_unlet((char_u *)"g:syntax_cmd", TRUE);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6271,7 +6271,7 @@ do_highlight(line, forceit, init)
|
||||
*/
|
||||
#endif
|
||||
#ifdef FEAT_EVAL
|
||||
do_unlet((char_u *)"colors_name");
|
||||
do_unlet((char_u *)"colors_name", TRUE);
|
||||
#endif
|
||||
restore_cterm_colors();
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ Tests for List and Dictionary types. vim: set ft=vim :
|
||||
|
||||
STARTTEST
|
||||
:so small.vim
|
||||
:fun Test()
|
||||
:fun Test(...)
|
||||
:" Creating List directly with different types
|
||||
:let l = [1, 'as''d', [1, 2, function("strlen")], {'a': 1},]
|
||||
:$put =string(l)
|
||||
@@ -27,12 +27,12 @@ STARTTEST
|
||||
:let d = {001: 'asd', 'b': [1, 2, function('strlen')], -1: {'a': 1},}
|
||||
:$put =string(d) . d.1
|
||||
:$put =string(sort(keys(d)))
|
||||
:$put =string(values(d))
|
||||
:$put =string (values(d))
|
||||
:for [key, val] in items(d)
|
||||
: $put =key . ':' . string(val)
|
||||
: unlet key val
|
||||
:endfor
|
||||
:call extend(d, {3:33, 1:99})
|
||||
:call extend (d, {3:33, 1:99})
|
||||
:call extend(d, {'b':'bbb', 'c':'ccc'}, "keep")
|
||||
:try
|
||||
: call extend(d, {3:333,4:444}, "error")
|
||||
@@ -68,8 +68,12 @@ STARTTEST
|
||||
:unlet l[2]
|
||||
:$put =string(l)
|
||||
:let l = range(8)
|
||||
:try
|
||||
:unlet l[:3]
|
||||
:unlet l[1:]
|
||||
:catch
|
||||
:$put =v:exception
|
||||
:endtry
|
||||
:$put =string(l)
|
||||
:"
|
||||
:unlet d.c
|
||||
@@ -143,7 +147,7 @@ STARTTEST
|
||||
:func d.func(a)
|
||||
: return "a:". a:a
|
||||
:endfunc
|
||||
:$put = d.func(string(remove(d, 'func')))
|
||||
:$put =d.func(string(remove(d, 'func')))
|
||||
:"
|
||||
:" Nasty: deepcopy() dict that refers to itself (fails)
|
||||
:let d = {1:1, 2:2}
|
||||
@@ -155,8 +159,102 @@ STARTTEST
|
||||
: $put =v:exception[:14]
|
||||
:endtry
|
||||
:"
|
||||
:" Locked variables
|
||||
:for depth in range(5)
|
||||
: $put ='depth is ' . depth
|
||||
: for u in range(3)
|
||||
: unlet l
|
||||
: let l = [0, [1, [2, 3]], {4: 5, 6: {7: 8}}]
|
||||
: exe "lockvar " . depth . " l"
|
||||
: if u == 1
|
||||
: exe "unlockvar l"
|
||||
: elseif u == 2
|
||||
: exe "unlockvar " . depth . " l"
|
||||
: endif
|
||||
: let ps = islocked("l").islocked("l[1]").islocked("l[1][1]").islocked("l[1][1][0]").'-'.islocked("l[2]").islocked("l[2]['6']").islocked("l[2]['6'][7]")
|
||||
: $put =ps
|
||||
: let ps = ''
|
||||
: try
|
||||
: let l[1][1][0] = 99
|
||||
: let ps .= 'p'
|
||||
: catch
|
||||
: let ps .= 'F'
|
||||
: endtry
|
||||
: try
|
||||
: let l[1][1] = [99]
|
||||
: let ps .= 'p'
|
||||
: catch
|
||||
: let ps .= 'F'
|
||||
: endtry
|
||||
: try
|
||||
: let l[1] = [99]
|
||||
: let ps .= 'p'
|
||||
: catch
|
||||
: let ps .= 'F'
|
||||
: endtry
|
||||
: try
|
||||
: let l[2]['6'][7] = 99
|
||||
: let ps .= 'p'
|
||||
: catch
|
||||
: let ps .= 'F'
|
||||
: endtry
|
||||
: try
|
||||
: let l[2][6] = {99: 99}
|
||||
: let ps .= 'p'
|
||||
: catch
|
||||
: let ps .= 'F'
|
||||
: endtry
|
||||
: try
|
||||
: let l[2] = {99: 99}
|
||||
: let ps .= 'p'
|
||||
: catch
|
||||
: let ps .= 'F'
|
||||
: endtry
|
||||
: try
|
||||
: let l = [99]
|
||||
: let ps .= 'p'
|
||||
: catch
|
||||
: let ps .= 'F'
|
||||
: endtry
|
||||
: $put =ps
|
||||
: endfor
|
||||
:endfor
|
||||
:"
|
||||
:" a:000 function argument
|
||||
:" first the tests that should fail
|
||||
:try
|
||||
: let a:000 = [1, 2]
|
||||
:catch
|
||||
: $put ='caught a:000'
|
||||
:endtry
|
||||
:try
|
||||
: let a:000[0] = 9
|
||||
:catch
|
||||
: $put ='caught a:000[0]'
|
||||
:endtry
|
||||
:try
|
||||
: let a:000[2] = [9, 10]
|
||||
:catch
|
||||
: $put ='caught a:000[2]'
|
||||
:endtry
|
||||
:try
|
||||
: let a:000[3] = {9: 10}
|
||||
:catch
|
||||
: $put ='caught a:000[3]'
|
||||
:endtry
|
||||
:" now the tests that should pass
|
||||
:try
|
||||
: let a:000[2][1] = 9
|
||||
: call extend(a:000[2], [5, 6])
|
||||
: let a:000[3][5] = 8
|
||||
: let a:000[3]['a'] = 12
|
||||
: $put =string(a:000)
|
||||
:catch
|
||||
: $put ='caught ' . v:exception
|
||||
:endtry
|
||||
:"
|
||||
:endfun
|
||||
:call Test() " This may take a while
|
||||
:call Test(1, 2, [3, 4], {5: 6}) " This may take a while
|
||||
:"
|
||||
:/^start:/,$wq! test.out
|
||||
ENDTEST
|
||||
|
||||
@@ -30,3 +30,43 @@ Vim(call):E725:
|
||||
g:dict.func-4
|
||||
a:function('3')
|
||||
Vim(let):E698:
|
||||
depth is 0
|
||||
0000-000
|
||||
ppppppp
|
||||
0000-000
|
||||
ppppppp
|
||||
0000-000
|
||||
ppppppp
|
||||
depth is 1
|
||||
1000-000
|
||||
ppppppF
|
||||
0000-000
|
||||
ppppppp
|
||||
0000-000
|
||||
ppppppp
|
||||
depth is 2
|
||||
1100-100
|
||||
ppFppFF
|
||||
0000-000
|
||||
ppppppp
|
||||
0000-000
|
||||
ppppppp
|
||||
depth is 3
|
||||
1110-110
|
||||
pFFpFFF
|
||||
0010-010
|
||||
pFppFpp
|
||||
0000-000
|
||||
ppppppp
|
||||
depth is 4
|
||||
1111-111
|
||||
FFFFFFF
|
||||
0011-011
|
||||
FFpFFpp
|
||||
0000-000
|
||||
ppppppp
|
||||
caught a:000
|
||||
caught a:000[0]
|
||||
caught a:000[2]
|
||||
caught a:000[3]
|
||||
[1, 2, [3, 9, 5, 6], {'a': 12, '5': 8}]
|
||||
|
||||
@@ -36,5 +36,5 @@
|
||||
#define VIM_VERSION_NODOT "vim70aa"
|
||||
#define VIM_VERSION_SHORT "7.0aa"
|
||||
#define VIM_VERSION_MEDIUM "7.0aa ALPHA"
|
||||
#define VIM_VERSION_LONG "VIM - Vi IMproved 7.0aa ALPHA (2005 Jan 27)"
|
||||
#define VIM_VERSION_LONG_DATE "VIM - Vi IMproved 7.0aa ALPHA (2005 Jan 27, compiled "
|
||||
#define VIM_VERSION_LONG "VIM - Vi IMproved 7.0aa ALPHA (2005 Jan 31)"
|
||||
#define VIM_VERSION_LONG_DATE "VIM - Vi IMproved 7.0aa ALPHA (2005 Jan 31, compiled "
|
||||
|
||||
Reference in New Issue
Block a user