diff options
Diffstat (limited to 'src')
69 files changed, 10045 insertions, 1874 deletions
diff --git a/src/Make_bc5.mak b/src/Make_bc5.mak index b063ce0e0e..e50a435991 100644 --- a/src/Make_bc5.mak +++ b/src/Make_bc5.mak @@ -51,6 +51,7 @@ # NOTE: compilation on WinNT/2K/XP requires # at least version 1.6.5 of Ruby. Earlier versions # of Ruby will cause a compile error on these systems. +# RUBY_VER_LONG same, but in format with dot. (1.6) # DYNAMIC_RUBY no or yes: use yes to load the Ruby DLL dynamically (no) # MBYTE no or yes: set to yes for multi-byte support (yes) # NOTE: multi-byte support is broken in the Borland libraries, diff --git a/src/Make_vms.mms b/src/Make_vms.mms index 89b56afe42..557cb6da46 100644 --- a/src/Make_vms.mms +++ b/src/Make_vms.mms @@ -2,7 +2,7 @@ # Makefile for Vim on OpenVMS # # Maintainer: Zoltan Arpadffy <arpadffy@polarhome.com> -# Last change: 2006 Mar 24 +# Last change: 2006 Mar 31 # # This has script been tested on VMS 6.2 to 8.2 on DEC Alpha, VAX and IA64 # with MMS and MMK @@ -98,7 +98,8 @@ CCVER = YES .IFDEF VAX .IFDEF DECC # VAX with DECC -CC_DEF = cc/decc +CC_DEF = cc # /decc # some system requires this switch + # but when it is not required /ver might fail PREFIX = /prefix=all .ELSE # VAX with VAXC CC_DEF = cc @@ -148,10 +149,11 @@ GUI = YES # X/Motif/GTK executable (also works in terminal mode ) .IFDEF GTK -# define GTK root directory +# NOTE: you need to set up your GTK_DIR (GTK root directory), because it is +# unique on every system - logicals are not accepted # please note: directory should end with . in order to /trans=conc work -# example: GTK_DIR = $1$DGA104:[USERS.ZAY.WORK.GTK1210.] -GTK_DIR = ALPHA$DKA0:[GTK128.] +# Example: GTK_DIR = $1$DGA104:[USERS.ZAY.WORK.GTK1210.] +GTK_DIR = DKA0:[GTK1210.] DEFS = "HAVE_CONFIG_H","FEAT_GUI_GTK" LIBS = ,OS_VMS_GTK.OPT/OPT GUI_FLAG = /name=(as_is,short)/float=ieee/ieee=denorm diff --git a/src/Makefile b/src/Makefile index ea1462a291..c79f96d24b 100644 --- a/src/Makefile +++ b/src/Makefile @@ -1322,7 +1322,8 @@ DEST_MAN_FR_U = $(DEST_MAN_TOP)/fr.UTF-8$(MAN1DIR) DEST_MAN_IT = $(DEST_MAN_TOP)/it$(MAN1DIR) DEST_MAN_IT_I = $(DEST_MAN_TOP)/it.ISO8859-1$(MAN1DIR) DEST_MAN_IT_U = $(DEST_MAN_TOP)/it.UTF-8$(MAN1DIR) -DEST_MAN_PL = $(DEST_MAN_TOP)/pl.ISO8859-2$(MAN1DIR) +DEST_MAN_PL = $(DEST_MAN_TOP)/pl$(MAN1DIR) +DEST_MAN_PL_I = $(DEST_MAN_TOP)/pl.ISO8859-2$(MAN1DIR) DEST_MAN_PL_U = $(DEST_MAN_TOP)/pl.UTF-8$(MAN1DIR) DEST_MAN_RU = $(DEST_MAN_TOP)/ru.KOI8-R$(MAN1DIR) DEST_MAN_RU_U = $(DEST_MAN_TOP)/ru.UTF-8$(MAN1DIR) @@ -1523,8 +1524,8 @@ PRO_AUTO = \ $(ALL_GUI_PRO) \ $(TCL_PRO) -ICON_APP = gui_mac.icns -ICON_DOCTXT = doc-txt.icns +# Resources used for the Mac are in one directory. +RSRC_DIR = os_mac_rsrc PRO_MANUAL = os_amiga.pro os_msdos.pro os_win16.pro os_win32.pro \ os_mswin.pro os_beos.pro os_vms.pro os_riscos.pro $(PERL_PRO) @@ -1905,6 +1906,7 @@ install-tool-languages: -$(SHELL) ./installman.sh xxd $(DEST_MAN_IT_I) "-it" $(INSTALLMANARGS) -$(SHELL) ./installman.sh xxd $(DEST_MAN_IT_U) "-it.UTF-8" $(INSTALLMANARGS) -$(SHELL) ./installman.sh xxd $(DEST_MAN_PL) "-pl" $(INSTALLMANARGS) + -$(SHELL) ./installman.sh xxd $(DEST_MAN_PL_I) "-pl" $(INSTALLMANARGS) -$(SHELL) ./installman.sh xxd $(DEST_MAN_PL_U) "-pl.UTF-8" $(INSTALLMANARGS) -$(SHELL) ./installman.sh xxd $(DEST_MAN_RU) "-ru" $(INSTALLMANARGS) -$(SHELL) ./installman.sh xxd $(DEST_MAN_RU_U) "-ru.UTF-8" $(INSTALLMANARGS) @@ -1918,6 +1920,7 @@ install-languages: languages $(DEST_LANG) $(DEST_KMAP) -$(SHELL) ./installman.sh install $(DEST_MAN_IT_I) "-it" $(INSTALLMANARGS) -$(SHELL) ./installman.sh install $(DEST_MAN_IT_U) "-it.UTF-8" $(INSTALLMANARGS) -$(SHELL) ./installman.sh install $(DEST_MAN_PL) "-pl" $(INSTALLMANARGS) + -$(SHELL) ./installman.sh install $(DEST_MAN_PL_I) "-pl" $(INSTALLMANARGS) -$(SHELL) ./installman.sh install $(DEST_MAN_PL_U) "-pl.UTF-8" $(INSTALLMANARGS) -$(SHELL) ./installman.sh install $(DEST_MAN_RU) "-ru" $(INSTALLMANARGS) -$(SHELL) ./installman.sh install $(DEST_MAN_RU_U) "-ru.UTF-8" $(INSTALLMANARGS) @@ -1936,6 +1939,8 @@ install-languages: languages $(DEST_LANG) $(DEST_KMAP) -$(SHELL) ./installml.sh install "$(GUI_MAN_TARGETS)" \ $(DEST_MAN_PL) $(INSTALLMLARGS) -$(SHELL) ./installml.sh install "$(GUI_MAN_TARGETS)" \ + $(DEST_MAN_PL_I) $(INSTALLMLARGS) + -$(SHELL) ./installml.sh install "$(GUI_MAN_TARGETS)" \ $(DEST_MAN_PL_U) $(INSTALLMLARGS) -$(SHELL) ./installml.sh install "$(GUI_MAN_TARGETS)" \ $(DEST_MAN_RU) $(INSTALLMLARGS) @@ -2077,6 +2082,7 @@ uninstall_runtime: -$(SHELL) ./installman.sh uninstall $(DEST_MAN_IT_I) "" $(INSTALLMANARGS) -$(SHELL) ./installman.sh uninstall $(DEST_MAN_IT_U) "" $(INSTALLMANARGS) -$(SHELL) ./installman.sh uninstall $(DEST_MAN_PL) "" $(INSTALLMANARGS) + -$(SHELL) ./installman.sh uninstall $(DEST_MAN_PL_I) "" $(INSTALLMANARGS) -$(SHELL) ./installman.sh uninstall $(DEST_MAN_PL_U) "" $(INSTALLMANARGS) -$(SHELL) ./installman.sh uninstall $(DEST_MAN_RU) "" $(INSTALLMANARGS) -$(SHELL) ./installman.sh uninstall $(DEST_MAN_RU_U) "" $(INSTALLMANARGS) @@ -2097,6 +2103,8 @@ uninstall_runtime: -$(SHELL) ./installml.sh uninstall "$(GUI_MAN_TARGETS)" \ $(DEST_MAN_PL) $(INSTALLMLARGS) -$(SHELL) ./installml.sh uninstall "$(GUI_MAN_TARGETS)" \ + $(DEST_MAN_PL_I) $(INSTALLMLARGS) + -$(SHELL) ./installml.sh uninstall "$(GUI_MAN_TARGETS)" \ $(DEST_MAN_PL_U) $(INSTALLMLARGS) -$(SHELL) ./installml.sh uninstall "$(GUI_MAN_TARGETS)" \ $(DEST_MAN_RU) $(INSTALLMLARGS) @@ -2105,7 +2113,7 @@ uninstall_runtime: -rm -f $(DEST_MAN)/xxd.1 -rm -f $(DEST_MAN_FR)/xxd.1 $(DEST_MAN_FR_I)/xxd.1 $(DEST_MAN_FR_U)/xxd.1 -rm -f $(DEST_MAN_IT)/xxd.1 $(DEST_MAN_IT_I)/xxd.1 $(DEST_MAN_IT_U)/xxd.1 - -rm -f $(DEST_MAN_PL)/xxd.1 $(DEST_MAN_PL_U)/xxd.1 + -rm -f $(DEST_MAN_PL)/xxd.1 $(DEST_MAN_PL_I)/xxd.1 $(DEST_MAN_PL_U)/xxd.1 -rm -f $(DEST_MAN_RU)/xxd.1 $(DEST_MAN_RU_U)/xxd.1 -rm -f $(DEST_HELP)/*.txt $(DEST_HELP)/tags $(DEST_HELP)/*.pl -rm -f $(DEST_HELP)/*.??x $(DEST_HELP)/tags-?? @@ -2162,9 +2170,9 @@ shadow: runtime pixmaps cp config.mk.dist $(SHADOWDIR) mkdir $(SHADOWDIR)/xxd cd $(SHADOWDIR)/xxd; ln -s ../../xxd/*.[ch] ../../xxd/Make* . - if test -f $(ICON_APP); then \ + if test -d $(RSRC_DIR); then \ cd $(SHADOWDIR); \ - ln -s ../$(ICON_APP) ../$(ICON_DOCTXT) ../os_mac.rsr.hqx ../dehqx.py .; \ + ln -s ../$(RSRC_DIR) ../os_mac.rsr.hqx ../dehqx.py .; \ fi mkdir $(SHADOWDIR)/testdir cd $(SHADOWDIR)/testdir; ln -s ../../testdir/Makefile \ @@ -2526,17 +2534,7 @@ VERSION = $(VIMMAJOR).$(VIMMINOR) ### Common flags M4FLAGSX = $(M4FLAGS) -DAPP_EXE=$(VIMNAME) -DAPP_NAME=$(VIMNAME) \ - -DAPP_VER=$(VERSION) -DICON_APP=$(ICON_APP) - -### Icons -ICONS = $(RESDIR)/$(ICON_APP) $(RESDIR)/$(ICON_DOCTXT) - -# If you uncomment the following lines the *.icns in the src directory will be -# detected by this Makefile automatically, and used for Vim. -#ICON_APP = $(shell if [ -e app.icns ] ; then echo app.icns ; else echo gui_mac.icns ; fi) -#ICON_DOC = $(shell if [ -e doc.icns ] ; then echo doc.icns ; else echo ; fi) -#ICON_DOCTXT = $(shell if [ -e doc-txt.icns ] ; then echo doc-txt.icns ; else echo ; fi) -#ICONS = $(addprefix $(RESDIR)/, $(ICON_APP) $(ICON_DOC) $(ICON_DOCTXT)) + -DAPP_VER=$(VERSION) install_macosx: gui_bundle # Remove the link to the runtime dir, don't want to copy all of that. @@ -2577,9 +2575,8 @@ bundle-info: bundle-dir @echo "Creating Info.plist" m4 $(M4FLAGSX) infplist.xml > $(APPDIR)/Contents/Info.plist -bundle-resource: bundle-dir bundle-icons bundle-rsrc - -bundle-icons: $(ICONS) +bundle-resource: bundle-dir bundle-rsrc + cp -f $(RSRC_DIR)/*.icns $(RESDIR) ### Classic resources # Resource fork (in the form of a .rsrc file) for Classic Vim (Mac OS 9) @@ -2603,9 +2600,6 @@ $(APPDIR)/Contents: -$(SHELL) ./mkinstalldirs $(APPDIR)/Contents/MacOS -$(SHELL) ./mkinstalldirs $(RESDIR)/English.lproj -$(RESDIR)/%.icns: %.icns - cp $< $@ - ############################################################################### ### (automatically generated by 'make depend') diff --git a/src/auto/configure b/src/auto/configure index e8b9a5d918..644d4efe82 100755 --- a/src/auto/configure +++ b/src/auto/configure @@ -2781,7 +2781,10 @@ if test -z "$CFLAGS"; then test "$GCC" = yes && CFLAGS="-O2 -fno-strength-reduce -Wall" fi if test "$GCC" = yes; then - gccversion=`"$CC" --version | sed -e '2,$d' -e 's/darwin.//' -e 's/^[^0-9]*\([0-9]\.[0-9.]*\).*$/\1/g'` + gccversion=`"$CC" -dumpversion` + if test "x$gccversion" = "x"; then + gccversion=`"$CC" --version | sed -e '2,$d' -e 's/darwin.//' -e 's/^[^0-9]*\([0-9]\.[0-9.]*\).*$/\1/g'` + fi if test "$gccversion" = "3.0.1" -o "$gccversion" = "3.0.2" -o "$gccversion" = "4.0.1"; then echo 'GCC [34].0.[12] has a bug in the optimizer, disabling "-O#"' CFLAGS=`echo "$CFLAGS" | sed 's/-O[23456789]/-O/'` @@ -9133,6 +9136,70 @@ fi done + + if test $ac_cv_header_Xm_XpmP_h = yes; then + echo "$as_me:$LINENO: checking for XpmAttributes_21 in Xm/XpmP.h" >&5 +echo $ECHO_N "checking for XpmAttributes_21 in Xm/XpmP.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. */ +#include <Xm/XpmP.h> +int +main () +{ +XpmAttributes_21 attr; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 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); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; cat >>confdefs.h <<\_ACEOF +#define XPMATTRIBUTES_TYPE XpmAttributes_21 +_ACEOF + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; cat >>confdefs.h <<\_ACEOF +#define XPMATTRIBUTES_TYPE XpmAttributes +_ACEOF + + +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + else + cat >>confdefs.h <<\_ACEOF +#define XPMATTRIBUTES_TYPE XpmAttributes_21 +_ACEOF + + fi CPPFLAGS=$cppflags_save fi diff --git a/src/buffer.c b/src/buffer.c index a26806540b..15abab5143 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -1814,6 +1814,10 @@ buflist_getfile(n, lnum, options, forceit) text_locked_msg(); return FAIL; } +#ifdef FEAT_AUTOCMD + if (curbuf_locked()) + return FAIL; +#endif /* altfpos may be changed by getfile(), get it now */ if (lnum == 0) @@ -3316,6 +3320,12 @@ build_stl_str_hl(wp, out, outlen, fmt, use_sandbox, fillchar, maxwidth, hltab, t if (fillchar == 0) fillchar = ' '; +#ifdef FEAT_MBYTE + /* Can't handle a multi-byte fill character yet. */ + else if (mb_char2len(fillchar) > 1) + fillchar = '-'; +#endif + /* * Get line & check if empty (cursorpos will show "0-1"). * If inversion is possible we use it. Else '=' characters are used. @@ -4367,6 +4377,14 @@ do_arg_all(count, forceit, keep_tabs) ++autocmd_no_leave; #endif win_enter(lastwin, FALSE); +#ifdef FEAT_WINDOWS + /* ":drop all" should re-use an empty window to avoid "--remote-tab" + * leaving an empty tab page when executed locally. */ + if (keep_tabs && bufempty() && curbuf->b_nwindows == 1 + && curbuf->b_ffname == NULL && !curbuf->b_changed) + use_firstwin = TRUE; +#endif + for (i = 0; i < count && i < alist->al_ga.ga_len && !got_int; ++i) { if (alist == &global_alist && i == global_alist.al_ga.ga_len - 1) diff --git a/src/config.h.in b/src/config.h.in index 5adbcb970a..8e0863a25d 100644 --- a/src/config.h.in +++ b/src/config.h.in @@ -243,6 +243,9 @@ #undef HAVE_X11_XMU_EDITRES_H #undef HAVE_X11_SM_SMLIB_H +/* Define to the type of the XpmAttributes type. */ +#undef XPMATTRIBUTES_TYPE + /* Define if you have <sys/wait.h> that is POSIX.1 compatible. */ #undef HAVE_SYS_WAIT_H diff --git a/src/configure.in b/src/configure.in index aedd73aac8..3b867e5f5b 100644 --- a/src/configure.in +++ b/src/configure.in @@ -29,7 +29,12 @@ if test -z "$CFLAGS"; then test "$GCC" = yes && CFLAGS="-O2 -fno-strength-reduce -Wall" fi if test "$GCC" = yes; then - gccversion=`"$CC" --version | sed -e '2,$d' -e 's/darwin.//' -e 's/^[[^0-9]]*\([[0-9]]\.[[0-9.]]*\).*$/\1/g'` + dnl method that should work for nearly all versions + gccversion=`"$CC" -dumpversion` + if test "x$gccversion" = "x"; then + dnl old method; fall-back for when -dumpversion doesn't work + gccversion=`"$CC" --version | sed -e '2,$d' -e 's/darwin.//' -e 's/^[[^0-9]]*\([[0-9]]\.[[0-9.]]*\).*$/\1/g'` + fi dnl version 4.0.1 was reported to cause trouble on Macintosh by Marcin Dalecki if test "$gccversion" = "3.0.1" -o "$gccversion" = "3.0.2" -o "$gccversion" = "4.0.1"; then echo 'GCC [[34]].0.[[12]] has a bug in the optimizer, disabling "-O#"' @@ -1897,6 +1902,17 @@ if test -z "$SKIP_MOTIF"; then CPPFLAGS="$CPPFLAGS $X_CFLAGS" AC_CHECK_HEADERS(Xm/Xm.h Xm/XpmP.h Xm/JoinSideT.h Xm/TraitP.h Xm/Manager.h \ Xm/UnhighlightT.h) + + if test $ac_cv_header_Xm_XpmP_h = yes; then + dnl Solaris uses XpmAttributes_21, very annoying. + AC_MSG_CHECKING([for XpmAttributes_21 in Xm/XpmP.h]) + AC_TRY_COMPILE([#include <Xm/XpmP.h>], [XpmAttributes_21 attr;], + AC_MSG_RESULT(yes); AC_DEFINE(XPMATTRIBUTES_TYPE, XpmAttributes_21), + AC_MSG_RESULT(no); AC_DEFINE(XPMATTRIBUTES_TYPE, XpmAttributes) + ) + else + AC_DEFINE(XPMATTRIBUTES_TYPE, XpmAttributes_21) + fi CPPFLAGS=$cppflags_save fi diff --git a/src/diff.c b/src/diff.c index 3927338340..f02aa5ef27 100644 --- a/src/diff.c +++ b/src/diff.c @@ -1000,7 +1000,8 @@ ex_diffpatch(eap) #ifdef FEAT_AUTOCMD /* Do filetype detection with the new name. */ - do_cmdline_cmd((char_u *)":doau filetypedetect BufRead"); + if (au_has_group((char_u *)"filetypedetect")) + do_cmdline_cmd((char_u *)":doau filetypedetect BufRead"); #endif } } @@ -2056,6 +2057,19 @@ ex_diffgetput(eap) aucmd_prepbuf(&aco, curtab->tp_diffbuf[idx_other]); } + /* May give the warning for a changed buffer here, which can trigger the + * FileChangedRO autocommand, which may do nasty things and mess + * everything up. */ + if (!curbuf->b_changed) + { + change_warning(0); + if (diff_buf_idx(curbuf) != idx_to) + { + EMSG(_("E787: Buffer changed unexpectedly")); + return; + } + } + dprev = NULL; for (dp = curtab->tp_first_diff; dp != NULL; ) { @@ -2131,7 +2145,8 @@ ex_diffgetput(eap) nr = dp->df_lnum[idx_from] + start_skip + i; if (nr > curtab->tp_diffbuf[idx_from]->b_ml.ml_line_count) break; - p = vim_strsave(ml_get_buf(curtab->tp_diffbuf[idx_from], nr, FALSE)); + p = vim_strsave(ml_get_buf(curtab->tp_diffbuf[idx_from], + nr, FALSE)); if (p != NULL) { ml_append(lnum + i - 1, p, 0, FALSE); @@ -2154,7 +2169,8 @@ ex_diffgetput(eap) /* Check if there are any other buffers and if the diff is * equal in them. */ for (i = 0; i < DB_COUNT; ++i) - if (curtab->tp_diffbuf[i] != NULL && i != idx_from && i != idx_to + if (curtab->tp_diffbuf[i] != NULL && i != idx_from + && i != idx_to && !diff_equal_entry(dp, idx_from, i)) break; if (i == DB_COUNT) diff --git a/src/doc-txt.icns b/src/doc-txt.icns Binary files differdeleted file mode 100644 index c66b0ceffb..0000000000 --- a/src/doc-txt.icns +++ /dev/null diff --git a/src/edit.c b/src/edit.c index da15010f5d..e70a23575d 100644 --- a/src/edit.c +++ b/src/edit.c @@ -40,7 +40,7 @@ static char *ctrl_x_msgs[] = { N_(" Keyword completion (^N^P)"), /* ctrl_x_mode == 0, ^P/^N compl. */ - N_(" ^X mode (^]^D^E^F^I^K^L^N^O^P^S^U^V^Y)"), + N_(" ^X mode (^]^D^E^F^I^K^L^N^O^Ps^U^V^Y)"), NULL, N_(" Whole line completion (^L^N^P)"), N_(" File name completion (^F^N^P)"), @@ -53,7 +53,7 @@ static char *ctrl_x_msgs[] = N_(" Command-line completion (^V^N^P)"), N_(" User defined completion (^U^N^P)"), N_(" Omni completion (^O^N^P)"), - N_(" Spelling suggestion (^S^N^P)"), + N_(" Spelling suggestion (s^N^P)"), N_(" Keyword Local completion (^N^P)"), }; @@ -3139,7 +3139,9 @@ ins_compl_prep(c) case Ctrl_S: ctrl_x_mode = CTRL_X_SPELL; #ifdef FEAT_SPELL + ++emsg_off; /* Avoid getting the E756 error twice. */ spell_back_to_badword(); + --emsg_off; #endif break; case Ctrl_RSB: @@ -3286,7 +3288,7 @@ ins_compl_prep(c) if (compl_leader != NULL) ins_bytes(compl_leader + curwin->w_cursor.col - compl_col); else if (compl_first_match != NULL) - ins_bytes(compl_first_match->cp_str + ins_bytes(compl_orig_text + curwin->w_cursor.col - compl_col); retval = TRUE; } diff --git a/src/eval.c b/src/eval.c index 4697e97f2e..1b75201f81 100644 --- a/src/eval.c +++ b/src/eval.c @@ -369,6 +369,9 @@ static void list_hashtable_vars __ARGS((hashtab_T *ht, char_u *prefix, int empty static void list_glob_vars __ARGS((void)); static void list_buf_vars __ARGS((void)); static void list_win_vars __ARGS((void)); +#ifdef FEAT_WINDOWS +static void list_tab_vars __ARGS((void)); +#endif static void list_vim_vars __ARGS((void)); static void list_script_vars __ARGS((void)); static void list_func_vars __ARGS((void)); @@ -567,6 +570,7 @@ static void f_map __ARGS((typval_T *argvars, typval_T *rettv)); static void f_maparg __ARGS((typval_T *argvars, typval_T *rettv)); static void f_mapcheck __ARGS((typval_T *argvars, typval_T *rettv)); static void f_match __ARGS((typval_T *argvars, typval_T *rettv)); +static void f_matcharg __ARGS((typval_T *argvars, typval_T *rettv)); static void f_matchend __ARGS((typval_T *argvars, typval_T *rettv)); static void f_matchlist __ARGS((typval_T *argvars, typval_T *rettv)); static void f_matchstr __ARGS((typval_T *argvars, typval_T *rettv)); @@ -578,6 +582,7 @@ static void f_mkdir __ARGS((typval_T *argvars, typval_T *rettv)); static void f_mode __ARGS((typval_T *argvars, typval_T *rettv)); static void f_nextnonblank __ARGS((typval_T *argvars, typval_T *rettv)); static void f_nr2char __ARGS((typval_T *argvars, typval_T *rettv)); +static void f_pathshorten __ARGS((typval_T *argvars, typval_T *rettv)); static void f_prevnonblank __ARGS((typval_T *argvars, typval_T *rettv)); static void f_printf __ARGS((typval_T *argvars, typval_T *rettv)); static void f_pumvisible __ARGS((typval_T *argvars, typval_T *rettv)); @@ -1685,6 +1690,9 @@ ex_let(eap) list_glob_vars(); list_buf_vars(); list_win_vars(); +#ifdef FEAT_WINDOWS + list_tab_vars(); +#endif list_script_vars(); list_func_vars(); list_vim_vars(); @@ -1947,6 +1955,17 @@ list_win_vars() list_hashtable_vars(&curwin->w_vars.dv_hashtab, (char_u *)"w:", TRUE); } +#ifdef FEAT_WINDOWS +/* + * List tab page variables. + */ + static void +list_tab_vars() +{ + list_hashtable_vars(&curtab->tp_vars.dv_hashtab, (char_u *)"t:", TRUE); +} +#endif + /* * List Vim variables. */ @@ -2043,6 +2062,9 @@ list_arg_vars(eap, arg) case 'g': list_glob_vars(); break; case 'b': list_buf_vars(); break; case 'w': list_win_vars(); break; +#ifdef FEAT_WINDOWS + case 't': list_tab_vars(); break; +#endif case 'v': list_vim_vars(); break; case 's': list_script_vars(); break; case 'l': list_func_vars(); break; @@ -3577,12 +3599,20 @@ get_user_var_name(xp, idx) static long_u gdone; static long_u bdone; static long_u wdone; +#ifdef FEAT_WINDOWS + static long_u tdone; +#endif static int vidx; static hashitem_T *hi; hashtab_T *ht; |