mirror of
https://github.com/macvim-dev/macvim.git
synced 2026-06-11 15:37:29 +02:00
Merge remote-tracking branch 'vim/master'
This commit is contained in:
@@ -158,7 +158,9 @@ SRC_ALL = \
|
||||
src/testdir/gen_opt_test.vim \
|
||||
src/testdir/README.txt \
|
||||
src/testdir/Make_all.mak \
|
||||
src/testdir/*.in \
|
||||
src/testdir/dotest.in \
|
||||
src/testdir/test1.in \
|
||||
src/testdir/test77a.in \
|
||||
src/testdir/*.py \
|
||||
src/testdir/lsan-suppress.txt \
|
||||
src/testdir/sautest/autoload/*.vim \
|
||||
@@ -177,9 +179,8 @@ SRC_ALL = \
|
||||
src/testdir/summarize.vim \
|
||||
src/testdir/term_util.vim \
|
||||
src/testdir/view_util.vim \
|
||||
src/testdir/test[0-9]*.ok \
|
||||
src/testdir/test[0-9]*a.ok \
|
||||
src/testdir/test49.vim \
|
||||
- src/testdir/test1.ok \
|
||||
src/testdir/test77a.ok \
|
||||
src/testdir/test83-tags? \
|
||||
src/testdir/test77a.com \
|
||||
src/testdir/test_*.vim \
|
||||
@@ -641,13 +642,11 @@ SRC_HAIKU = \
|
||||
SRC_MAC = \
|
||||
src/INSTALLmac.txt \
|
||||
src/dehqx.py \
|
||||
src/gui_mac.c \
|
||||
src/os_mac_rsrc/*.icns \
|
||||
src/os_mac.h \
|
||||
src/os_mac.rsr.hqx \
|
||||
src/os_mac_conv.c \
|
||||
src/os_macosx.m \
|
||||
src/proto/gui_mac.pro \
|
||||
src/proto/os_mac_conv.pro \
|
||||
|
||||
# source files for VMS (in the extra archive)
|
||||
|
||||
@@ -142,6 +142,7 @@ something else.
|
||||
:tabclose + " close the next tab page
|
||||
:tabclose 3 " close the third tab page
|
||||
:tabclose $ " close the last tab page
|
||||
:tabclose # " close the last accessed tab page
|
||||
<
|
||||
*:tabo* *:tabonly*
|
||||
:tabo[nly][!] Close all other tab pages.
|
||||
@@ -170,6 +171,8 @@ something else.
|
||||
" one
|
||||
:tabonly 1 " close all tab pages except the first one
|
||||
:tabonly $ " close all tab pages except the last one
|
||||
:tabonly # " close all tab pages except the last
|
||||
" accessed one
|
||||
|
||||
|
||||
SWITCHING TO ANOTHER TAB PAGE:
|
||||
@@ -192,6 +195,7 @@ gt *i_CTRL-<PageDown>* *i_<C-PageDown>*
|
||||
:+2tabnext " go to the two next tab page
|
||||
:1tabnext " go to the first tab page
|
||||
:$tabnext " go to the last tab page
|
||||
:tabnext # " go to the last accessed tab page
|
||||
:tabnext $ " as above
|
||||
:tabnext - " go to the previous tab page
|
||||
:tabnext -1 " as above
|
||||
@@ -255,6 +259,8 @@ REORDERING TAB PAGES:
|
||||
:tabmove " move the tab page to the last
|
||||
:$tabmove " as above
|
||||
:tabmove $ " as above
|
||||
:tabmove # " move the tab page after the last accessed
|
||||
" tab page
|
||||
|
||||
:tabm[ove] +[N]
|
||||
:tabm[ove] -[N]
|
||||
|
||||
+4
-11
@@ -20,18 +20,11 @@ and for testing plugins.
|
||||
Vim can be tested after building it, usually with "make test".
|
||||
The tests are located in the directory "src/testdir".
|
||||
|
||||
There are several types of tests added over time:
|
||||
test33.in oldest, don't add any of these
|
||||
test_something.in old style tests
|
||||
test_something.vim new style tests
|
||||
|
||||
*new-style-testing*
|
||||
New tests should be added as new style tests. These use functions such as
|
||||
|assert_equal()| to keep the test commands and the expected result in one
|
||||
place.
|
||||
*old-style-testing*
|
||||
In some cases an old style test needs to be used. E.g. when testing Vim
|
||||
without the |+eval| feature.
|
||||
New tests should be added as new style tests. The test scripts are named
|
||||
test_<feature>.vim (replace <feature> with the feature under test). These use
|
||||
functions such as |assert_equal()| to keep the test commands and the expected
|
||||
result in one place.
|
||||
|
||||
Find more information in the file src/testdir/README.txt.
|
||||
|
||||
|
||||
+8
-16
@@ -16,7 +16,7 @@ Summary
|
||||
----------------------------------------------------------------------------
|
||||
|
||||
1 MacOS X
|
||||
1.1. Carbon interface
|
||||
1.1. Terminal version
|
||||
1.2. X (Athena, GTK, Motif) or plain text.
|
||||
|
||||
MacOS Classic is no longer supported. If you really want it use Vim 6.4.
|
||||
@@ -27,9 +27,9 @@ MacOS Classic is no longer supported. If you really want it use Vim 6.4.
|
||||
|
||||
1.0 Considerations
|
||||
|
||||
Only '/' supported as path separator.
|
||||
Only '/' is supported as path separator.
|
||||
|
||||
1.1 Carbon interface (default)
|
||||
1.1 Terminal version (default)
|
||||
|
||||
You can compile vim with the standard Unix routine:
|
||||
cd .../src
|
||||
@@ -37,14 +37,7 @@ MacOS Classic is no longer supported. If you really want it use Vim 6.4.
|
||||
make test
|
||||
sudo make install
|
||||
|
||||
"make" will create a working Vim.app application bundle in the src
|
||||
directory. You can move this bundle (the Vim.app directory) anywhere
|
||||
you want. Or use "make install" to move it to /Applications.
|
||||
|
||||
You need at least Xcode 1.5 to compile Vim 7.0.
|
||||
|
||||
Configure will create a universal binary if possible. This requires
|
||||
installing the universal SDK (currently for 10.4).
|
||||
You need at least Xcode 1.5.
|
||||
|
||||
To overrule the architecture do this before running make:
|
||||
|
||||
@@ -53,17 +46,16 @@ MacOS Classic is no longer supported. If you really want it use Vim 6.4.
|
||||
./configure --with-mac-arch=ppc
|
||||
|
||||
|
||||
1.2 X-Windows or Plain Text
|
||||
1.2 X-Windows
|
||||
|
||||
If you do not want the Carbon interface, you must explicitly tell
|
||||
configure to use a different GUI.
|
||||
You must explicitly tell configure to use a GUI.
|
||||
|
||||
cd .../src
|
||||
./configure --disable-darwin --enable-gui=gtk2
|
||||
make; make install
|
||||
|
||||
NOTE: The following GUI options are supported:
|
||||
no (for text), motif, athena, nextaw
|
||||
NOTE: The following GUI options are possible (but might not work):
|
||||
no (for terminal only), motif, athena, nextaw
|
||||
gtk, gtk2, gnome, gnome2,
|
||||
|
||||
NOTE: You need to first install XFree86 and XDarwin.
|
||||
|
||||
+2
-10
@@ -1326,14 +1326,6 @@ MAIN_TARGET = $(VIM).exe
|
||||
# Target to run individual tests.
|
||||
VIMTESTTARGET = $(VIM).exe
|
||||
|
||||
OLD_TEST_OUTFILES = \
|
||||
$(SCRIPTS_FIRST) \
|
||||
$(SCRIPTS_ALL) \
|
||||
$(SCRIPTS_MORE1) \
|
||||
$(SCRIPTS_MORE4) \
|
||||
$(SCRIPTS_WIN32) \
|
||||
$(SCRIPTS_GUI)
|
||||
|
||||
all: $(MAIN_TARGET) \
|
||||
vimrun.exe \
|
||||
install.exe \
|
||||
@@ -1485,9 +1477,9 @@ testclean:
|
||||
$(MAKE) /NOLOGO -f Make_dos.mak clean
|
||||
cd ..
|
||||
|
||||
# Run individual OLD style test.
|
||||
# Run test1 to bootstrap tests
|
||||
# These do not depend on the executable, compile it when needed.
|
||||
$(OLD_TEST_OUTFILES:.out=):
|
||||
$(SCRIPTS_FIRST:.out=):
|
||||
cd testdir
|
||||
- if exist $@.out del $@.out
|
||||
$(MAKE) /NOLOGO -f Make_dos.mak VIMPROG=..\$(VIMTESTTARGET) nolog
|
||||
|
||||
+3
-23
@@ -1373,24 +1373,6 @@ PHOTONGUI_MAN_TARGETS = yes
|
||||
PHOTONGUI_TESTTARGET = gui
|
||||
PHOTONGUI_BUNDLE =
|
||||
|
||||
# CARBON GUI
|
||||
CARBONGUI_SRC = gui.c gui_mac.c
|
||||
CARBONGUI_OBJ = objects/gui.o objects/gui_mac.o
|
||||
CARBONGUI_DEFS = -DFEAT_GUI_MAC -fno-common -fpascal-strings \
|
||||
-Wall -Wno-unknown-pragmas \
|
||||
-mdynamic-no-pic -pipe
|
||||
CARBONGUI_IPATH = -I. -Iproto
|
||||
CARBONGUI_LIBS_DIR =
|
||||
CARBONGUI_LIBS1 = -framework Carbon
|
||||
CARBONGUI_LIBS2 =
|
||||
CARBONGUI_INSTALL = install_macosx
|
||||
CARBONGUI_TARGETS =
|
||||
CARBONGUI_MAN_TARGETS =
|
||||
CARBONGUI_TESTTARGET = gui
|
||||
CARBONGUI_BUNDLE = gui_bundle
|
||||
APPDIR = $(VIMNAME).app
|
||||
CARBONGUI_TESTARG = VIMPROG=../$(APPDIR)/Contents/MacOS/$(VIMTARGET)
|
||||
|
||||
### Haiku GUI
|
||||
HAIKUGUI_SRC = gui.c gui_haiku.cc
|
||||
HAIKUGUI_OBJ = objects/gui.o objects/gui_haiku.o
|
||||
@@ -2276,8 +2258,6 @@ test check: unittests $(TERM_TEST) scripttests
|
||||
#
|
||||
# This will produce a lot of garbage on your screen, including a few error
|
||||
# messages. Don't worry about that.
|
||||
# If there is a real error, there will be a difference between "testXX.out" and
|
||||
# a "testXX.ok" file.
|
||||
# If everything is alright, the final message will be "ALL DONE". If not you
|
||||
# get "TEST FAILURE".
|
||||
#
|
||||
@@ -2328,9 +2308,9 @@ test_libvterm:
|
||||
CC="$(CC)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)"; \
|
||||
fi
|
||||
|
||||
# Run individual OLD style test.
|
||||
# These do not depend on the executable, compile it when needed.
|
||||
test1 test49:
|
||||
# Run test1, used to bootstrap tests.
|
||||
# This does not depend on the executable, compile first it when needed.
|
||||
test1:
|
||||
cd testdir; rm -f $@.out; $(MAKE) -f Makefile $@.out VIMPROG=../$(VIMTESTTARGET) $(GUI_TESTARG) SCRIPTSOURCE=../$(SCRIPTSOURCE)
|
||||
|
||||
# Run individual NEW style test.
|
||||
|
||||
Vendored
+15
-58
@@ -833,7 +833,6 @@ enable_gtk3_check
|
||||
enable_motif_check
|
||||
enable_athena_check
|
||||
enable_nextaw_check
|
||||
enable_carbon_check
|
||||
enable_macvim_check
|
||||
enable_gtktest
|
||||
with_gnome_includes
|
||||
@@ -1505,7 +1504,6 @@ Optional Features:
|
||||
--enable-motif-check If auto-select GUI, check for Motif default=yes
|
||||
--enable-athena-check If auto-select GUI, check for Athena default=yes
|
||||
--enable-nextaw-check If auto-select GUI, check for neXtaw default=yes
|
||||
--enable-carbon-check If auto-select GUI, check for Carbon default=yes
|
||||
--enable-macvim-check If auto-select GUI, check for MacVim default=yes
|
||||
--disable-gtktest Do not try to compile and run a test GTK program
|
||||
--disable-icon-cache-update update disabled
|
||||
@@ -4796,7 +4794,11 @@ rm -f core conftest.err conftest.$ac_objext \
|
||||
OS_EXTRA_OBJ="objects/os_macosx.o objects/os_mac_conv.o"
|
||||
CPPFLAGS="$CPPFLAGS -DMACOS_X_DARWIN"
|
||||
|
||||
# On IRIX 5.3, sys/types and inttypes.h are conflicting.
|
||||
SAVE_CPPFLAGS=$CPPFLAGS
|
||||
SAVE_CFLAGS=$CFLAGS
|
||||
CPPFLAGS="$CPPFLAGS -ObjC"
|
||||
CFLAGS="$CFLAGS -ObjC"
|
||||
# On IRIX 5.3, sys/types and inttypes.h are conflicting.
|
||||
for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
|
||||
inttypes.h stdint.h unistd.h
|
||||
do :
|
||||
@@ -4813,18 +4815,7 @@ fi
|
||||
done
|
||||
|
||||
|
||||
ac_fn_c_check_header_mongrel "$LINENO" "Carbon/Carbon.h" "ac_cv_header_Carbon_Carbon_h" "$ac_includes_default"
|
||||
if test "x$ac_cv_header_Carbon_Carbon_h" = xyes; then :
|
||||
CARBON=yes
|
||||
fi
|
||||
|
||||
|
||||
|
||||
SAVE_CPPFLAGS=$CPPFLAGS
|
||||
SAVE_CFLAGS=$CFLAGS
|
||||
CPPFLAGS="$CPPFLAGS -ObjC"
|
||||
CFLAGS="$CFLAGS -ObjC"
|
||||
ac_fn_c_check_header_mongrel "$LINENO" "Cocoa/Cocoa.h" "ac_cv_header_Cocoa_Cocoa_h" "$ac_includes_default"
|
||||
ac_fn_c_check_header_mongrel "$LINENO" "Cocoa/Cocoa.h" "ac_cv_header_Cocoa_Cocoa_h" "$ac_includes_default"
|
||||
if test "x$ac_cv_header_Cocoa_Cocoa_h" = xyes; then :
|
||||
COCOA=yes
|
||||
fi
|
||||
@@ -4833,11 +4824,9 @@ fi
|
||||
CPPFLAGS=$SAVE_CPPFLAGS
|
||||
CFLAGS=$SAVE_CFLAGS
|
||||
|
||||
if test "x$CARBON" = "xyes" -o "x$COCOA" = "xyes"; then
|
||||
if test -z "$with_x" -a "X$enable_gui" != Xmotif -a "X$enable_gui" != Xathena -a "X$enable_gui" != Xgtk2 -a "X$enable_gui" != Xgtk3; then
|
||||
with_x=no
|
||||
fi
|
||||
fi
|
||||
if test -z "$with_x" -a "X$enable_gui" != Xmotif -a "X$enable_gui" != Xathena -a "X$enable_gui" != Xgtk2 -a "X$enable_gui" != Xgtk3; then
|
||||
with_x=no
|
||||
fi
|
||||
fi
|
||||
else
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
@@ -9318,7 +9307,6 @@ SKIP_ATHENA=YES
|
||||
SKIP_NEXTAW=YES
|
||||
SKIP_PHOTON=YES
|
||||
SKIP_HAIKU=YES
|
||||
SKIP_CARBON=YES
|
||||
SKIP_MACVIM=YES
|
||||
GUITYPE=NONE
|
||||
|
||||
@@ -9355,29 +9343,20 @@ $as_echo "Sorry, $enable_gui GUI is not supported" >&6; }
|
||||
esac
|
||||
|
||||
elif test "x$MACOS_X" = "xyes" -a "x$with_x" = "xno" ; then
|
||||
SKIP_CARBON=
|
||||
SKIP_MACVIM=
|
||||
case "$enable_gui_canon" in
|
||||
no) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no GUI support" >&5
|
||||
$as_echo "no GUI support" >&6; }
|
||||
SKIP_CARBON=YES
|
||||
SKIP_MACVIM=YES ;;
|
||||
yes|""|auto) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/auto - automatic GUI support" >&5
|
||||
$as_echo "yes/auto - automatic GUI support" >&6; }
|
||||
gui_auto=yes
|
||||
SKIP_CARBON=YES ;;
|
||||
carbon) { $as_echo "$as_me:${as_lineno-$LINENO}: result: Carbon GUI support" >&5
|
||||
$as_echo "Carbon GUI support" >&6; }
|
||||
SKIP_MACVIM=YES ;;
|
||||
yes|""|auto) { $as_echo "$as_me:${as_lineno-$LINENO}: result: automatic GUI support" >&5
|
||||
$as_echo "automatic GUI support" >&6; }
|
||||
gui_auto=yes ;;
|
||||
macvim) { $as_echo "$as_me:${as_lineno-$LINENO}: result: MacVim GUI support" >&5
|
||||
$as_echo "MacVim GUI support" >&6; }
|
||||
SKIP_CARBON=YES ;;
|
||||
$as_echo "MacVim GUI support" >&6; } ;;
|
||||
*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: Sorry, $enable_gui GUI is not supported" >&5
|
||||
$as_echo "Sorry, $enable_gui GUI is not supported" >&6; }
|
||||
SKIP_CARBON=YES
|
||||
SKIP_MACVIM=YES ;;
|
||||
esac
|
||||
|
||||
else
|
||||
|
||||
case "$enable_gui_canon" in
|
||||
@@ -9390,9 +9369,8 @@ $as_echo "yes/auto - automatic GUI support" >&6; }
|
||||
SKIP_GNOME=
|
||||
SKIP_MOTIF=
|
||||
SKIP_ATHENA=
|
||||
SKIP_NEXTAW=
|
||||
SKIP_MACVIM=
|
||||
SKIP_CARBON=;;
|
||||
SKIP_NEXTAW=;;
|
||||
gtk2) { $as_echo "$as_me:${as_lineno-$LINENO}: result: GTK+ 2.x GUI support" >&5
|
||||
$as_echo "GTK+ 2.x GUI support" >&6; }
|
||||
SKIP_GTK2=;;
|
||||
@@ -9522,23 +9500,6 @@ $as_echo "$enable_nextaw_check" >&6; };
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "x$SKIP_CARBON" != "xYES" -a "$enable_gui_canon" != "carbon"; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether or not to look for Carbon" >&5
|
||||
$as_echo_n "checking whether or not to look for Carbon... " >&6; }
|
||||
# Check whether --enable-carbon-check was given.
|
||||
if test "${enable_carbon_check+set}" = set; then :
|
||||
enableval=$enable_carbon_check;
|
||||
else
|
||||
enable_carbon_check="yes"
|
||||
fi
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_carbon_check" >&5
|
||||
$as_echo "$enable_carbon_check" >&6; };
|
||||
if test "x$enable_carbon_check" = "xno"; then
|
||||
SKIP_CARBON=YES
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "x$SKIP_MACVIM" != "xYES" -a "$enable_gui_canon" != "macvim"; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether or not to look for MacVim" >&5
|
||||
$as_echo_n "checking whether or not to look for MacVim... " >&6; }
|
||||
@@ -14993,11 +14954,7 @@ fi
|
||||
if test "$MACOS_X" = "yes"; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need macOS frameworks" >&5
|
||||
$as_echo_n "checking whether we need macOS frameworks... " >&6; }
|
||||
if test "$GUITYPE" = "CARBONGUI"; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, we need Carbon" >&5
|
||||
$as_echo "yes, we need Carbon" >&6; }
|
||||
LIBS="$LIBS -framework Carbon"
|
||||
elif test "$MACOS_X_DARWIN" = "yes"; then
|
||||
if test "$MACOS_X_DARWIN" = "yes"; then
|
||||
if test "$features" = "tiny"; then
|
||||
OS_EXTRA_SRC=`echo "$OS_EXTRA_SRC" | sed -e 's+os_macosx.m++'`
|
||||
OS_EXTRA_OBJ=`echo "$OS_EXTRA_OBJ" | sed -e 's+objects/os_macosx.o++'`
|
||||
|
||||
+10
-39
@@ -294,11 +294,6 @@ if test "`(uname) 2>/dev/null`" = Darwin; then
|
||||
dnl Removed -no-cpp-precomp, only for very old compilers.
|
||||
CPPFLAGS="$CPPFLAGS -DMACOS_X_DARWIN"
|
||||
|
||||
dnl If Carbon or Cocoa is found, assume we don't want
|
||||
dnl X11 unless it was specifically asked for (--with-x)
|
||||
dnl or Motif, Athena or GTK GUI is used.
|
||||
AC_CHECK_HEADER(Carbon/Carbon.h, CARBON=yes)
|
||||
|
||||
SAVE_CPPFLAGS=$CPPFLAGS
|
||||
SAVE_CFLAGS=$CFLAGS
|
||||
CPPFLAGS="$CPPFLAGS -ObjC"
|
||||
@@ -307,11 +302,11 @@ if test "`(uname) 2>/dev/null`" = Darwin; then
|
||||
CPPFLAGS=$SAVE_CPPFLAGS
|
||||
CFLAGS=$SAVE_CFLAGS
|
||||
|
||||
if test "x$CARBON" = "xyes" -o "x$COCOA" = "xyes"; then
|
||||
if test -z "$with_x" -a "X$enable_gui" != Xmotif -a "X$enable_gui" != Xathena -a "X$enable_gui" != Xgtk2 -a "X$enable_gui" != Xgtk3; then
|
||||
with_x=no
|
||||
fi
|
||||
fi
|
||||
dnl Assume we don't want X11 unless it was specifically asked for
|
||||
dnl (--with-x) or Motif, Athena or GTK GUI is used.
|
||||
if test -z "$with_x" -a "X$enable_gui" != Xmotif -a "X$enable_gui" != Xathena -a "X$enable_gui" != Xgtk2 -a "X$enable_gui" != Xgtk3; then
|
||||
with_x=no
|
||||
fi
|
||||
fi
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
@@ -2483,7 +2478,6 @@ SKIP_ATHENA=YES
|
||||
SKIP_NEXTAW=YES
|
||||
SKIP_PHOTON=YES
|
||||
SKIP_HAIKU=YES
|
||||
SKIP_CARBON=YES
|
||||
SKIP_MACVIM=YES
|
||||
GUITYPE=NONE
|
||||
|
||||
@@ -2511,24 +2505,16 @@ elif test "x$QNX" = "xyes" -a "x$with_x" = "xno" ; then
|
||||
esac
|
||||
|
||||
elif test "x$MACOS_X" = "xyes" -a "x$with_x" = "xno" ; then
|
||||
SKIP_CARBON=
|
||||
SKIP_MACVIM=
|
||||
case "$enable_gui_canon" in
|
||||
no) AC_MSG_RESULT(no GUI support)
|
||||
SKIP_CARBON=YES
|
||||
SKIP_MACVIM=YES ;;
|
||||
yes|""|auto) AC_MSG_RESULT(yes/auto - automatic GUI support)
|
||||
gui_auto=yes
|
||||
SKIP_CARBON=YES ;;
|
||||
carbon) AC_MSG_RESULT(Carbon GUI support)
|
||||
SKIP_MACVIM=YES ;;
|
||||
macvim) AC_MSG_RESULT(MacVim GUI support)
|
||||
SKIP_CARBON=YES ;;
|
||||
yes|""|auto) AC_MSG_RESULT(automatic GUI support)
|
||||
gui_auto=yes ;;
|
||||
macvim) AC_MSG_RESULT(MacVim GUI support) ;;
|
||||
*) AC_MSG_RESULT([Sorry, $enable_gui GUI is not supported])
|
||||
SKIP_CARBON=YES
|
||||
SKIP_MACVIM=YES ;;
|
||||
esac
|
||||
|
||||
else
|
||||
|
||||
case "$enable_gui_canon" in
|
||||
@@ -2539,9 +2525,8 @@ else
|
||||
SKIP_GNOME=
|
||||
SKIP_MOTIF=
|
||||
SKIP_ATHENA=
|
||||
SKIP_NEXTAW=
|
||||
SKIP_MACVIM=
|
||||
SKIP_CARBON=;;
|
||||
SKIP_NEXTAW=;;
|
||||
gtk2) AC_MSG_RESULT(GTK+ 2.x GUI support)
|
||||
SKIP_GTK2=;;
|
||||
gnome2) AC_MSG_RESULT(GNOME 2.x GUI support)
|
||||
@@ -2628,17 +2613,6 @@ if test "x$SKIP_NEXTAW" != "xYES" -a "$enable_gui_canon" != "nextaw"; then
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "x$SKIP_CARBON" != "xYES" -a "$enable_gui_canon" != "carbon"; then
|
||||
AC_MSG_CHECKING(whether or not to look for Carbon)
|
||||
AC_ARG_ENABLE(carbon-check,
|
||||
[ --enable-carbon-check If auto-select GUI, check for Carbon [default=yes]],
|
||||
, enable_carbon_check="yes")
|
||||
AC_MSG_RESULT($enable_carbon_check);
|
||||
if test "x$enable_carbon_check" = "xno"; then
|
||||
SKIP_CARBON=YES
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "x$SKIP_MACVIM" != "xYES" -a "$enable_gui_canon" != "macvim"; then
|
||||
AC_MSG_CHECKING(whether or not to look for MacVim)
|
||||
AC_ARG_ENABLE(macvim-check,
|
||||
@@ -4552,10 +4526,7 @@ fi
|
||||
|
||||
if test "$MACOS_X" = "yes"; then
|
||||
AC_MSG_CHECKING([whether we need macOS frameworks])
|
||||
if test "$GUITYPE" = "CARBONGUI"; then
|
||||
AC_MSG_RESULT([yes, we need Carbon])
|
||||
LIBS="$LIBS -framework Carbon"
|
||||
elif test "$MACOS_X_DARWIN" = "yes"; then
|
||||
if test "$MACOS_X_DARWIN" = "yes"; then
|
||||
if test "$features" = "tiny"; then
|
||||
dnl Since no FEAT_CLIPBOARD, no longer need for os_macosx.m.
|
||||
OS_EXTRA_SRC=`echo "$OS_EXTRA_SRC" | sed -e 's+os_macosx.m++'`
|
||||
|
||||
+10
-3
@@ -192,7 +192,10 @@ eval_to_bool(
|
||||
*error = FALSE;
|
||||
if (!skip)
|
||||
{
|
||||
retval = (tv_get_number_chk(&tv, error) != 0);
|
||||
if (in_vim9script())
|
||||
retval = tv2bool(&tv);
|
||||
else
|
||||
retval = (tv_get_number_chk(&tv, error) != 0);
|
||||
clear_tv(&tv);
|
||||
}
|
||||
}
|
||||
@@ -3098,7 +3101,8 @@ eval7(
|
||||
|
||||
// Apply prefixed "-" and "+" now. Matters especially when
|
||||
// "->" follows.
|
||||
if (ret == OK && evaluate && end_leader > start_leader)
|
||||
if (ret == OK && evaluate && end_leader > start_leader
|
||||
&& rettv->v_type != VAR_BLOB)
|
||||
ret = eval7_leader(rettv, TRUE, start_leader, &end_leader);
|
||||
break;
|
||||
|
||||
@@ -3281,7 +3285,10 @@ eval7_leader(
|
||||
f = rettv->vval.v_float;
|
||||
else
|
||||
#endif
|
||||
val = tv_get_number_chk(rettv, &error);
|
||||
if (in_vim9script() && end_leader[-1] == '!')
|
||||
val = tv2bool(rettv);
|
||||
else
|
||||
val = tv_get_number_chk(rettv, &error);
|
||||
if (error)
|
||||
{
|
||||
clear_tv(rettv);
|
||||
|
||||
+1
-7
@@ -3927,13 +3927,7 @@ f_has(typval_T *argvars, typval_T *rettv)
|
||||
0
|
||||
#endif
|
||||
},
|
||||
{"gui_mac",
|
||||
#ifdef FEAT_GUI_MAC
|
||||
1
|
||||
#else
|
||||
0
|
||||
#endif
|
||||
},
|
||||
{"gui_mac", 0},
|
||||
{"gui_macvim",
|
||||
#ifdef FEAT_GUI_MACVIM
|
||||
1
|
||||
|
||||
@@ -5418,6 +5418,15 @@ get_tabpage_arg(exarg_T *eap)
|
||||
{
|
||||
if (STRCMP(p, "$") == 0)
|
||||
tab_number = LAST_TAB_NR;
|
||||
else if (STRCMP(p, "#") == 0)
|
||||
if (valid_tabpage(lastused_tabpage))
|
||||
tab_number = tabpage_index(lastused_tabpage);
|
||||
else
|
||||
{
|
||||
eap->errmsg = ex_errmsg(e_invargval, eap->arg);
|
||||
tab_number = 0;
|
||||
goto theend;
|
||||
}
|
||||
else if (p == p_save || *p_save == '-' || *p != NUL
|
||||
|| tab_number > LAST_TAB_NR)
|
||||
{
|
||||
|
||||
+5
-15
@@ -641,7 +641,6 @@
|
||||
&& (defined(FEAT_GUI_GTK) \
|
||||
|| (defined(FEAT_GUI_MOTIF) && defined(HAVE_XM_NOTEBOOK_H)) \
|
||||
|| defined(FEAT_GUI_MACVIM) \
|
||||
|| defined(FEAT_GUI_MAC) \
|
||||
|| defined(FEAT_GUI_HAIKU) \
|
||||
|| (defined(FEAT_GUI_MSWIN) \
|
||||
&& (!defined(_MSC_VER) || _MSC_VER > 1020)))
|
||||
@@ -655,9 +654,8 @@
|
||||
#if defined(FEAT_NORMAL)
|
||||
# define FEAT_BROWSE_CMD
|
||||
# if defined(FEAT_GUI_MSWIN) || defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_ATHENA) \
|
||||
|| defined(FEAT_GUI_GTK) || defined(FEAT_GUI_HAIKU) || defined(FEAT_GUI_PHOTON) \
|
||||
|| defined(FEAT_GUI_MACVIM) \
|
||||
|| defined(FEAT_GUI_MAC)
|
||||
|| defined(FEAT_GUI_GTK) || defined(FEAT_GUI_HAIKU) || defined(FEAT_GUI_PHOTON)
|
||||
# define FEAT_BROWSE
|
||||
# endif
|
||||
#endif
|
||||
@@ -667,8 +665,7 @@
|
||||
* there is no terminal version, and on Windows we can't figure out how to
|
||||
* fork one off with :gui.
|
||||
*/
|
||||
#if (defined(FEAT_GUI_MSWIN) && !defined(VIMDLL)) \
|
||||
|| (defined(FEAT_GUI_MAC) && !defined(MACOS_X_DARWIN))
|
||||
#if defined(FEAT_GUI_MSWIN) && !defined(VIMDLL)
|
||||
# define ALWAYS_USE_GUI
|
||||
#endif
|
||||
|
||||
@@ -683,9 +680,8 @@
|
||||
|| defined(FEAT_GUI_GTK) \
|
||||
|| defined(FEAT_GUI_PHOTON) \
|
||||
|| defined(FEAT_GUI_HAIKU) \
|
||||
|| defined(FEAT_GUI_MSWIN) \
|
||||
|| defined(FEAT_GUI_MACVIM) \
|
||||
|| defined(FEAT_GUI_MAC)
|
||||
|| defined(FEAT_GUI_MSWIN)
|
||||
# define FEAT_CON_DIALOG
|
||||
# define FEAT_GUI_DIALOG
|
||||
# else
|
||||
@@ -701,7 +697,7 @@
|
||||
#if defined(FEAT_GUI_DIALOG) && \
|
||||
(defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_ATHENA) \
|
||||
|| defined(FEAT_GUI_GTK) || defined(FEAT_GUI_MSWIN) \
|
||||
|| defined(FEAT_GUI_PHOTON) || defined(FEAT_GUI_MAC) \
|
||||
|| defined(FEAT_GUI_PHOTON) \
|
||||
|| defined(FEAT_GUI_MACVIM) \
|
||||
|| defined(FEAT_GUI_HAIKU))
|
||||
# define FEAT_GUI_TEXTDIALOG
|
||||
@@ -717,11 +713,6 @@
|
||||
# define FEAT_TERMGUICOLORS
|
||||
#endif
|
||||
|
||||
// Mac specific thing: Codewarrior interface.
|
||||
#ifdef FEAT_GUI_MAC
|
||||
# define FEAT_CW_EDITOR
|
||||
#endif
|
||||
|
||||
/*
|
||||
* +vartabs 'vartabstop' and 'varsofttabstop' options.
|
||||
*/
|
||||
@@ -1109,8 +1100,7 @@
|
||||
#endif
|
||||
|
||||
#if defined(FEAT_MZSCHEME) && (defined(FEAT_GUI_MSWIN) || defined(FEAT_GUI_GTK) \
|
||||
|| defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_ATHENA) \
|
||||
|| defined(FEAT_GUI_MAC))
|
||||
|| defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_ATHENA))
|
||||
# define MZSCHEME_GUI_THREADS
|
||||
#endif
|
||||
|
||||
|
||||
@@ -403,11 +403,6 @@ readfile(
|
||||
*/
|
||||
swap_mode = (st.st_mode & 0644) | 0600;
|
||||
#endif
|
||||
#ifdef FEAT_CW_EDITOR
|
||||
// Get the FSSpec on MacOS
|
||||
// TODO: Update it properly when the buffer name changes
|
||||
(void)GetFSSpecFromPath(curbuf->b_ffname, &curbuf->b_FSSpec);
|
||||
#endif
|
||||
#ifdef VMS
|
||||
curbuf->b_fab_rfm = st.st_fab_rfm;
|
||||
curbuf->b_fab_rat = st.st_fab_rat;
|
||||
@@ -3390,7 +3385,6 @@ shorten_fnames(int force)
|
||||
#if (defined(FEAT_DND) && defined(FEAT_GUI_GTK)) \
|
||||
|| defined(FEAT_GUI_MACVIM) \
|
||||
|| defined(FEAT_GUI_MSWIN) \
|
||||
|| defined(FEAT_GUI_MAC) \
|
||||
|| defined(FEAT_GUI_HAIKU) \
|
||||
|| defined(PROTO)
|
||||
/*
|
||||
|
||||
+1
-5
@@ -1573,7 +1573,7 @@ EXTERN char e_failed[] INIT(= N_("E472: Command failed"));
|
||||
#if defined(FEAT_GUI) && defined(FEAT_XFONTSET)
|
||||
EXTERN char e_fontset[] INIT(= N_("E234: Unknown fontset: %s"));
|
||||
#endif
|
||||
#if defined(FEAT_GUI_X11) || defined(FEAT_GUI_GTK) || defined(FEAT_GUI_MAC) \
|
||||
#if defined(FEAT_GUI_X11) || defined(FEAT_GUI_GTK) \
|
||||
|| defined(FEAT_GUI_MACVIM) \
|
||||
|| defined(FEAT_GUI_PHOTON) || defined(FEAT_GUI_MSWIN) || defined(FEAT_GUI_HAIKU)
|
||||
EXTERN char e_font[] INIT(= N_("E235: Unknown font: %s"));
|
||||
@@ -1811,10 +1811,6 @@ EXTERN char e_colon_required[] INIT(= N_("E1050: Colon required before a range")
|
||||
EXTERN char e_alloc_color[] INIT(= N_("E254: Cannot allocate color %s"));
|
||||
#endif
|
||||
|
||||
#ifdef FEAT_GUI_MAC
|
||||
EXTERN short disallow_gui INIT(= FALSE);
|
||||
#endif
|
||||
|
||||
EXTERN char top_bot_msg[] INIT(= N_("search hit TOP, continuing at BOTTOM"));
|
||||
EXTERN char bot_top_msg[] INIT(= N_("search hit BOTTOM, continuing at TOP"));
|
||||
|
||||
|
||||
@@ -56,7 +56,7 @@ static int disable_flush = 0; // If > 0, gui_mch_flush() is disabled.
|
||||
* this makes the thumb indicate the part of the text that is shown. Motif
|
||||
* can't do this.
|
||||
*/
|
||||
#if defined(FEAT_GUI_ATHENA) || defined(FEAT_GUI_MAC)
|
||||
#if defined(FEAT_GUI_ATHENA)
|
||||
# define SCROLL_PAST_END
|
||||
#endif
|
||||
|
||||
@@ -855,7 +855,7 @@ gui_exit(int rc)
|
||||
|
||||
#if defined(FEAT_GUI_GTK) || defined(FEAT_GUI_X11) || defined(FEAT_GUI_MSWIN) \
|
||||
|| defined(FEAT_GUI_MACVIM) \
|
||||
|| defined(FEAT_GUI_PHOTON) || defined(FEAT_GUI_MAC) || defined(PROTO)
|
||||
|| defined(FEAT_GUI_PHOTON) || defined(PROTO)
|
||||
# define NEED_GUI_UPDATE_SCREEN 1
|
||||
/*
|
||||
* Called when the GUI shell is closed by the user. If there are no changed
|
||||
@@ -1398,7 +1398,7 @@ gui_position_components(int total_width UNUSED)
|
||||
#endif
|
||||
|
||||
# if defined(FEAT_GUI_TABLINE) && (defined(FEAT_GUI_MSWIN) \
|
||||
|| defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_MAC))
|
||||
|| defined(FEAT_GUI_MOTIF))
|
||||
if (gui_has_tabline())
|
||||
text_area_y += gui.tabline_height;
|
||||
#endif
|
||||
|
||||
@@ -39,25 +39,6 @@
|
||||
# include <X11/Intrinsic.h>
|
||||
#endif
|
||||
|
||||
#ifdef FEAT_GUI_MAC
|
||||
# include <Types.h>
|
||||
/*# include <Memory.h>*/
|
||||
# include <Quickdraw.h>
|
||||
# include <Fonts.h>
|
||||
# include <Events.h>
|
||||
# include <Menus.h>
|
||||
# if !(defined (TARGET_API_MAC_CARBON) && (TARGET_API_MAC_CARBON))
|
||||
# include <Windows.h>
|
||||
# endif
|
||||
# include <Controls.h>
|
||||
/*# include <TextEdit.h>*/
|
||||
# include <Dialogs.h>
|
||||
# include <OSUtils.h>
|
||||
/*
|
||||
# include <ToolUtils.h>
|
||||
# include <SegLoad.h>*/
|
||||
#endif
|
||||
|
||||
#ifdef FEAT_GUI_PHOTON
|
||||
# include <Ph.h>
|
||||
# include <Pt.h>
|
||||
@@ -68,7 +49,7 @@
|
||||
* On some systems scrolling needs to be done right away instead of in the
|
||||
* main loop.
|
||||
*/
|
||||
#if defined(FEAT_GUI_MSWIN) || defined(FEAT_GUI_MAC) || defined(FEAT_GUI_GTK) \
|
||||
#if defined(FEAT_GUI_MSWIN) || defined(FEAT_GUI_GTK) \
|
||||
|| defined(FEAT_GUI_MACVIM)
|
||||
# define USE_ON_FLY_SCROLL
|
||||
#endif
|
||||
@@ -79,7 +60,6 @@
|
||||
#if (defined(FEAT_DND) && defined(FEAT_GUI_GTK)) \
|
||||
|| defined(FEAT_GUI_MSWIN) \
|
||||
|| defined(FEAT_GUI_MACVIM) \
|
||||
|| defined(FEAT_GUI_MAC) \
|
||||
|| defined(FEAT_GUI_HAIKU)
|
||||
# define HAVE_DROP_FILE
|
||||
#endif
|
||||
@@ -213,9 +193,6 @@ typedef struct GuiScrollbar
|
||||
#if FEAT_GUI_HAIKU
|
||||
VimScrollBar *id; // Pointer to real scroll bar
|
||||
#endif
|
||||
#ifdef FEAT_GUI_MAC
|
||||
ControlHandle id; // A handle to the scrollbar
|
||||
#endif
|
||||
#ifdef FEAT_GUI_PHOTON
|
||||
PtWidget_t *id;
|
||||
#endif
|
||||
@@ -444,7 +421,7 @@ typedef struct Gui
|
||||
|
||||
#if defined(FEAT_GUI_TABLINE) \
|
||||
&& (defined(FEAT_GUI_MSWIN) || defined(FEAT_GUI_MOTIF) \
|
||||
|| defined(FEAT_GUI_MAC) || defined(FEAT_GUI_HAIKU))
|
||||
|| defined(FEAT_GUI_HAIKU))
|
||||
int tabline_height;
|
||||
#endif
|
||||
|
||||
@@ -482,14 +459,6 @@ typedef struct Gui
|
||||
int vdcmp; // Vim Direct Communication Message Port
|
||||
#endif
|
||||
|
||||
#ifdef FEAT_GUI_MAC
|
||||
WindowPtr VimWindow;
|
||||
MenuHandle MacOSHelpMenu; // Help menu provided by the MacOS
|
||||
int MacOSHelpItems; // Nr of help-items supplied by MacOS
|
||||
WindowPtr wid; // Window id of text area
|
||||
int visibility; // Is window partially/fully obscured?
|
||||
#endif
|
||||
|
||||
#ifdef FEAT_GUI_PHOTON
|
||||
PtWidget_t *vimWindow; // PtWindow
|
||||
PtWidget_t *vimTextArea; // PtRaw
|
||||
@@ -612,6 +581,6 @@ typedef enum
|
||||
# endif
|
||||
#endif // FEAT_GUI_GTK
|
||||
|
||||
#if defined(UNIX) && !(defined(FEAT_GUI_MAC) || defined(FEAT_GUI_MACVIM))
|
||||
#if defined(UNIX) && !defined(FEAT_GUI_MACVIM)
|
||||
# define GUI_MAY_FORK
|
||||
#endif
|
||||
|
||||
-6716
File diff suppressed because it is too large
Load Diff
@@ -812,10 +812,6 @@ static guint timer_id = 0;
|
||||
#elif defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_ATHENA)
|
||||
static void timer_proc(XtPointer, XtIntervalId *);
|
||||
static XtIntervalId timer_id = (XtIntervalId)0;
|
||||
#elif defined(FEAT_GUI_MAC)
|
||||
pascal void timer_proc(EventLoopTimerRef, void *);
|
||||
static EventLoopTimerRef timer_id = NULL;
|
||||
static EventLoopTimerUPP timerUPP;
|
||||
#endif
|
||||
|
||||
#if !defined(FEAT_GUI_MSWIN) || defined(VIMDLL) // Win32 console and Unix
|
||||
@@ -852,9 +848,6 @@ timer_proc(gpointer data UNUSED)
|
||||
# elif defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_ATHENA)
|
||||
static void
|
||||
timer_proc(XtPointer timed_out UNUSED, XtIntervalId *interval_id UNUSED)
|
||||
# elif defined(FEAT_GUI_MAC)
|
||||
pascal void
|
||||
timer_proc(EventLoopTimerRef theTimer UNUSED, void *userData UNUSED)
|
||||
# endif
|
||||
{
|
||||
scheme_check_threads();
|
||||
@@ -877,10 +870,6 @@ setup_timer(void)
|
||||
timer_id = g_timeout_add((guint)p_mzq, (GSourceFunc)timer_proc, NULL);
|
||||
# elif defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_ATHENA)
|
||||
timer_id = XtAppAddTimeOut(app_context, p_mzq, timer_proc, NULL);
|
||||
# elif defined(FEAT_GUI_MAC)
|
||||
timerUPP = NewEventLoopTimerUPP(timer_proc);
|
||||
InstallEventLoopTimer(GetMainEventLoop(), p_mzq * kEventDurationMillisecond,
|
||||
p_mzq * kEventDurationMillisecond, timerUPP, NULL, &timer_id);
|
||||
# endif
|
||||
}
|
||||
|
||||
@@ -893,9 +882,6 @@ remove_timer(void)
|
||||
g_source_remove(timer_id);
|
||||
# elif defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_ATHENA)
|
||||
XtRemoveTimeOut(timer_id);
|
||||
# elif defined(FEAT_GUI_MAC)
|
||||
RemoveEventLoopTimer(timer_id);
|
||||
DisposeEventLoopTimerUPP(timerUPP);
|
||||
# endif
|
||||
timer_id = 0;
|
||||
}
|
||||
|
||||
@@ -133,7 +133,7 @@ static void scroll(VTermState *state, VTermRect rect, int downward, int rightwar
|
||||
if(rect.start_col == 0 && rect.end_col == state->cols && rightward == 0) {
|
||||
int height = rect.end_row - rect.start_row - abs(downward);
|
||||
int row;
|
||||
VTermLineInfo zeroLineInfo = { 0 };
|
||||
VTermLineInfo zeroLineInfo = {0x0};
|
||||
|
||||
if(downward > 0) {
|
||||
memmove(state->lineinfo + rect.start_row,
|
||||
@@ -1813,7 +1813,7 @@ static int on_resize(int rows, int cols, void *user)
|
||||
}
|
||||
|
||||
for( ; row < rows; row++) {
|
||||
VTermLineInfo lineInfo = {0};
|
||||
VTermLineInfo lineInfo = {0x0};
|
||||
newlineinfo[row] = lineInfo;
|
||||
}
|
||||
|
||||
|
||||
-39
@@ -314,33 +314,6 @@ main
|
||||
params.want_full_screen = FALSE;
|
||||
#endif
|
||||
|
||||
#if defined(FEAT_GUI_MAC) && defined(MACOS_X_DARWIN)
|
||||
// When the GUI is started from Finder, need to display messages in a
|
||||
// message box. isatty(2) returns TRUE anyway, thus we need to check the
|
||||
// name to know we're not started from a terminal.
|
||||
if (gui.starting && (!isatty(2) || strcmp("/dev/console", ttyname(2)) == 0))
|
||||
{
|
||||
params.want_full_screen = FALSE;
|
||||
|
||||
// Avoid always using "/" as the current directory. Note that when
|
||||
// started from Finder the arglist will be filled later in
|
||||
// HandleODocAE() and "fname" will be NULL.
|
||||
if (getcwd((char *)NameBuff, MAXPATHL) != NULL
|
||||
&& STRCMP(NameBuff, "/") == 0)
|
||||
{
|
||||
if (params.fname != NULL)
|
||||
(void)vim_chdirfile(params.fname, "drop");
|
||||
else
|
||||
{
|
||||
expand_env((char_u *)"$HOME", NameBuff, MAXPATHL);
|
||||
vim_chdir(NameBuff);
|
||||
}
|
||||
if (start_dir != NULL)
|
||||
mch_dirname(start_dir, MAXPATHL);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* mch_init() sets up the terminal (window) for use. This must be
|
||||
* done after resetting full_screen, otherwise it may move the cursor.
|
||||
@@ -1922,18 +1895,6 @@ parse_command_name(mparm_T *parmp)
|
||||
|
||||
initstr = gettail((char_u *)parmp->argv[0]);
|
||||
|
||||
#ifdef FEAT_GUI_MAC
|
||||
// An issue has been seen when launching Vim in such a way that
|
||||
// $PWD/$ARGV[0] or $ARGV[0] is not the absolute path to the
|
||||
// executable or a symbolic link of it. Until this issue is resolved
|
||||
// we prohibit the GUI from being used.
|
||||
if (STRCMP(initstr, parmp->argv[0]) == 0)
|
||||
disallow_gui = TRUE;
|
||||
|
||||
// TODO: On MacOS X default to gui if argv[0] ends in:
|
||||
// /Vim.app/Contents/MacOS/Vim
|
||||
#endif
|
||||
|
||||
#ifdef FEAT_EVAL
|
||||
set_vim_var_string(VV_PROGNAME, initstr, -1);
|
||||
set_progpath((char_u *)parmp->argv[0]);
|
||||
|
||||
+1
-1
@@ -3348,7 +3348,7 @@ same_directory(char_u *f1, char_u *f2)
|
||||
}
|
||||
|
||||
#if defined(FEAT_SESSION) || defined(FEAT_AUTOCHDIR) \
|
||||
|| defined(MSWIN) || defined(FEAT_GUI_MAC) || defined(FEAT_GUI_GTK) \
|
||||
|| defined(MSWIN) || defined(FEAT_GUI_GTK) \
|
||||
|| defined(FEAT_NETBEANS_INTG) \
|
||||
|| defined(PROTO)
|
||||
/*
|
||||
|
||||
+4
-4
@@ -116,9 +116,9 @@ find_end_of_word(pos_T *pos)
|
||||
|
||||
#if defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_GTK) \
|
||||
|| defined(FEAT_GUI_ATHENA) || defined(FEAT_GUI_MSWIN) \
|
||||
|| defined(FEAT_GUI_MAC) || defined(FEAT_GUI_PHOTON) \
|
||||
|| defined(FEAT_TERM_POPUP_MENU) \
|
||||
|| defined(FEAT_GUI_MACVIM)
|
||||
|| defined(FEAT_GUI_MACVIM) \
|
||||
|| defined(FEAT_GUI_PHOTON) \
|
||||
|| defined(FEAT_TERM_POPUP_MENU)
|
||||
# define USE_POPUP_SETPOS
|
||||
# define NEED_VCOL2COL
|
||||
|
||||
@@ -533,7 +533,7 @@ do_mouse(
|
||||
if (gui.in_use)
|
||||
{
|
||||
# if defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_GTK) \
|
||||
|| defined(FEAT_GUI_PHOTON) || defined(FEAT_GUI_MAC)
|
||||
|| defined(FEAT_GUI_PHOTON)
|
||||
if (!is_click)
|
||||
// Ignore right button release events, only shows the popup
|
||||
// menu on the button down event.
|
||||
|
||||
@@ -713,9 +713,6 @@ EXTERN int p_lpl; // 'loadplugins'
|
||||
#if defined(DYNAMIC_LUA)
|
||||
EXTERN char_u *p_luadll; // 'luadll'
|
||||
#endif
|
||||
#ifdef FEAT_GUI_MAC
|
||||
EXTERN int p_macatsui; // 'macatsui'
|
||||
#endif
|
||||
#ifdef FEAT_GUI_MACVIM
|
||||
EXTERN int p_macligatures; // 'macligatures'
|
||||
EXTERN int p_macthinstrokes; // 'macthinstrokes'
|
||||
|
||||
+1
-6
@@ -1255,7 +1255,7 @@ static struct vimoption options[] =
|
||||
(char_u *)&p_go, PV_NONE,
|
||||
# if defined(FEAT_GUI_MACVIM)
|
||||
{(char_u *)"egmrL", (char_u *)0L}
|
||||
# elif defined(UNIX) && !defined(FEAT_GUI_MAC)
|
||||
# elif defined(UNIX)
|
||||
{(char_u *)"aegimrLtT", (char_u *)0L}
|
||||
# else
|
||||
{(char_u *)"egmrLtT", (char_u *)0L}
|
||||
@@ -1668,13 +1668,8 @@ static struct vimoption options[] =
|
||||
#endif
|
||||
SCTX_INIT},
|
||||
{"macatsui", NULL, P_BOOL|P_VI_DEF|P_RCLR,
|
||||
#ifdef FEAT_GUI_MAC
|
||||
(char_u *)&p_macatsui, PV_NONE,
|
||||
{(char_u *)TRUE, (char_u *)0L}
|
||||
#else
|
||||
(char_u *)NULL, PV_NONE,
|
||||
{(char_u *)"", (char_u *)0L}
|
||||
#endif
|
||||
SCTX_INIT},
|
||||
{"macligatures", NULL, P_BOOL|P_VI_DEF|P_RCLR,
|
||||
#ifdef FEAT_GUI_MACVIM
|
||||
|
||||
@@ -20,25 +20,6 @@
|
||||
# include <AvailabilityMacros.h>
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Macintosh machine-dependent things.
|
||||
*
|
||||
* Include the Mac header files, unless also compiling with X11 (the header
|
||||
* files have many conflicts).
|
||||
*/
|
||||
#ifdef FEAT_GUI_MAC
|
||||
# include <Quickdraw.h> // Apple calls it QuickDraw.h...
|
||||
# include <ToolUtils.h>
|
||||
# include <LowMem.h>
|
||||
# include <Scrap.h>
|
||||
# include <Sound.h>
|
||||
# include <TextUtils.h>
|
||||
# include <Memory.h>
|
||||
# include <OSUtils.h>
|
||||
# include <Files.h>
|
||||
# include <Script.h>
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Unix interface
|
||||
*/
|
||||
|
||||
+1
-1
@@ -17,7 +17,7 @@
|
||||
|
||||
#include "vim.h"
|
||||
|
||||
#if !defined(FEAT_GUI_MAC) && !defined(PROTO)
|
||||
#if !defined(PROTO)
|
||||
# include <CoreServices/CoreServices.h>
|
||||
#endif
|
||||
|
||||
|
||||
+1
-1
@@ -33,7 +33,7 @@
|
||||
* gui_mac.c are used then. TODO: remove those instead?
|
||||
* But for MacVim we do need these ones.
|
||||
*/
|
||||
#if defined(FEAT_CLIPBOARD) && (!defined(FEAT_GUI_ENABLED) || defined(FEAT_GUI_MACVIM))
|
||||
#if defined(FEAT_CLIPBOARD) && (!defined(FEAT_GUI_ENABLED))
|
||||
|
||||
/* Used to identify clipboard data copied from Vim. */
|
||||
|
||||
|
||||
+2
-2
@@ -2194,7 +2194,7 @@ mch_settitle(char_u *title, char_u *icon)
|
||||
if (get_x11_windis() == OK)
|
||||
type = 1;
|
||||
#else
|
||||
# if defined(FEAT_GUI_PHOTON) || defined(FEAT_GUI_MAC) \
|
||||
# if defined(FEAT_GUI_PHOTON) \
|
||||
|| defined(FEAT_GUI_MACVIM) \
|
||||
|| defined(FEAT_GUI_GTK) || defined(FEAT_GUI_HAIKU)
|
||||
if (gui.in_use)
|
||||
@@ -2231,7 +2231,7 @@ mch_settitle(char_u *title, char_u *icon)
|
||||
#endif
|
||||
#if defined(FEAT_GUI_GTK) || defined(FEAT_GUI_HAIKU) \
|
||||
|| defined(FEAT_GUI_MACVIM) \
|
||||
|| defined(FEAT_GUI_PHOTON) || defined(FEAT_GUI_MAC)
|
||||
|| defined(FEAT_GUI_PHOTON)
|
||||
else
|
||||
gui_mch_settitle(title, icon);
|
||||
#endif
|
||||
|
||||
+26
-11
@@ -1134,6 +1134,7 @@ popup_adjust_position(win_T *wp)
|
||||
int wantline = wp->w_wantline; // adjusted for textprop
|
||||
int wantcol = wp->w_wantcol; // adjusted for textprop
|
||||
int use_wantcol = wantcol != 0;
|
||||
int adjust_height_for_top_aligned = FALSE;
|
||||
|
||||
wp->w_winrow = 0;
|
||||
wp->w_wincol = 0;
|
||||
@@ -1483,16 +1484,7 @@ popup_adjust_position(win_T *wp)
|
||||
// Not enough space and more space on the other side: make top
|
||||
// aligned.
|
||||
wp->w_winrow = (wantline < 0 ? 0 : wantline) + 1;
|
||||
if (wp->w_winrow + wp->w_height + extra_height >= Rows)
|
||||
{
|
||||
wp->w_height = Rows - wp->w_winrow - extra_height;
|
||||
if (wp->w_want_scrollbar
|
||||
#ifdef FEAT_TERMINAL
|
||||
&& wp->w_buffer->b_term == NULL
|
||||
#endif
|
||||
)
|
||||
wp->w_has_scrollbar = TRUE;
|
||||
}
|
||||
adjust_height_for_top_aligned = TRUE;
|
||||
}
|
||||
}
|
||||
else if (wp->w_popup_pos == POPPOS_TOPRIGHT
|
||||
@@ -1513,9 +1505,25 @@ popup_adjust_position(win_T *wp)
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
wp->w_winrow = wantline - 1;
|
||||
adjust_height_for_top_aligned = TRUE;
|
||||
}
|
||||
}
|
||||
// make sure w_window is valid
|
||||
|
||||
if (adjust_height_for_top_aligned && wp->w_want_scrollbar
|
||||
&& wp->w_winrow + wp->w_height + extra_height > Rows)
|
||||
{
|
||||
// Bottom of the popup goes below the last line, reduce the height and
|
||||
// add a scrollbar.
|
||||
wp->w_height = Rows - wp->w_winrow - extra_height;
|
||||
#ifdef FEAT_TERMINAL
|
||||
if (wp->w_buffer->b_term == NULL)
|
||||
#endif
|
||||
wp->w_has_scrollbar = TRUE;
|
||||
}
|
||||
|
||||
// make sure w_winrow is valid
|
||||
if (wp->w_winrow >= Rows)
|
||||
wp->w_winrow = Rows - 1;
|
||||
else if (wp->w_winrow < 0)
|
||||
@@ -3201,7 +3209,14 @@ popup_do_filter(int c)
|
||||
res = invoke_popup_filter(wp, c);
|
||||
|
||||
if (must_redraw > was_must_redraw)
|
||||
{
|
||||
int save_got_int = got_int;
|
||||
|
||||
// Reset got_int to avoid a function used in the statusline aborts.
|
||||
got_int = FALSE;
|
||||
redraw_after_callback(FALSE);
|
||||
got_int |= save_got_int;
|
||||
}
|
||||
recursive = FALSE;
|
||||
KeyTyped = save_KeyTyped;
|
||||
return res;
|
||||
|
||||
@@ -323,9 +323,6 @@ extern char *vim_SelFile(Widget toplevel, char *prompt, char *init_path, int (*s
|
||||
# ifdef FEAT_GUI_HAIKU
|
||||
# include "gui_haiku.pro"
|
||||
# endif
|
||||
# ifdef FEAT_GUI_MAC
|
||||
# include "gui_mac.pro"
|
||||
# endif
|
||||
# ifdef FEAT_GUI_MACVIM
|
||||
# include "gui_macvim.pro"
|
||||
# endif
|
||||
|
||||
@@ -1,153 +0,0 @@
|
||||
/* gui_mac.c */
|
||||
|
||||
/*
|
||||
* Mac specific prototypes
|
||||
*/
|
||||
|
||||
pascal Boolean WaitNextEventWrp(EventMask eventMask, EventRecord *theEvent, UInt32 sleep, RgnHandle mouseRgn);
|
||||
pascal void gui_mac_scroll_action(ControlHandle theControl, short partCode);
|
||||
pascal void gui_mac_drag_thumb (ControlHandle theControl, short partCode);
|
||||
void gui_mac_handle_event(EventRecord *event);
|
||||
void gui_mac_doMouseDown(EventRecord *theEvent);
|
||||
void gui_mac_do_key(EventRecord *theEvent);
|
||||
void gui_mac_handle_menu(long menuChoice);
|
||||
void gui_mac_focus_change(EventRecord *event);
|
||||
void gui_mac_update(EventRecord *event);
|
||||
short gui_mch_get_mac_menu_item_index(vimmenu_T *menu, vimmenu_T *parent);
|
||||
int gui_mch_is_blinking(void);
|
||||
int gui_mch_is_blink_off(void);
|
||||
void gui_mch_set_blinking(long wait, long on, long off);
|
||||
void gui_mch_stop_blink(int may_call_gui_update_cursor);
|
||||
void gui_mch_start_blink(void);
|
||||
void gui_mch_getmouse(int *x, int *y);
|
||||
void gui_mch_setmouse(int x, int y);
|
||||
void gui_mch_prepare(int *argc, char **argv);
|
||||
int gui_mch_init_check(void);
|
||||
int gui_mch_init(void);
|
||||
void gui_mch_new_colors(void);
|
||||
int gui_mch_open(void);
|
||||
void gui_mch_exit(int);
|
||||
void gui_mch_set_winsize(int width, int height, int min_width, int min_height, int base_width, int base_height);
|
||||
int gui_mch_get_winpos(int *x, int *y);
|
||||
void gui_mch_set_winpos(int x, int y);
|
||||
void gui_mch_set_shellsize(int width, int height, int min_width, int min_height, int base_width, int base_height, int direction);
|
||||
void gui_mch_get_screen_dimensions(int *screen_w, int *screen_h);
|
||||
void gui_mch_set_text_area_pos(int x, int y, int w, int h);
|
||||
void gui_mch_enable_scrollbar(scrollbar_T *sb, int flag);
|
||||
void gui_mch_set_scrollbar_thumb(scrollbar_T *sb, long val, long size, long max);
|
||||
void gui_mch_set_scrollbar_pos(scrollbar_T *sb, int x, int y, int w, int h);
|
||||
int gui_mch_get_scrollbar_xpadding(void);
|
||||
int gui_mch_get_scrollbar_ypadding(void);
|
||||
void gui_mch_create_scrollbar(scrollbar_T *sb, int orient);
|
||||
void gui_mch_destroy_scrollbar(scrollbar_T *sb);
|
||||
int gui_mch_adjust_charheight(void);
|
||||
int gui_mch_init_font(char_u *font_name, int fontset);
|
||||
GuiFont gui_mch_get_font(char_u *name, int giveErrorIfMissing);
|
||||
char_u *gui_mch_get_fontname(GuiFont font, char_u *name);
|
||||
GuiFont gui_mac_find_font(char_u *font_name);
|
||||
void gui_mch_set_font(GuiFont font);
|
||||
int gui_mch_same_font(GuiFont f1, GuiFont f2);
|
||||
void gui_mch_free_font(GuiFont font);
|
||||
guicolor_T gui_mch_get_color(char_u *name);
|
||||
guicolor_T gui_mch_get_rgb_color(int r, int g, int b);
|
||||
void gui_mch_set_fg_color(guicolor_T color);
|
||||
void gui_mch_set_bg_color(guicolor_T color);
|
||||
void gui_mch_set_sp_color(guicolor_T color);
|
||||
void gui_mch_draw_string(int row, int col, char_u *s, int len, int flags);
|
||||
int gui_mch_haskey(char_u *name);
|
||||
void gui_mch_beep(void);
|
||||
void gui_mch_flash(int msec);
|
||||
void gui_mch_invert_rectangle(int r, int c, int nr, int nc);
|
||||
void gui_mch_iconify(void);
|
||||
void gui_mch_settitle(char_u *title, char_u *icon);
|
||||
void gui_mch_draw_hollow_cursor(guicolor_T color);
|
||||
void gui_mch_draw_part_cursor(int w, int h, guicolor_T color);
|
||||
void gui_mch_update(void);
|
||||
int gui_mch_wait_for_chars(int wtime);
|
||||
void gui_mch_flush(void);
|
||||
void gui_mch_clear_block(int row1, int col1, int row2, int col2);
|
||||
void gui_mch_clear_all(void);
|
||||
void gui_mch_delete_lines(int row, int num_lines);
|
||||
void gui_mch_insert_lines(int row, int num_lines);
|
||||
void gui_mch_enable_menu(int flag);
|
||||
void gui_mch_set_menu_pos(int x, int y, int w, int h);
|
||||
/*void gui_mch_add_menu(vimmenu_T *menu, vimmenu_T *parent, int idx);*/
|
||||
void gui_mch_add_menu(vimmenu_T *menu, int pos);
|
||||
/*void gui_mch_add_menu_item(vimmenu_T *menu, vimmenu_T *parent, int idx);*/
|
||||
void gui_mch_add_menu_item(vimmenu_T *menu, int idx);
|
||||
void gui_mch_show_popupmenu(vimmenu_T *menu);
|
||||
void gui_mch_destroy_menu(vimmenu_T *menu);
|
||||
void gui_mch_menu_grey(vimmenu_T *menu, int grey);
|
||||
void gui_mch_menu_hidden(vimmenu_T *menu, int hidden);
|
||||
void gui_mch_draw_menubar(void);
|
||||
int gui_mch_get_lightness(guicolor_T pixel);
|
||||
guicolor_T gui_mch_get_rgb(guicolor_T pixel);
|
||||
int gui_mch_get_mouse_x(void);
|
||||
int gui_mch_get_mouse_y(void);
|
||||
void gui_mch_setmouse(int x, int y);
|
||||
void gui_mch_show_popupmenu(vimmenu_T *menu);
|
||||
int gui_mch_dialog(int type, char_u *title, char_u *message, char_u *buttons, int dfltbutton, char_u *textfield, int ex_cmd);
|
||||
char_u *gui_mch_browse(int saving, char_u *title, char_u *dflt, char_u *ext, char_u *initdir, char_u *filter);
|
||||
void gui_mch_set_foreground(void);
|
||||
void gui_mch_show_tabline(int showit);
|
||||
int gui_mch_showing_tabline(void);
|
||||
void gui_mch_update_tabline(void);
|
||||
void gui_mch_set_curtab(int nr);
|
||||
|
||||
char_u *C2Pascal_save(char_u *Cstring);
|
||||
char_u *C2Pascal_save_and_remove_backslash(char_u *Cstring);
|
||||
int_u EventModifiers2VimMouseModifiers(EventModifiers macModifiers);
|
||||
char_u **new_fnames_from_AEDesc(AEDesc *theList, long *numFiles, OSErr *error);
|
||||
|
||||
|
||||
void gui_request_selection(void);
|
||||
void gui_mch_lose_selection(void);
|
||||
int gui_mch_own_selection(void);
|
||||
void gui_mch_clear_selection(void);
|
||||
|
||||
void gui_win_new_height(win_T *wp);
|
||||
void gui_win_comp_pos(void);
|
||||
void gui_win_free(win_T *wp);
|
||||
void gui_win_alloc(win_T *wp);
|
||||
void mch_post_buffer_write (buf_T *buf);
|
||||
|
||||
void mch_errmsg(char *str);
|
||||
void mch_display_error(void);
|
||||
void clip_mch_lose_selection(Clipboard_T *cbd);
|
||||
void clip_mch_request_selection(Clipboard_T *cbd);
|
||||
void clip_mch_set_selection(Clipboard_T *cbd);
|
||||
int clip_mch_own_selection(Clipboard_T *cbd);
|
||||
|
||||
pascal OSErr FindProcessBySignature( const OSType targetType,
|
||||
const OSType targetCreator, ProcessSerialNumberPtr psnPtr );
|
||||
OSErr InstallAEHandlers (void);
|
||||
pascal OSErr HandleODocAE (const AppleEvent *theAEvent, AppleEvent *theReply, long refCon);
|
||||
pascal OSErr Handle_aevt_oapp_AE (const AppleEvent *theAEvent, AppleEvent *theReply, long refCon);
|
||||
pascal OSErr Handle_aevt_quit_AE (const AppleEvent *theAEvent, AppleEvent *theReply, long refCon);
|
||||
pascal OSErr Handle_aevt_pdoc_AE (const AppleEvent *theAEvent, AppleEvent *theReply, long refCon);
|
||||
pascal OSErr Handle_unknown_AE (const AppleEvent *theAEvent, AppleEvent *theReply, long refCon);
|
||||
/* Shoulde we return MenuItemIndex? IMO yes, I did that for 5.7 ak*/
|
||||
short gui_mac_get_menu_item_index (vimmenu_T *pMenu);
|
||||
|
||||
pascal OSErr Handle_KAHL_SRCH_AE (const AppleEvent *theAEvent, AppleEvent *theReply, long refCon);
|
||||
pascal OSErr Handle_KAHL_MOD_AE (const AppleEvent *theAEvent, AppleEvent *theReply, long refCon);
|
||||
pascal OSErr Handle_KAHL_GTTX_AE (const AppleEvent *theAEvent, AppleEvent *theReply, long refCon);
|
||||
void Send_KAHL_MOD_AE (buf_T *buf);
|
||||
|
||||
void gui_mac_doInContentClick(EventRecord *theEvent, WindowPtr whichWindow);
|
||||
void gui_mac_doInDragClick(Point where, WindowPtr whichWindow);
|
||||
void gui_mac_doInGrowClick(Point where, WindowPtr whichWindow);
|
||||
void gui_mac_doUpdateEvent(EventRecord *event);
|
||||
void gui_mac_doActivateEvent(EventRecord *event);
|
||||
void gui_mac_doSuspendEvent(EventRecord *event);
|
||||
void gui_mac_doKeyEvent(EventRecord *theEvent);
|
||||
void gui_mac_doMouseDownEvent(EventRecord *theEvent);
|
||||
void gui_mac_doMouseMovedEvent(EventRecord *event);
|
||||
void gui_mac_doMouseUpEvent(EventRecord *theEvent);
|
||||
void gui_mch_mousehide(int hide);
|
||||
|
||||
int C2PascalString (char_u *CString, Str255 *PascalString);
|
||||
int GetFSSpecFromPath ( char_u *file, FSSpec *fileFSSpec);
|
||||
char_u *FullPathFromFSSpec_save (FSSpec file);
|
||||
|
||||
/* vim: set ft=c : */
|
||||
@@ -2533,9 +2533,6 @@ struct file_buffer
|
||||
dev_t b_dev; // device number
|
||||
ino_t b_ino; // inode number
|
||||
#endif
|
||||
#ifdef FEAT_CW_EDITOR
|
||||
FSSpec b_FSSpec; // MacOS File Identification
|
||||
#endif
|
||||
#ifdef VMS
|
||||
char b_fab_rfm; // Record format
|
||||
char b_fab_rat; // Record attribute
|
||||
@@ -3802,15 +3799,6 @@ struct VimMenu
|
||||
BPictureButton *button;
|
||||
# endif
|
||||
#endif
|
||||
#ifdef FEAT_GUI_MAC
|
||||
// MenuHandle id;
|
||||
// short index; // the item index within the father menu
|
||||
short menu_id; // the menu id to which this item belongs
|
||||
short submenu_id; // the menu id of the children (could be
|
||||
// get through some tricks)
|
||||
MenuHandle menu_handle;
|
||||
MenuHandle submenu_handle;
|
||||
#endif
|
||||
#ifdef FEAT_GUI_PHOTON
|
||||
PtWidget_t *id;
|
||||
PtWidget_t *submenu_id;
|
||||
|
||||
@@ -10,24 +10,6 @@ NO_INITS = -U NONE $(NO_PLUGINS)
|
||||
# The first script creates small.vim.
|
||||
SCRIPTS_FIRST = test1.out
|
||||
|
||||
# Tests that run on all systems.
|
||||
SCRIPTS_ALL =
|
||||
|
||||
# Tests that run on most systems, but not on Amiga.
|
||||
SCRIPTS_MORE1 =
|
||||
|
||||
# Tests that run on most systems, but not on Amiga and DOS/Windows.
|
||||
SCRIPTS_MORE2 = test49.out
|
||||
|
||||
# Tests that run on most systems, but not on VMS
|
||||
SCRIPTS_MORE4 =
|
||||
|
||||
# Tests specifically for MS-Windows.
|
||||
SCRIPTS_WIN32 =
|
||||
|
||||
# Tests for the GUI.
|
||||
SCRIPTS_GUI =
|
||||
|
||||
# Tests for Vim9 script.
|
||||
TEST_VIM9 = \
|
||||
test_vim9_cmd \
|
||||
|
||||
@@ -9,14 +9,9 @@ default: nongui
|
||||
|
||||
include Make_all.mak
|
||||
|
||||
SCRIPTS = $(SCRIPTS_ALL) $(SCRIPTS_MORE4)
|
||||
.SUFFIXES: .in .out .res .vim
|
||||
|
||||
# Must run test1 first to create small.vim.
|
||||
$(SCRIPTS) $(SCRIPTS_GUI) $(NEW_TESTS_RES): $(SCRIPTS_FIRST)
|
||||
|
||||
.SUFFIXES: .in .out
|
||||
|
||||
nongui: /tmp $(SCRIPTS_FIRST) $(SCRIPTS)
|
||||
nongui: /tmp $(SCRIPTS_FIRST)
|
||||
csh -c echo ALL DONE
|
||||
|
||||
clean:
|
||||
|
||||
@@ -9,25 +9,20 @@ default: nongui
|
||||
|
||||
!include Make_all.mak
|
||||
|
||||
# Omitted:
|
||||
# test49 fails in various ways
|
||||
|
||||
SCRIPTS = $(SCRIPTS_ALL) $(SCRIPTS_MORE1) $(SCRIPTS_MORE4)
|
||||
|
||||
TEST_OUTFILES = $(SCRIPTS_FIRST) $(SCRIPTS) $(SCRIPTS_WIN32) $(SCRIPTS_GUI)
|
||||
TEST_OUTFILES = $(SCRIPTS_FIRST)
|
||||
DOSTMP = dostmp
|
||||
DOSTMP_OUTFILES = $(TEST_OUTFILES:test=dostmp\test)
|
||||
DOSTMP_INFILES = $(DOSTMP_OUTFILES:.out=.in)
|
||||
|
||||
.SUFFIXES: .in .out .res .vim
|
||||
|
||||
nongui: nolog $(SCRIPTS_FIRST) $(SCRIPTS) newtests report
|
||||
nongui: nolog $(SCRIPTS_FIRST) newtests report
|
||||
|
||||
small: nolog report
|
||||
|
||||
gui: nolog $(SCRIPTS_FIRST) $(SCRIPTS) $(SCRIPTS_GUI) newtests report
|
||||
gui: nolog $(SCRIPTS_FIRST) newtests report
|
||||
|
||||
win32: nolog $(SCRIPTS_FIRST) $(SCRIPTS) $(SCRIPTS_WIN32) newtests report
|
||||
win32: nolog $(SCRIPTS_FIRST) newtests report
|
||||
|
||||
# Copy the input files to dostmp, changing the fileformat to dos.
|
||||
$(DOSTMP_INFILES): $(*B).in
|
||||
|
||||
@@ -28,19 +28,17 @@ default: vimall
|
||||
|
||||
include Make_all.mak
|
||||
|
||||
SCRIPTS = $(SCRIPTS_ALL) $(SCRIPTS_MORE1) $(SCRIPTS_MORE4) $(SCRIPTS_WIN32)
|
||||
|
||||
SCRIPTS_BENCH = test_bench_regexp.res
|
||||
|
||||
# Must run test1 first to create small.vim.
|
||||
$(SCRIPTS) $(SCRIPTS_GUI) $(SCRIPTS_WIN32) $(NEW_TESTS_RES): $(SCRIPTS_FIRST)
|
||||
$(NEW_TESTS_RES): $(SCRIPTS_FIRST)
|
||||
|
||||
.SUFFIXES: .in .out .res .vim
|
||||
|
||||
vimall: fixff $(SCRIPTS_FIRST) $(SCRIPTS) $(SCRIPTS_GUI) $(SCRIPTS_WIN32) newtests
|
||||
vimall: fixff $(SCRIPTS_FIRST) newtests
|
||||
@echo ALL DONE
|
||||
|
||||
nongui: fixff nolog $(SCRIPTS_FIRST) $(SCRIPTS) newtests
|
||||
nongui: fixff nolog $(SCRIPTS_FIRST) newtests
|
||||
@echo ALL DONE
|
||||
|
||||
benchmark: $(SCRIPTS_BENCH)
|
||||
@@ -48,10 +46,10 @@ benchmark: $(SCRIPTS_BENCH)
|
||||
small: nolog
|
||||
@echo ALL DONE
|
||||
|
||||
gui: fixff nolog $(SCRIPTS_FIRST) $(SCRIPTS) $(SCRIPTS_GUI) newtests
|
||||
gui: fixff nolog $(SCRIPTS_FIRST) newtests
|
||||
@echo ALL DONE
|
||||
|
||||
win32: fixff nolog $(SCRIPTS_FIRST) $(SCRIPTS) $(SCRIPTS_WIN32) newtests
|
||||
win32: fixff nolog $(SCRIPTS_FIRST) newtests
|
||||
@echo ALL DONE
|
||||
|
||||
# TODO: find a way to avoid changing the distributed files.
|
||||
@@ -88,19 +86,6 @@ test1.out: test1.in
|
||||
-@if exist test.out $(DEL) test.out
|
||||
-@if exist viminfo $(DEL) viminfo
|
||||
|
||||
.in.out:
|
||||
-@if exist $*.ok $(CP) $*.ok test.ok
|
||||
$(VIMPROG) -u dos.vim $(NO_INITS) -s dotest.in $*.in
|
||||
@diff test.out $*.ok
|
||||
-@if exist $*.out $(DEL) $*.out
|
||||
@$(MV) test.out $*.out
|
||||
-@if exist Xdir1 $(DELDIR) Xdir1
|
||||
-@if exist Xfind $(DELDIR) Xfind
|
||||
-@if exist XfakeHOME $(DELDIR) XfakeHOME
|
||||
-@if exist X* $(DEL) X*
|
||||
-@if exist test.ok $(DEL) test.ok
|
||||
-@if exist viminfo $(DEL) viminfo
|
||||
|
||||
nolog:
|
||||
-@if exist test.log $(DEL) test.log
|
||||
-@if exist messages $(DEL) messages
|
||||
|
||||
@@ -27,26 +27,6 @@
|
||||
# Uncomment if you want tests in GUI mode. Terminal mode is default.
|
||||
# WANT_GUI = YES
|
||||
|
||||
# Comment out if you want to run Unix specific tests as well, but please
|
||||
# be aware, that on OpenVMS will fail, because of cat, rm, etc commands
|
||||
# and directory handling.
|
||||
# WANT_UNIX = YES
|
||||
|
||||
# Comment out if you have gzip on your system
|
||||
# HAVE_GZIP = YES
|
||||
|
||||
# Comment out if you have GNU compatible diff on your system
|
||||
# HAVE_GDIFF = YES
|
||||
|
||||
# Comment out if you have ICONV support
|
||||
# HAVE_ICONV = YES
|
||||
|
||||
# Comment out if you have LUA support
|
||||
# HAVE_LUA = YES
|
||||
|
||||
# Comment out if you have PYTHON support
|
||||
# HAVE_PYTHON = YES
|
||||
|
||||
#######################################################################
|
||||
# End of configuration section.
|
||||
#
|
||||
@@ -57,16 +37,12 @@ VIMPROG = <->vim.exe
|
||||
|
||||
.SUFFIXES : .out .in
|
||||
|
||||
SCRIPT = test1.out test49.out test77a.out
|
||||
SCRIPT = test1.out test77a.out
|
||||
|
||||
.IFDEF WANT_GUI
|
||||
GUI_OPTION = -g
|
||||
.ENDIF
|
||||
|
||||
.IFDEF WANT_UNIX
|
||||
SCRIPT_UNIX = test49.out
|
||||
.ENDIF
|
||||
|
||||
.in.out :
|
||||
-@ !clean up before doing the test
|
||||
-@ if "''F$SEARCH("test.out.*")'" .NES. "" then delete/noconfirm/nolog test.out.*
|
||||
@@ -87,7 +63,7 @@ SCRIPT_UNIX = test49.out
|
||||
-@ if "''F$SEARCH("Xdotest.*")'" .NES. "" then delete/noconfirm/nolog Xdotest.*.*
|
||||
-@ if "''F$SEARCH("Xtest.*")'" .NES. "" then delete/noconfirm/nolog Xtest.*.*
|
||||
|
||||
all : clean nolog $(START_WITH) $(SCRIPT) $(SCRIPT_UNIX) nolog
|
||||
all : clean nolog $(START_WITH) $(SCRIPT) nolog
|
||||
-@ write sys$output " "
|
||||
-@ write sys$output "-----------------------------------------------"
|
||||
-@ write sys$output " All done"
|
||||
@@ -111,12 +87,6 @@ nolog :
|
||||
-@ write sys$output "-----------------------------------------------"
|
||||
-@ write sys$output "MAKE_VMS.MMS options:"
|
||||
-@ write sys$output " WANT_GUI = ""$(WANT_GUI)"" "
|
||||
-@ write sys$output " WANT_UNIX = ""$(WANT_UNIX)"" "
|
||||
-@ write sys$output " HAVE_GZIP = ""$(HAVE_GZIP)"" "
|
||||
-@ write sys$output " HAVE_GDIFF = ""$(HAVE_GDIFF)"" "
|
||||
-@ write sys$output " HAVE_ICONV = ""$(HAVE_ICONV)"" "
|
||||
-@ write sys$output " HAVE_LUA = ""$(HAVE_LUA)"" "
|
||||
-@ write sys$output " HAVE_PYTHON= ""$(HAVE_PYTHON)"" "
|
||||
-@ write sys$output "Default vimrc file is VMS.VIM:"
|
||||
-@ write sys$output "-----------------------------------------------"
|
||||
-@ type VMS.VIM
|
||||
|
||||
+5
-45
@@ -23,28 +23,19 @@ REDIR_TEST_TO_NULL = --cmd 'au SwapExists * let v:swapchoice = "e"' > /dev/null
|
||||
default: nongui
|
||||
|
||||
# The list of tests is common to all systems.
|
||||
# This defines NEW_TESTS, NEW_TESTS_RES, SCRIPTS_ALL, SCRIPTS_MORE* and
|
||||
# SCRIPTS_GUI.
|
||||
# This defines SCRIPTS_FIRST, NEW_TESTS and NEW_TESTS_RES
|
||||
include Make_all.mak
|
||||
|
||||
|
||||
SCRIPTS = $(SCRIPTS_ALL) \
|
||||
$(SCRIPTS_MORE1) \
|
||||
$(SCRIPTS_MORE2) \
|
||||
$(SCRIPTS_MORE4)
|
||||
|
||||
# Explicit dependencies.
|
||||
test49.out: test49.vim
|
||||
|
||||
test_options.res test_alot.res: opt_test.vim
|
||||
|
||||
SCRIPTS_BENCH = test_bench_regexp.res
|
||||
|
||||
.SUFFIXES: .in .out .res .vim
|
||||
|
||||
nongui: nolog $(SCRIPTS_FIRST) $(SCRIPTS) newtests report
|
||||
nongui: nolog $(SCRIPTS_FIRST) newtests report
|
||||
|
||||
gui: nolog $(SCRIPTS_FIRST) $(SCRIPTS) $(SCRIPTS_GUI) newtests report
|
||||
gui: nolog $(SCRIPTS_FIRST) newtests report
|
||||
|
||||
benchmark: $(SCRIPTS_BENCH)
|
||||
|
||||
@@ -63,10 +54,10 @@ report:
|
||||
else echo ALL DONE; \
|
||||
fi"
|
||||
|
||||
$(SCRIPTS_FIRST) $(SCRIPTS) $(SCRIPTS_GUI) $(NEW_TESTS_RES): $(VIMPROG)
|
||||
$(SCRIPTS_FIRST) $(NEW_TESTS_RES): $(VIMPROG)
|
||||
|
||||
# Must run test1 first to create small.vim.
|
||||
$(SCRIPTS) $(SCRIPTS_GUI) $(NEW_TESTS_RES): $(SCRIPTS_FIRST)
|
||||
$(NEW_TESTS_RES): $(SCRIPTS_FIRST)
|
||||
|
||||
|
||||
# Execute an individual new style test, e.g.:
|
||||
@@ -116,37 +107,6 @@ test1.out: test1.in
|
||||
echo; exit 1; fi"
|
||||
-rm -rf X* viminfo
|
||||
|
||||
.in.out:
|
||||
-rm -rf $*.failed test.ok $(RM_ON_RUN)
|
||||
cp $*.ok test.ok
|
||||
# Sleep a moment to avoid that the xterm title is messed up.
|
||||
# 200 msec is sufficient, but only modern sleep supports a fraction of
|
||||
# a second, fall back to a second if it fails.
|
||||
@-/bin/sh -c "sleep .2 > /dev/null 2>&1 || sleep 1"
|
||||
$(RUN_VIM) $*.in $(REDIR_TEST_TO_NULL)
|
||||
|
||||
# For flaky tests retry one time. No tests at the moment.
|
||||
#@/bin/sh -c "if test -f test.out -a $* = test61; then \
|
||||
# if diff test.out $*.ok; \
|
||||
# then echo flaky test ok first time; \
|
||||
# else rm -rf $*.failed $(RM_ON_RUN); \
|
||||
# $(RUN_VIM) $*.in; \
|
||||
# fi \
|
||||
# fi"
|
||||
|
||||
# Check if the test.out file matches test.ok.
|
||||
@/bin/sh -c "if test -f test.out; then \
|
||||
if diff test.out $*.ok; \
|
||||
then mv -f test.out $*.out; \
|
||||
else echo $* FAILED >>test.log; mv -f test.out $*.failed; \
|
||||
fi \
|
||||
else echo $* NO OUTPUT >>test.log; \
|
||||
fi"
|
||||
@/bin/sh -c "if test -f valgrind; then\
|
||||
mv -f valgrind valgrind.$*; \
|
||||
fi"
|
||||
-rm -rf X* test.ok viminfo
|
||||
|
||||
nolog:
|
||||
-rm -f test.log messages
|
||||
|
||||
|
||||
@@ -4,14 +4,6 @@ For testing an indent script see runtime/indent/testdir/README.txt.
|
||||
If it makes sense, add a new test method to an already existing file. You may
|
||||
want to separate it from other tests with comment lines.
|
||||
|
||||
The numbered tests are older, we have switched to named tests. Don't add any
|
||||
more numbered tests.
|
||||
|
||||
And then you can choose between a new style test, which is a Vim script, or an
|
||||
old style test, which uses Normal mode commands. Use a new style test if you
|
||||
can. Use an old style test when it needs to run without the +eval feature.
|
||||
|
||||
|
||||
TO ADD A NEW STYLE TEST:
|
||||
|
||||
1) Create a test_<subject>.vim file.
|
||||
@@ -57,16 +49,3 @@ TO ADD A SCREEN DUMP TEST:
|
||||
Mostly the same as writing a new style test. Additionally, see help on
|
||||
"terminal-dumptest". Put the reference dump in "dumps/Test_func_name.dump".
|
||||
|
||||
|
||||
TO ADD AN OLD STYLE TEST:
|
||||
|
||||
1) Create test_<subject>.in and test_<subject>.ok files.
|
||||
2) Add test_<subject>.out to SCRIPTS_ALL in Make_all.mak in alphabetical order.
|
||||
3) Use make test_<subject>.out to run a single test in src/testdir/.
|
||||
Use make test_<subject> to run a single test in src/.
|
||||
4) Also add an entry in src/Makefile.
|
||||
|
||||
Keep in mind that the files are used as if everything was typed:
|
||||
- To add comments use: :" (that's an Ex command comment)
|
||||
- A line break is like pressing Enter. If that happens on the last line
|
||||
you'll hear a beep!
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
> +0&#ffffff0@36||+1&&| +0&&@36
|
||||
|~+0#4040ff13&| @35||+1#0000000&|~+0#4040ff13&| @35
|
||||
|~| @35||+1#0000000&|~+0#4040ff13&| @35
|
||||
|~| @35||+1#0000000&|~+0#4040ff13&| @35
|
||||
|~| @35||+1#0000000&|~+0#4040ff13&| @35
|
||||
|~| @35||+1#0000000&|~+0#4040ff13&| @35
|
||||
|~| @35||+1#0000000&|~+0#4040ff13&| @35
|
||||
|~| @35||+1#0000000&|~+0#4040ff13&| @35
|
||||
|[+3#0000000&|N|o| |N|a|m|e|]| @9|0|,|0|-|1| @9|A|l@1| |[+1&&|N|o| |N|a|m|e|]| @9|0|,|0|-|1| @9|A|l@1
|
||||
| +0&&@74
|
||||
@@ -3,10 +3,10 @@
|
||||
|-|║+0#0000001#ffd7ff255|t|w|o|║|-+0#0000000#ffffff0@1|║+0#0000001#ffd7ff255|t|w|o|║|-+0#0000000#ffffff0@8|║+0#0000001#ffd7ff255|b@2|║|-+0#0000000#ffffff0@15|║+0#0000001#ffd7ff255|t|w|o|║|-+0#0000000#ffffff0@11| @14
|
||||
|-|╚+0#0000001#ffd7ff255|═@2|╝|-+0#0000000#ffffff0@1|╚+0#0000001#ffd7ff255|═@2|╝|-+0#0000000#ffffff0@8|║+0#0000001#ffd7ff255|c@2|║|-+0#0000000#ffffff0@15|║+0#0000001#ffd7ff255|t|e@1|║|-+0#0000000#ffffff0@11| @14
|
||||
|-|@|-@5|#|-@5|%|-@5|║+0#0000001#ffd7ff255|d@2|║|-+0#0000000#ffffff0@15|║+0#0000001#ffd7ff255|f|o|u|║|-+0#0000000#ffffff0@1>*|-@8| @14
|
||||
|-@14|╔+0#0000001#ffd7ff255|═@2|╗|-+0#0000000#ffffff0@1|║+0#0000001#ffd7ff255|e@2|║|-+0#0000000#ffffff0@15|║+0#0000001#ffd7ff255|f|i|v|║|-+0#0000000#ffffff0@1|╔+0#0000001#ffd7ff255|═@2|╗|-+0#0000000#ffffff0@4| @14
|
||||
|-@14|║+0#0000001#ffd7ff255|o|n|e|║|-+0#0000000#ffffff0@1|╚+0#0000001#ffd7ff255|═@2|╝|-+0#0000000#ffffff0@15|╚+0#0000001#ffd7ff255|═@2|╝|-+0#0000000#ffffff0@1|║+0#0000001#ffd7ff255|a@2|║|-+0#0000000#ffffff0@4| @14
|
||||
|-@14|║+0#0000001#ffd7ff255|t|w|o|║|-+0#0000000#ffffff0@1|*|-@5|@|-@5|#|-@5|%|-@5|║+0#0000001#ffd7ff255|b@2|║|-+0#0000000#ffffff0@4| @14
|
||||
|-@14|║+0#0000001#ffd7ff255|t|e@1|║|-+0#0000000#ffffff0@8|╔+0#0000001#ffd7ff255|═@2|╗|-+0#0000000#ffffff0@1|╔+0#0000001#ffd7ff255|═@2|╗|-+0#0000000#ffffff0@8|║+0#0000001#ffd7ff255|c@2|║|-+0#0000000#ffffff0@4| @14
|
||||
|-@14|╚+0#0000001#ffd7ff255|═@2|╝|-+0#0000000#ffffff0@8|║+0#0000001#ffd7ff255|o|n|e|║|-+0#0000000#ffffff0@1|║+0#0000001#ffd7ff255|o|n|e|║|-+0#0000000#ffffff0@8|║+0#0000001#ffd7ff255|d@2|║|-+0#0000000#ffffff0@4| @14
|
||||
|-@28|║+0#0000001#ffd7ff255|t|w|o|║|-+0#0000000#ffffff0@1|║+0#0000001#ffd7ff255|t|w|o|║|-+0#0000000#ffffff0@8|║+0#0000001#ffd7ff255|e@2|║|-+0#0000000#ffffff0@4| @14
|
||||
@29|╚+0#0000001#ffd7ff255|═@2|╝| +0#0000000#ffffff0@1|║+0#0000001#ffd7ff255|t|e@1|║| +0#0000000#ffffff0@8|║+0#0000001#ffd7ff255|f@2|║| +0#0000000#ffffff0@1|5|,|5|1| @9|T|o|p|
|
||||
|-@14|╔+0#0000001#ffd7ff255|═@2|╗|-+0#0000000#ffffff0@1|║+0#0000001#ffd7ff255|e@2|║|-+0#0000000#ffffff0@15|║+0#0000001#ffd7ff255|f|i|v|║|-+0#0000000#ffffff0@1|╔+0#0000001#ffd7ff255|═@3|╗|-+0#0000000#ffffff0@3| @14
|
||||
|-@14|║+0#0000001#ffd7ff255|o|n|e|║|-+0#0000000#ffffff0@1|╚+0#0000001#ffd7ff255|═@2|╝|-+0#0000000#ffffff0@15|╚+0#0000001#ffd7ff255|═@2|╝|-+0#0000000#ffffff0@1|║+0#0000001#ffd7ff255|a@2| +0#0000000#0000001|║+0#0000001#ffd7ff255|-+0#0000000#ffffff0@3| @14
|
||||
|-@14|║+0#0000001#ffd7ff255|t|w|o|║|-+0#0000000#ffffff0@1|*|-@5|@|-@5|#|-@5|%|-@5|║+0#0000001#ffd7ff255|b@2| +0#0000000#0000001|║+0#0000001#ffd7ff255|-+0#0000000#ffffff0@3| @14
|
||||
|-@14|║+0#0000001#ffd7ff255|t|e@1|║|-+0#0000000#ffffff0@8|╔+0#0000001#ffd7ff255|═@2|╗|-+0#0000000#ffffff0@1|╔+0#0000001#ffd7ff255|═@3|╗|-+0#0000000#ffffff0@7|║+0#0000001#ffd7ff255|c@2| +0#0000000#0000001|║+0#0000001#ffd7ff255|-+0#0000000#ffffff0@3| @14
|
||||
|-@14|╚+0#0000001#ffd7ff255|═@2|╝|-+0#0000000#ffffff0@8|║+0#0000001#ffd7ff255|o|n|e|║|-+0#0000000#ffffff0@1|║+0#0000001#ffd7ff255|o|n|e| +0#0000000#0000001|║+0#0000001#ffd7ff255|-+0#0000000#ffffff0@7|║+0#0000001#ffd7ff255|d@2| +0#0000000#0000001|║+0#0000001#ffd7ff255|-+0#0000000#ffffff0@3| @14
|
||||
|-@28|║+0#0000001#ffd7ff255|t|w|o|║|-+0#0000000#ffffff0@1|║+0#0000001#ffd7ff255|t|w|o| +0#0000000#a8a8a8255|║+0#0000001#ffd7ff255|-+0#0000000#ffffff0@7|║+0#0000001#ffd7ff255|e@2| +0#0000000#a8a8a8255|║+0#0000001#ffd7ff255|-+0#0000000#ffffff0@3| @14
|
||||
@29|╚+0#0000001#ffd7ff255|═@2|╝| +0#0000000#ffffff0@1|╚+0#0000001#ffd7ff255|═@3|╝| +0#0000000#ffffff0@7|╚+0#0000001#ffd7ff255|═@3|╝| +0#0000000#ffffff0|5|,|5|1| @9|T|o|p|
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
|1+0&#ffffff0@8>1| @64
|
||||
|2@8|╔+0#0000001#ffd7ff255|═@8|╗| +0#0000000#ffffff0@54
|
||||
|3@8|║+0#0000001#ffd7ff255|o|n|e| @4| +0#0000000#0000001|║+0#0000001#ffd7ff255| +0#0000000#ffffff0@54
|
||||
|4@8|║+0#0000001#ffd7ff255|t|w|o| @4| +0#0000000#0000001|║+0#0000001#ffd7ff255| +0#0000000#ffffff0@54
|
||||
|5@8|║+0#0000001#ffd7ff255|t|h|r|e@1| @2| +0#0000000#0000001|║+0#0000001#ffd7ff255| +0#0000000#ffffff0@54
|
||||
|6@8|║+0#0000001#ffd7ff255|f|o|u|r| @3| +0#0000000#0000001|║+0#0000001#ffd7ff255| +0#0000000#ffffff0@54
|
||||
|7@8|║+0#0000001#ffd7ff255|f|i|v|e| @3| +0#0000000#a8a8a8255|║+0#0000001#ffd7ff255| +0#0000000#ffffff0@54
|
||||
|8@8|║+0#0000001#ffd7ff255|s|i|x| @4| +0#0000000#a8a8a8255|║+0#0000001#ffd7ff255| +0#0000000#ffffff0@54
|
||||
|9@8|║+0#0000001#ffd7ff255|s|e|v|e|n| @2| +0#0000000#a8a8a8255|║+0#0000001#ffd7ff255| +0#0000000#ffffff0@54
|
||||
|:|c|a|l@1| |S|h|o|╚+0#0000001#ffd7ff255|═@8|╝| +0#0000000#ffffff0@36|1|,|1|0| @9|T|o|p|
|
||||
@@ -1,32 +0,0 @@
|
||||
This is a test of the script language.
|
||||
|
||||
If after adding a new test, the test output doesn't appear properly in
|
||||
test49.failed, try to add one or more "G"s at the line ending in "test.out"
|
||||
|
||||
STARTTEST
|
||||
:so small.vim
|
||||
:se nocp nomore viminfo+=nviminfo
|
||||
:lang mess C
|
||||
:so test49.vim
|
||||
:" Go back to this file and append the results from register r.
|
||||
:buf test49.in
|
||||
G"rp:/^Results/,$w! test.out
|
||||
:"
|
||||
:" make valgrind happy
|
||||
:redir => funclist
|
||||
:silent func
|
||||
:redir END
|
||||
:for line in split(funclist, "\n")
|
||||
: let name = matchstr(line, 'function \zs[A-Z]\w*\ze(')
|
||||
: if name != ''
|
||||
: exe "delfunc " . name
|
||||
: endif
|
||||
:endfor
|
||||
:for v in keys(g:)
|
||||
: silent! exe "unlet " . v
|
||||
:endfor
|
||||
:unlet v
|
||||
:qa!
|
||||
ENDTEST
|
||||
|
||||
Results of test49.vim:
|
||||
@@ -1,26 +0,0 @@
|
||||
Results of test49.vim:
|
||||
*** Test 59: OK (2038431743)
|
||||
*** Test 60: OK (311511339)
|
||||
*** Test 62: OK (286331153)
|
||||
*** Test 63: OK (236978127)
|
||||
*** Test 64: OK (1499645335)
|
||||
*** Test 66: OK (5464)
|
||||
*** Test 67: OK (212514423)
|
||||
*** Test 68: OK (212514423)
|
||||
*** Test 76: OK (1610087935)
|
||||
*** Test 77: OK (1388671)
|
||||
*** Test 78: OK (134217728)
|
||||
*** Test 79: OK (70288929)
|
||||
*** Test 80: OK (17895765)
|
||||
*** Test 81: OK (387)
|
||||
*** Test 82: OK (8454401)
|
||||
*** Test 83: OK (2835)
|
||||
*** Test 84: OK (934782101)
|
||||
*** Test 85: OK (198689)
|
||||
--- Test 86: No Crash for vimgrep on BufUnload
|
||||
*** Test 86: OK (0)
|
||||
--- Test 88: All tests were run with throwing exceptions on error.
|
||||
The $VIMNOERRTHROW control is not configured.
|
||||
--- Test 88: All tests were run with throwing exceptions on interrupt.
|
||||
The $VIMNOINTTHROW control is not configured.
|
||||
*** Test 88: OK (50443995)
|
||||
File diff suppressed because it is too large
Load Diff
@@ -753,6 +753,7 @@ func Test_popup_with_mask()
|
||||
\ posinvert: 0,
|
||||
\ wrap: 0,
|
||||
\ fixed: 1,
|
||||
\ scrollbar: v:false,
|
||||
\ zindex: 90,
|
||||
\ padding: [],
|
||||
\ highlight: 'PopupColor',
|
||||
@@ -772,6 +773,7 @@ func Test_popup_with_mask()
|
||||
\ posinvert: 0,
|
||||
\ wrap: 0,
|
||||
\ fixed: 1,
|
||||
\ scrollbar: v:false,
|
||||
\ close: 'button',
|
||||
\ zindex: 90,
|
||||
\ padding: [],
|
||||
@@ -2169,6 +2171,11 @@ func Test_popup_too_high_scrollbar()
|
||||
call term_sendkeys(buf, ":call ShowPopup()\<CR>")
|
||||
call VerifyScreenDump(buf, 'Test_popupwin_toohigh_2', {})
|
||||
|
||||
call term_sendkeys(buf, ":call popup_clear()\<CR>")
|
||||
call term_sendkeys(buf, "gg$")
|
||||
call term_sendkeys(buf, ":call ShowPopup()\<CR>")
|
||||
call VerifyScreenDump(buf, 'Test_popupwin_toohigh_3', {})
|
||||
|
||||
" clean up
|
||||
call StopVimInTerminal(buf)
|
||||
call delete('XtestPopupToohigh')
|
||||
@@ -3472,6 +3479,31 @@ func Test_popupwin_filter_input_multibyte()
|
||||
unlet g:bytes
|
||||
endfunc
|
||||
|
||||
func Test_popupwin_filter_close_ctrl_c()
|
||||
CheckScreendump
|
||||
|
||||
let lines =<< trim END
|
||||
vsplit
|
||||
set laststatus=2
|
||||
set statusline=%!Statusline()
|
||||
|
||||
function Statusline() abort
|
||||
return '%<%f %h%m%r%=%-14.(%l,%c%V%) %P'
|
||||
endfunction
|
||||
|
||||
call popup_create('test test test test...', {'filter': {-> 0}})
|
||||
END
|
||||
call writefile(lines, 'XtestPopupCtrlC')
|
||||
|
||||
let buf = RunVimInTerminal('-S XtestPopupCtrlC', #{rows: 10})
|
||||
|
||||
call term_sendkeys(buf, "\<C-C>")
|
||||
call VerifyScreenDump(buf, 'Test_popupwin_ctrl_c', {})
|
||||
|
||||
call StopVimInTerminal(buf)
|
||||
call delete('XtestPopupCorners')
|
||||
endfunc
|
||||
|
||||
func Test_popupwin_atcursor_far_right()
|
||||
new
|
||||
|
||||
|
||||
@@ -5040,4 +5040,27 @@ func Test_lhelpgrep_from_help_window()
|
||||
new | only!
|
||||
endfunc
|
||||
|
||||
" Test for the crash fixed by 7.3.715
|
||||
func Test_setloclist_crash()
|
||||
%bw!
|
||||
let g:BufNum = bufnr()
|
||||
augroup QF_Test
|
||||
au!
|
||||
au BufUnload * call setloclist(0, [{'bufnr':g:BufNum, 'lnum':1, 'col':1, 'text': 'tango down'}])
|
||||
augroup END
|
||||
|
||||
try
|
||||
lvimgrep /.*/ *.mak
|
||||
catch /E926:/
|
||||
endtry
|
||||
call assert_equal('tango down', getloclist(0, {'items' : 0}).items[0].text)
|
||||
call assert_equal(1, getloclist(0, {'size' : 0}).size)
|
||||
|
||||
augroup QF_Test
|
||||
au!
|
||||
augroup END
|
||||
unlet g:BufNum
|
||||
%bw!
|
||||
endfunc
|
||||
|
||||
" vim: shiftwidth=2 sts=2 expandtab
|
||||
|
||||
@@ -784,6 +784,7 @@ func Test_lastused_tabpage()
|
||||
call assert_beeps('call feedkeys("g\<Tab>", "xt")')
|
||||
call assert_beeps('call feedkeys("\<C-Tab>", "xt")')
|
||||
call assert_beeps('call feedkeys("\<C-W>g\<Tab>", "xt")')
|
||||
call assert_fails('tabnext #', 'E475:')
|
||||
|
||||
" open four tab pages
|
||||
tabnew
|
||||
@@ -808,17 +809,41 @@ func Test_lastused_tabpage()
|
||||
call assert_equal(4, tabpagenr())
|
||||
call assert_equal(2, tabpagenr('#'))
|
||||
|
||||
" Test for :tabnext #
|
||||
tabnext #
|
||||
call assert_equal(2, tabpagenr())
|
||||
call assert_equal(4, tabpagenr('#'))
|
||||
|
||||
" Try to jump to a closed tab page
|
||||
tabclose 2
|
||||
tabclose #
|
||||
call assert_equal(0, tabpagenr('#'))
|
||||
call feedkeys("g\<Tab>", "xt")
|
||||
call assert_equal(3, tabpagenr())
|
||||
call assert_equal(2, tabpagenr())
|
||||
call feedkeys("\<C-Tab>", "xt")
|
||||
call assert_equal(3, tabpagenr())
|
||||
call assert_equal(2, tabpagenr())
|
||||
call feedkeys("\<C-W>g\<Tab>", "xt")
|
||||
call assert_equal(3, tabpagenr())
|
||||
call assert_equal(2, tabpagenr())
|
||||
call assert_fails('tabnext #', 'E475:')
|
||||
call assert_equal(2, tabpagenr())
|
||||
|
||||
tabclose!
|
||||
" Test for :tabonly #
|
||||
let wnum = win_getid()
|
||||
$tabnew
|
||||
tabonly #
|
||||
call assert_equal(wnum, win_getid())
|
||||
call assert_equal(1, tabpagenr('$'))
|
||||
|
||||
" Test for :tabmove #
|
||||
tabnew
|
||||
let wnum = win_getid()
|
||||
tabnew
|
||||
tabnew
|
||||
tabnext 2
|
||||
tabmove #
|
||||
call assert_equal(4, tabpagenr())
|
||||
call assert_equal(wnum, win_getid())
|
||||
|
||||
tabonly!
|
||||
endfunc
|
||||
|
||||
" vim: shiftwidth=2 sts=2 expandtab
|
||||
|
||||
@@ -706,7 +706,7 @@ def RetVoid()
|
||||
let x = 1
|
||||
enddef
|
||||
|
||||
def Test_expr4_vimscript()
|
||||
def Test_expr4_vim9script()
|
||||
# check line continuation
|
||||
let lines =<< trim END
|
||||
vim9script
|
||||
@@ -819,6 +819,12 @@ def Test_expr4_vimscript()
|
||||
echo 2!= 3
|
||||
END
|
||||
CheckScriptFailure(lines, 'E1004:')
|
||||
|
||||
lines =<< trim END
|
||||
vim9script
|
||||
echo len('xxx') == 3
|
||||
END
|
||||
CheckScriptSuccess(lines)
|
||||
enddef
|
||||
|
||||
func Test_expr4_fails()
|
||||
@@ -1738,7 +1744,7 @@ def Test_expr7_call()
|
||||
assert_equal('yes', 'yes'->Echo())
|
||||
assert_equal('yes', 'yes'
|
||||
->s:Echo4Arg())
|
||||
assert_equal(1, !range(5)->empty())
|
||||
assert_equal(true, !range(5)->empty())
|
||||
assert_equal([0, 1, 2], --3->range())
|
||||
|
||||
call CheckDefFailure(["let x = 'yes'->Echo"], 'E107:')
|
||||
@@ -1750,31 +1756,38 @@ enddef
|
||||
|
||||
|
||||
def Test_expr7_not()
|
||||
assert_equal(true, !'')
|
||||
assert_equal(true, ![])
|
||||
assert_equal(false, !'asdf')
|
||||
assert_equal(false, ![2])
|
||||
assert_equal(true, !!'asdf')
|
||||
assert_equal(true, !![2])
|
||||
let lines =<< trim END
|
||||
assert_equal(true, !'')
|
||||
assert_equal(true, ![])
|
||||
assert_equal(false, !'asdf')
|
||||
assert_equal(false, ![2])
|
||||
assert_equal(true, !!'asdf')
|
||||
assert_equal(true, !![2])
|
||||
|
||||
assert_equal(true, !test_null_partial())
|
||||
assert_equal(false, !{-> 'yes'})
|
||||
assert_equal(true, !test_null_partial())
|
||||
assert_equal(false, !{-> 'yes'})
|
||||
|
||||
assert_equal(true, !test_null_dict())
|
||||
assert_equal(true, !{})
|
||||
assert_equal(false, !{'yes': 'no'})
|
||||
assert_equal(true, !test_null_dict())
|
||||
assert_equal(true, !{})
|
||||
assert_equal(false, !{'yes': 'no'})
|
||||
|
||||
if has('channel')
|
||||
assert_equal(true, !test_null_job())
|
||||
assert_equal(true, !test_null_channel())
|
||||
endif
|
||||
if has('channel')
|
||||
assert_equal(true, !test_null_job())
|
||||
assert_equal(true, !test_null_channel())
|
||||
endif
|
||||
|
||||
assert_equal(true, !test_null_blob())
|
||||
assert_equal(true, !0z)
|
||||
assert_equal(false, !0z01)
|
||||
assert_equal(true, !test_null_blob())
|
||||
assert_equal(true, !0z)
|
||||
assert_equal(false, !0z01)
|
||||
|
||||
assert_equal(true, !test_void())
|
||||
assert_equal(true, !test_unknown())
|
||||
assert_equal(true, !test_void())
|
||||
assert_equal(true, !test_unknown())
|
||||
|
||||
assert_equal(false, ![1, 2, 3]->reverse())
|
||||
assert_equal(true, ![]->reverse())
|
||||
END
|
||||
CheckDefSuccess(lines)
|
||||
CheckScriptSuccess(['vim9script'] + lines)
|
||||
enddef
|
||||
|
||||
func Test_expr7_fails()
|
||||
|
||||
@@ -203,6 +203,15 @@ def Test_global_local_function()
|
||||
assert_equal('local', Func())
|
||||
END
|
||||
CheckScriptSuccess(lines)
|
||||
|
||||
lines =<< trim END
|
||||
vim9script
|
||||
def g:Funcy()
|
||||
echo 'funcy'
|
||||
enddef
|
||||
s:Funcy()
|
||||
END
|
||||
CheckScriptFailure(lines, 'E117:')
|
||||
enddef
|
||||
|
||||
func TakesOneArg(arg)
|
||||
|
||||
+2484
-1
File diff suppressed because it is too large
Load Diff
@@ -1,5 +1,13 @@
|
||||
" Utility functions for testing vim9 script
|
||||
|
||||
" Check that "lines" inside ":def" has no error.
|
||||
func CheckDefSuccess(lines)
|
||||
call writefile(['def Func()'] + a:lines + ['enddef', 'defcompile'], 'Xdef')
|
||||
so Xdef
|
||||
call Func()
|
||||
call delete('Xdef')
|
||||
endfunc
|
||||
|
||||
" Check that "lines" inside ":def" results in an "error" message.
|
||||
func CheckDefFailure(lines, error)
|
||||
call writefile(['def Func()'] + a:lines + ['enddef', 'defcompile'], 'Xdef')
|
||||
|
||||
+7
-3
@@ -686,7 +686,10 @@ get_func_tv(
|
||||
while (--argcount >= 0)
|
||||
clear_tv(&argvars[argcount]);
|
||||
|
||||
*arg = skipwhite(argp);
|
||||
if (in_vim9script())
|
||||
*arg = argp;
|
||||
else
|
||||
*arg = skipwhite(argp);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -2129,8 +2132,8 @@ call_func(
|
||||
char_u *p = untrans_function_name(rfname);
|
||||
|
||||
// If using Vim9 script try not local to the script.
|
||||
// TODO: should not do this if the name started with "s:".
|
||||
if (p != NULL)
|
||||
// Don't do this if the name starts with "s:".
|
||||
if (p != NULL && (funcname[0] != 's' || funcname[1] != ':'))
|
||||
fp = find_func(p, is_global, NULL);
|
||||
}
|
||||
|
||||
@@ -4097,6 +4100,7 @@ ex_call(exarg_T *eap)
|
||||
if (!failed || eap->cstack->cs_trylevel > 0)
|
||||
{
|
||||
// Check for trailing illegal characters and a following command.
|
||||
arg = skipwhite(arg);
|
||||
if (!ends_excmd2(eap->arg, arg))
|
||||
{
|
||||
if (!failed)
|
||||
|
||||
+27
-12
@@ -769,6 +769,30 @@ static char *(features[]) =
|
||||
|
||||
static int included_patches[] =
|
||||
{ /* Add new patch number below this line */
|
||||
/**/
|
||||
1424,
|
||||
/**/
|
||||
1423,
|
||||
/**/
|
||||
1422,
|
||||
/**/
|
||||
1421,
|
||||
/**/
|
||||
1420,
|
||||
/**/
|
||||
1419,
|
||||
/**/
|
||||
1418,
|
||||
/**/
|
||||
1417,
|
||||
/**/
|
||||
1416,
|
||||
/**/
|
||||
1415,
|
||||
/**/
|
||||
1414,
|
||||
/**/
|
||||
1413,
|
||||
/**/
|
||||
1412,
|
||||
/**/
|
||||
@@ -3948,20 +3972,11 @@ list_version(void)
|
||||
# if defined(MSWIN)
|
||||
msg_puts(_("with GUI."));
|
||||
# else
|
||||
# if defined(FEAT_GUI_MACVIM)
|
||||
# if defined(FEAT_GUI_MACVIM)
|
||||
msg_puts(_("with MacVim GUI."));
|
||||
# else
|
||||
# if defined(TARGET_API_MAC_CARBON) && TARGET_API_MAC_CARBON
|
||||
msg_puts(_("with Carbon GUI."));
|
||||
# else
|
||||
# if defined(TARGET_API_MAC_OSX) && TARGET_API_MAC_OSX
|
||||
msg_puts(_("with Cocoa GUI."));
|
||||
# else
|
||||
# endif
|
||||
# endif
|
||||
# endif
|
||||
# endif
|
||||
# endif
|
||||
# endif
|
||||
# endif
|
||||
# endif
|
||||
# endif
|
||||
# endif
|
||||
|
||||
@@ -97,7 +97,6 @@
|
||||
// Unless made through the Makefile enforce GUI on Mac
|
||||
#if defined(MACOS_X) && !defined(HAVE_CONFIG_H)
|
||||
# define UNIX
|
||||
# define FEAT_GUI_MAC
|
||||
#endif
|
||||
|
||||
#if defined(FEAT_GUI_MOTIF) \
|
||||
@@ -105,7 +104,6 @@
|
||||
|| defined(FEAT_GUI_ATHENA) \
|
||||
|| defined(FEAT_GUI_HAIKU) \
|
||||
|| defined(FEAT_GUI_MACVIM) \
|
||||
|| defined(FEAT_GUI_MAC) \
|
||||
|| defined(FEAT_GUI_MSWIN) \
|
||||
|| defined(FEAT_GUI_PHOTON)
|
||||
# define FEAT_GUI_ENABLED // also defined with NO_X11_INCLUDES
|
||||
@@ -2155,7 +2153,7 @@ typedef enum {
|
||||
// been seen at that stage. But it must be before globals.h, where error_ga
|
||||
// is declared.
|
||||
#if !defined(MSWIN) && !defined(FEAT_GUI_X11) && !defined(FEAT_GUI_HAIKU) \
|
||||
&& !defined(FEAT_GUI_GTK) && !defined(FEAT_GUI_MAC) && !defined(PROTO)
|
||||
&& !defined(FEAT_GUI_GTK) && !defined(PROTO)
|
||||
# define mch_errmsg(str) fprintf(stderr, "%s", (str))
|
||||
# define display_errors() fflush(stderr)
|
||||
# define mch_msg(str) printf("%s", (str))
|
||||
@@ -2165,8 +2163,7 @@ typedef enum {
|
||||
|
||||
# if defined(FEAT_EVAL) \
|
||||
&& (!defined(FEAT_GUI_MSWIN) \
|
||||
|| !(defined(FEAT_MBYTE_IME) || defined(GLOBAL_IME))) \
|
||||
&& !(defined(FEAT_GUI_MAC) && defined(MACOS_CONVERT))
|
||||
|| !(defined(FEAT_MBYTE_IME) || defined(GLOBAL_IME)))
|
||||
// Whether IME is supported by im_get_status() defined in mbyte.c.
|
||||
// For Win32 GUI it's in gui_w32.c when FEAT_MBYTE_IME or GLOBAL_IME is defined.
|
||||
// for Mac it is in gui_mac.c for the GUI or in os_mac_conv.c when
|
||||
@@ -2177,8 +2174,7 @@ typedef enum {
|
||||
#if defined(FEAT_XIM) \
|
||||
|| defined(IME_WITHOUT_XIM) \
|
||||
|| (defined(FEAT_GUI_MSWIN) \
|
||||
&& (defined(FEAT_MBYTE_IME) || defined(GLOBAL_IME))) \
|
||||
|| defined(FEAT_GUI_MAC)
|
||||
&& (defined(FEAT_MBYTE_IME) || defined(GLOBAL_IME)))
|
||||
// im_set_active() is available
|
||||
# define HAVE_INPUT_METHOD
|
||||
#endif
|
||||
|
||||
+36
-20
@@ -2723,11 +2723,12 @@ compile_get_register(char_u **arg, cctx_T *cctx)
|
||||
|
||||
/*
|
||||
* Apply leading '!', '-' and '+' to constant "rettv".
|
||||
* When "numeric_only" is TRUE do not apply '!'.
|
||||
*/
|
||||
static int
|
||||
apply_leader(typval_T *rettv, char_u *start, char_u *end)
|
||||
apply_leader(typval_T *rettv, int numeric_only, char_u *start, char_u **end)
|
||||
{
|
||||
char_u *p = end;
|
||||
char_u *p = *end;
|
||||
|
||||
// this works from end to start
|
||||
while (p > start)
|
||||
@@ -2762,6 +2763,11 @@ apply_leader(typval_T *rettv, char_u *start, char_u *end)
|
||||
rettv->vval.v_number = val;
|
||||
}
|
||||
}
|
||||
else if (numeric_only)
|
||||
{
|
||||
++p;
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
int v = tv2bool(rettv);
|
||||
@@ -2772,6 +2778,7 @@ apply_leader(typval_T *rettv, char_u *start, char_u *end)
|
||||
rettv->vval.v_number = v ? VVAL_FALSE : VVAL_TRUE;
|
||||
}
|
||||
}
|
||||
*end = p;
|
||||
return OK;
|
||||
}
|
||||
|
||||
@@ -2860,11 +2867,12 @@ get_compare_type(char_u *p, int *len, int *type_is)
|
||||
|
||||
/*
|
||||
* Compile code to apply '-', '+' and '!'.
|
||||
* When "numeric_only" is TRUE do not apply '!'.
|
||||
*/
|
||||
static int
|
||||
compile_leader(cctx_T *cctx, char_u *start, char_u *end)
|
||||
compile_leader(cctx_T *cctx, int numeric_only, char_u *start, char_u **end)
|
||||
{
|
||||
char_u *p = end;
|
||||
char_u *p = *end;
|
||||
|
||||
// this works from end to start
|
||||
while (p > start)
|
||||
@@ -2890,6 +2898,11 @@ compile_leader(cctx_T *cctx, char_u *start, char_u *end)
|
||||
if (isn == NULL)
|
||||
return FAIL;
|
||||
}
|
||||
else if (numeric_only)
|
||||
{
|
||||
++p;
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
int invert = TRUE;
|
||||
@@ -2903,6 +2916,7 @@ compile_leader(cctx_T *cctx, char_u *start, char_u *end)
|
||||
return FAIL;
|
||||
}
|
||||
}
|
||||
*end = p;
|
||||
return OK;
|
||||
}
|
||||
|
||||
@@ -2914,10 +2928,12 @@ compile_leader(cctx_T *cctx, char_u *start, char_u *end)
|
||||
compile_subscript(
|
||||
char_u **arg,
|
||||
cctx_T *cctx,
|
||||
char_u **start_leader,
|
||||
char_u *end_leader,
|
||||
char_u *start_leader,
|
||||
char_u **end_leader,
|
||||
ppconst_T *ppconst)
|
||||
{
|
||||
char_u *name_start = *end_leader;
|
||||
|
||||
for (;;)
|
||||
{
|
||||
char_u *p = skipwhite(*arg);
|
||||
@@ -2959,7 +2975,7 @@ compile_subscript(
|
||||
*arg = skipwhite(p + 1);
|
||||
if (compile_arguments(arg, cctx, &argcount) == FAIL)
|
||||
return FAIL;
|
||||
if (generate_PCALL(cctx, argcount, end_leader, type, TRUE) == FAIL)
|
||||
if (generate_PCALL(cctx, argcount, name_start, type, TRUE) == FAIL)
|
||||
return FAIL;
|
||||
}
|
||||
else if (*p == '-' && p[1] == '>')
|
||||
@@ -2972,9 +2988,8 @@ compile_subscript(
|
||||
// something->method()
|
||||
// Apply the '!', '-' and '+' first:
|
||||
// -1.0->func() works like (-1.0)->func()
|
||||
if (compile_leader(cctx, *start_leader, end_leader) == FAIL)
|
||||
if (compile_leader(cctx, TRUE, start_leader, end_leader) == FAIL)
|
||||
return FAIL;
|
||||
*start_leader = end_leader; // don't apply again later
|
||||
|
||||
p += 2;
|
||||
*arg = skipwhite(p);
|
||||
@@ -3191,6 +3206,15 @@ compile_expr7(
|
||||
case '9':
|
||||
case '.': if (eval_number(arg, rettv, TRUE, FALSE) == FAIL)
|
||||
return FAIL;
|
||||
// Apply "-" and "+" just before the number now, right to
|
||||
// left. Matters especially when "->" follows. Stops at
|
||||
// '!'.
|
||||
if (apply_leader(rettv, TRUE,
|
||||
start_leader, &end_leader) == FAIL)
|
||||
{
|
||||
clear_tv(rettv);
|
||||
return FAIL;
|
||||
}
|
||||
break;
|
||||
|
||||
/*
|
||||
@@ -3329,14 +3353,6 @@ compile_expr7(
|
||||
|
||||
if (rettv->v_type != VAR_UNKNOWN && used_before == ppconst->pp_used)
|
||||
{
|
||||
// apply the '!', '-' and '+' before the constant
|
||||
if (apply_leader(rettv, start_leader, end_leader) == FAIL)
|
||||
{
|
||||
clear_tv(rettv);
|
||||
return FAIL;
|
||||
}
|
||||
start_leader = end_leader; // don't apply again below
|
||||
|
||||
if (cctx->ctx_skip == SKIP_YES)
|
||||
clear_tv(rettv);
|
||||
else
|
||||
@@ -3373,18 +3389,18 @@ compile_expr7(
|
||||
|
||||
// Handle following "[]", ".member", etc.
|
||||
// Then deal with prefixed '-', '+' and '!', if not done already.
|
||||
if (compile_subscript(arg, cctx, &start_leader, end_leader,
|
||||
if (compile_subscript(arg, cctx, start_leader, &end_leader,
|
||||
ppconst) == FAIL)
|
||||
return FAIL;
|
||||
if (ppconst->pp_used > 0)
|
||||
{
|
||||
// apply the '!', '-' and '+' before the constant
|
||||
rettv = &ppconst->pp_tv[ppconst->pp_used - 1];
|
||||
if (apply_leader(rettv, start_leader, end_leader) == FAIL)
|
||||
if (apply_leader(rettv, FALSE, start_leader, &end_leader) == FAIL)
|
||||
return FAIL;
|
||||
return OK;
|
||||
}
|
||||
if (compile_leader(cctx, start_leader, end_leader) == FAIL)
|
||||
if (compile_leader(cctx, FALSE, start_leader, &end_leader) == FAIL)
|
||||
return FAIL;
|
||||
return OK;
|
||||
}
|
||||
|
||||
+2
-1
@@ -3849,6 +3849,7 @@ free_tabpage(tabpage_T *tp)
|
||||
win_new_tabpage(int after)
|
||||
{
|
||||
tabpage_T *tp = curtab;
|
||||
tabpage_T *prev_tp = curtab;
|
||||
tabpage_T *newtp;
|
||||
int n;
|
||||
|
||||
@@ -3898,7 +3899,7 @@ win_new_tabpage(int after)
|
||||
newtp->tp_topframe = topframe;
|
||||
last_status(FALSE);
|
||||
|
||||
lastused_tabpage = tp;
|
||||
lastused_tabpage = prev_tp;
|
||||
|
||||
#if defined(FEAT_GUI)
|
||||
// When 'guioptions' includes 'L' or 'R' may have to remove or add
|
||||
|
||||
Reference in New Issue
Block a user