Merge remote-tracking branch 'vim/master'

This commit is contained in:
Kazuki Sakamoto
2016-11-04 20:50:00 -07:00
17 changed files with 263 additions and 64 deletions
+2 -1
View File
@@ -147,7 +147,7 @@ a standard meaning:
Two 2 Hook
Nine 9 Horn
Equals = Cyrillic (= used as second char)
Equals = Cyrillic (= used as second char)
Asterisk * Greek
Percent sign % Greek/Cyrillic special
Plus + smalls: Arabic, capitals: Hebrew
@@ -926,6 +926,7 @@ char digraph hex dec official name ~
† /- 2020 8224 DAGGER
‡ /= 2021 8225 DOUBLE DAGGER
‥ .. 2025 8229 TWO DOT LEADER
… ,. 2026 8230 HORIZONTAL ELLIPSIS
‰ %0 2030 8240 PER MILLE SIGN
1' 2032 8242 PRIME
″ 2' 2033 8243 DOUBLE PRIME
+43 -11
View File
@@ -2,7 +2,7 @@
# Makefile for Vim on OpenVMS
#
# Maintainer: Zoltan Arpadffy <arpadffy@polarhome.com>
# Last change: 2016 Jul 02
# Last change: 2016 Nov 04
#
# This has script been tested on VMS 6.2 to 8.2 on DEC Alpha, VAX and IA64
# with MMS and MMK
@@ -38,7 +38,7 @@ MODEL = HUGE
# GUI or terminal mode executable.
# Comment out if you want just the character terminal mode only.
# GUI with Motif
# GUI = YES
GUI = YES
# GUI with GTK
# If you have GTK installed you might want to enable this option.
@@ -299,22 +299,22 @@ ALL_CFLAGS_VER = /def=($(MODEL_DEF)$(DEFS)$(DEBUG_DEF)$(PERL_DEF)$(PYTHON_DEF) -
ALL_LIBS = $(LIBS) $(GUI_LIB_DIR) $(GUI_LIB) \
$(PERL_LIB) $(PYTHON_LIB) $(TCL_LIB) $(RUBY_LIB)
SRC = arabic.c blowfish.c buffer.c charset.c crypt.c, crypt_zip.c diff.c digraph.c edit.c eval.c ex_cmds.c ex_cmds2.c \
ex_docmd.c ex_eval.c ex_getln.c if_xcmdsrv.c farsi.c fileio.c fold.c getchar.c \
hardcopy.c hashtab.c json.c main.c mark.c menu.c mbyte.c memfile.c memline.c message.c misc1.c \
SRC = arabic.c blowfish.c buffer.c charset.c crypt.c crypt_zip.c dict.c diff.c digraph.c edit.c eval.c evalfunc.c \
ex_cmds.c ex_cmds2.c ex_docmd.c ex_eval.c ex_getln.c if_cscope.c if_xcmdsrv.c farsi.c fileio.c fold.c getchar.c \
hardcopy.c hashtab.c json.c list.c main.c mark.c menu.c mbyte.c memfile.c memline.c message.c misc1.c \
misc2.c move.c normal.c ops.c option.c popupmnu.c quickfix.c regexp.c search.c sha256.c\
spell.c syntax.c tag.c term.c termlib.c ui.c undo.c version.c screen.c \
spell.c spellfile.c syntax.c tag.c term.c termlib.c ui.c undo.c userfunc.c version.c screen.c \
window.c os_unix.c os_vms.c pathdef.c \
$(GUI_SRC) $(PERL_SRC) $(PYTHON_SRC) $(TCL_SRC) \
$(RUBY_SRC) $(HANGULIN_SRC) $(MZSCH_SRC)
OBJ = arabic.obj blowfish.obj buffer.obj charset.obj crypt.obj, crypt_zip.obj diff.obj digraph.obj edit.obj eval.obj \
ex_cmds.obj ex_cmds2.obj ex_docmd.obj ex_eval.obj ex_getln.obj \
if_xcmdsrv.obj farsi.obj fileio.obj fold.obj getchar.obj hardcopy.obj hashtab.obj json.obj main.obj mark.obj \
OBJ = arabic.obj blowfish.obj buffer.obj charset.obj crypt.obj crypt_zip.obj dict.obj diff.obj digraph.obj edit.obj eval.obj \
evalfunc.obj ex_cmds.obj ex_cmds2.obj ex_docmd.obj ex_eval.obj ex_getln.obj if_cscope.obj \
if_xcmdsrv.obj farsi.obj fileio.obj fold.obj getchar.obj hardcopy.obj hashtab.obj json.obj list.obj main.obj mark.obj \
menu.obj memfile.obj memline.obj message.obj misc1.obj misc2.obj \
move.obj mbyte.obj normal.obj ops.obj option.obj popupmnu.obj quickfix.obj \
regexp.obj search.obj sha256.obj spell.obj syntax.obj tag.obj term.obj termlib.obj \
ui.obj undo.obj screen.obj version.obj window.obj os_unix.obj \
regexp.obj search.obj sha256.obj spell.obj spellfile.obj syntax.obj tag.obj term.obj termlib.obj \
ui.obj undo.obj userfunc.obj screen.obj version.obj window.obj os_unix.obj \
os_vms.obj pathdef.obj if_mzsch.obj\
$(GUI_OBJ) $(PERL_OBJ) $(PYTHON_OBJ) $(TCL_OBJ) \
$(RUBY_OBJ) $(HANGULIN_OBJ) $(MZSCH_OBJ)
@@ -496,6 +496,18 @@ charset.obj : charset.c vim.h [.auto]config.h feature.h os_unix.h \
ascii.h keymap.h term.h macros.h structs.h regexp.h \
gui.h gui_beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
globals.h farsi.h arabic.h
crypt.obj : crypt.c vim.h [.auto]config.h feature.h os_unix.h \
ascii.h keymap.h term.h macros.h option.h structs.h regexp.h gui.h \
gui_beval.h [.proto]gui_beval.pro alloc.h ex_cmds.h spell.h proto.h \
globals.h farsi.h arabic.h
crypt_zip.obj : crypt_zip.c vim.h [.auto]config.h feature.h os_unix.h \
ascii.h keymap.h term.h macros.h option.h structs.h \
regexp.h gui.h gui_beval.h [.proto]gui_beval.pro alloc.h ex_cmds.h spell.h \
proto.h globals.h farsi.h arabic.h
dict.obj : dict.c vim.h [.auto]config.h feature.h os_unix.h \
ascii.h keymap.h term.h macros.h option.h structs.h regexp.h gui.h \
gui_beval.h [.proto]gui_beval.pro alloc.h ex_cmds.h spell.h proto.h \
globals.h farsi.h arabic.h
diff.obj : diff.c vim.h [.auto]config.h feature.h os_unix.h \
ascii.h keymap.h term.h macros.h structs.h regexp.h gui.h gui_beval.h \
[.proto]gui_beval.pro option.h ex_cmds.h proto.h globals.h farsi.h \
@@ -512,6 +524,10 @@ eval.obj : eval.c vim.h [.auto]config.h feature.h os_unix.h \
ascii.h keymap.h term.h macros.h structs.h regexp.h gui.h gui_beval.h \
[.proto]gui_beval.pro option.h ex_cmds.h proto.h globals.h farsi.h \
arabic.h version.h
evalfunc.obj : evalfunc.c vim.h [.auto]config.h feature.h os_unix.h \
ascii.h keymap.h term.h macros.h option.h structs.h \
regexp.h gui.h gui_beval.h [.proto]gui_beval.pro alloc.h ex_cmds.h spell.h \
proto.h globals.h farsi.h arabic.h version.h
ex_cmds.obj : ex_cmds.c vim.h [.auto]config.h feature.h os_unix.h \
ascii.h keymap.h term.h macros.h structs.h regexp.h \
gui.h gui_beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
@@ -569,6 +585,10 @@ json.obj : json.c vim.h [.auto]config.h feature.h os_unix.h \
ascii.h keymap.h term.h macros.h structs.h regexp.h gui.h gui_beval.h \
[.proto]gui_beval.pro option.h ex_cmds.h proto.h globals.h farsi.h \
arabic.h version.h
list.obj : list.c vim.h [.auto]config.h feature.h os_unix.h \
ascii.h keymap.h term.h macros.h option.h structs.h regexp.h gui.h \
gui_beval.h [.proto]gui_beval.pro alloc.h ex_cmds.h spell.h proto.h \
globals.h farsi.h arabic.h
main.obj : main.c vim.h [.auto]config.h feature.h os_unix.h \
ascii.h keymap.h term.h macros.h structs.h regexp.h gui.h gui_beval.h \
[.proto]gui_beval.pro option.h ex_cmds.h proto.h globals.h farsi.h \
@@ -653,10 +673,18 @@ search.obj : search.c vim.h [.auto]config.h feature.h os_unix.h \
ascii.h keymap.h term.h macros.h structs.h regexp.h \
gui.h gui_beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
globals.h farsi.h arabic.h
sha256.obj : sha256.c vim.h [.auto]config.h feature.h os_unix.h \
ascii.h keymap.h term.h macros.h option.h structs.h regexp.h gui.h \
gui_beval.h [.proto]gui_beval.pro alloc.h ex_cmds.h spell.h proto.h \
globals.h farsi.h arabic.h
spell.obj : spell.c vim.h [.auto]config.h feature.h os_unix.h \
ascii.h keymap.h term.h macros.h structs.h regexp.h \
gui.h gui_beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
globals.h farsi.h arabic.h
spellfile.obj : spellfile.c vim.h [.auto]config.h feature.h os_unix.h \
ascii.h keymap.h term.h macros.h option.h structs.h \
regexp.h gui.h gui_beval.h [.proto]gui_beval.pro alloc.h ex_cmds.h spell.h \
proto.h globals.h farsi.h arabic.h
syntax.obj : syntax.c vim.h [.auto]config.h feature.h os_unix.h \
ascii.h keymap.h term.h macros.h structs.h regexp.h \
gui.h gui_beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
@@ -681,6 +709,10 @@ undo.obj : undo.c vim.h [.auto]config.h feature.h os_unix.h \
ascii.h keymap.h term.h macros.h structs.h regexp.h gui.h gui_beval.h \
[.proto]gui_beval.pro option.h ex_cmds.h proto.h globals.h farsi.h \
arabic.h
userfunc.obj : userfunc.c vim.h [.auto]config.h feature.h os_unix.h \
ascii.h keymap.h term.h macros.h option.h structs.h \
regexp.h gui.h gui_beval.h [.proto]gui_beval.pro alloc.h ex_cmds.h spell.h \
proto.h globals.h farsi.h arabic.h
version.obj : version.c vim.h [.auto]config.h feature.h os_unix.h \
ascii.h keymap.h term.h macros.h structs.h regexp.h \
gui.h gui_beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
+1
View File
@@ -1312,6 +1312,7 @@ static digr_T digraphdefault[] =
{'/', '-', 0x2020},
{'/', '=', 0x2021},
{'.', '.', 0x2025},
{',', '.', 0x2026},
{'%', '0', 0x2030},
{'1', '\'', 0x2032},
{'2', '\'', 0x2033},
+4
View File
@@ -16,6 +16,10 @@
#include "vim.h"
#ifdef VAX
# undef FEAT_FLOAT // VAX does not handle well the Infinities
#endif
#if defined(FEAT_EVAL) || defined(PROTO)
static int json_encode_item(garray_T *gap, typval_T *val, int copyID, int options);
+1
View File
@@ -177,6 +177,7 @@
# define mch_fstat(n, p) fstat(vms_fixfilename(n), (p))
/* VMS does not have lstat() */
# define mch_stat(n, p) stat(vms_fixfilename(n), (p))
# define mch_rmdir(n) rmdir(vms_fixfilename(n))
#else
# ifndef WIN32
# define mch_access(n, p) access((n), (p))
+6 -2
View File
@@ -5747,9 +5747,13 @@ nv_ident(cmdarg_T *cap)
*/
if (cmdchar == 'K' && !kp_help)
{
/* Escape the argument properly for a shell command */
ptr = vim_strnsave(ptr, n);
p = vim_strsave_shellescape(ptr, TRUE, TRUE);
if (kp_ex)
/* Escape the argument properly for an Ex command */
p = vim_strsave_fnameescape(ptr, FALSE);
else
/* Escape the argument properly for a shell command */
p = vim_strsave_shellescape(ptr, TRUE, TRUE);
vim_free(ptr);
if (p == NULL)
{
+36 -2
View File
@@ -5907,6 +5907,21 @@ set_string_option(
return r;
}
/*
* Return TRUE if "val" is a valid 'filetype' name.
* Also used for 'syntax' and 'keymap'.
*/
static int
valid_filetype(char_u *val)
{
char_u *s;
for (s = val; *s != NUL; ++s)
if (!ASCII_ISALNUM(*s) && vim_strchr((char_u *)".-_", *s) == NULL)
return FALSE;
return TRUE;
}
/*
* Handle string options that need some action to perform when changed.
* Returns NULL for success, or an error message for an error.
@@ -6324,8 +6339,11 @@ did_set_string_option(
#ifdef FEAT_KEYMAP
else if (varp == &curbuf->b_p_keymap)
{
/* load or unload key mapping tables */
errmsg = keymap_init();
if (!valid_filetype(*varp))
errmsg = e_invarg;
else
/* load or unload key mapping tables */
errmsg = keymap_init();
if (errmsg == NULL)
{
@@ -7322,6 +7340,22 @@ did_set_string_option(
}
#endif
#ifdef FEAT_AUTOCMD
else if (gvarp == &p_ft)
{
if (!valid_filetype(*varp))
errmsg = e_invarg;
}
#endif
#ifdef FEAT_SYN_HL
else if (gvarp == &p_syn)
{
if (!valid_filetype(*varp))
errmsg = e_invarg;
}
#endif
/* Options that are a list of flags. */
else
{
+5 -4
View File
@@ -501,7 +501,7 @@ mch_inchar(
/* no character available */
#if !(defined(HAVE_GETTIMEOFDAY) && defined(HAVE_SYS_TIME_H))
/* estimate the elapsed time */
elapsed += wait_time;
elapsed_time += wait_time;
#endif
if (do_resize /* interrupted by SIGWINCH signal */
@@ -2646,7 +2646,7 @@ fname_case(
DIR *dirp;
struct dirent *dp;
if (lstat((char *)name, &st) >= 0)
if (mch_lstat((char *)name, &st) >= 0)
{
/* Open the directory where the file is located. */
slash = vim_strrchr(name, '/');
@@ -2679,7 +2679,7 @@ fname_case(
vim_strncpy(newname, name, MAXPATHL);
vim_strncpy(newname + (tail - name), (char_u *)dp->d_name,
MAXPATHL - (tail - name));
if (lstat((char *)newname, &st2) >= 0
if (mch_lstat((char *)newname, &st2) >= 0
&& st.st_ino == st2.st_ino
&& st.st_dev == st2.st_dev)
{
@@ -3042,7 +3042,7 @@ mch_isrealdir(char_u *name)
if (*name == NUL) /* Some stat()s don't flag "" as an error. */
return FALSE;
if (lstat((char *)name, &statb))
if (mch_lstat((char *)name, &statb))
return FALSE;
#ifdef _POSIX_SOURCE
return (S_ISDIR(statb.st_mode) ? TRUE : FALSE);
@@ -4104,6 +4104,7 @@ mch_call_shell(
int tmode = cur_tmode;
#ifdef USE_SYSTEM /* use system() to start the shell: simple but slow */
char_u *newcmd; /* only needed for unix */
int x;
out_flush();
#ifdef FEAT_GUI_MACVIM
-4
View File
@@ -75,10 +75,6 @@
# ifdef VMS
# define mch_remove(x) delete((char *)(x))
# define vim_mkdir(x, y) mkdir((char *)(x), y)
# ifdef VAX
# else
# define mch_rmdir(x) rmdir((char *)(x))
# endif
# else
# define vim_mkdir(x, y) mkdir((char *)(x), y)
# define mch_rmdir(x) rmdir((char *)(x))
+2 -1
View File
@@ -726,7 +726,8 @@ struct typeahead_st {
RealWaitForChar(
int fd UNUSED, /* always read from iochan */
long msec,
int *check_for_gpm UNUSED)
int *check_for_gpm UNUSED,
int *interrupted)
{
int status;
struct _generic_64 time_curr;
+5 -2
View File
@@ -141,6 +141,7 @@
#undef HAVE_SYS_POLL_H
#undef HAVE_PWD_H
#undef HAVE_FCHDIR
#undef HAVE_LSTAT
/* Hardware specific */
#ifdef VAX
@@ -148,13 +149,15 @@
#undef HAVE_USLEEP
#undef HAVE_STRCASECMP
#undef HAVE_STRINGS_H
#undef HAVE_SIGSETJMP
#undef HAVE_SIGSETJMP
#undef HAVE_ISNAN
#else
#define HAVE_GETTIMEOFDAY
#define HAVE_USLEEP
#define HAVE_STRCASECMP
#define HAVE_STRINGS_H
#define HAVE_SIGSETJMP
#define HAVE_SIGSETJMP
#define HAVE_ISNAN
#endif
/* Compiler specific */
+24 -24
View File
@@ -54,18 +54,23 @@ pum_display(
int kind_width;
int extra_width;
int i;
int top_clear;
int row;
int context_lines;
int col;
int above_row = cmdline_row;
int above_row;
int below_row;
int redo_count = 0;
#if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX)
win_T *pvwin;
#endif
redo:
def_width = PUM_DEF_WIDTH;
max_width = 0;
kind_width = 0;
extra_width = 0;
above_row = 0;
below_row = cmdline_row;
/* Pretend the pum is already there to avoid that must_redraw is set when
* 'cuc' is on. */
@@ -76,18 +81,16 @@ redo:
row = curwin->w_wrow + W_WINROW(curwin);
#if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX)
if (firstwin->w_p_pvw)
top_clear = firstwin->w_height;
else
#endif
top_clear = 0;
#if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX)
/* When the preview window is at the bottom stop just above it. Also
* avoid drawing over the status line so that it's clear there is a window
* boundary. */
if (lastwin->w_p_pvw)
above_row -= lastwin->w_height + lastwin->w_status_height + 1;
FOR_ALL_WINDOWS(pvwin)
if (pvwin->w_p_pvw)
break;
if (pvwin != NULL)
{
if (W_WINROW(pvwin) < W_WINROW(curwin))
above_row = W_WINROW(pvwin) + pvwin->w_height;
else if (W_WINROW(pvwin) > W_WINROW(curwin) + curwin->w_height)
below_row = W_WINROW(pvwin);
}
#endif
/*
@@ -102,8 +105,7 @@ redo:
/* Put the pum below "row" if possible. If there are few lines decide on
* where there is more room. */
if (row + 2 >= above_row - pum_height
&& row > (above_row - top_clear) / 2)
if (row - above_row >= below_row - row)
{
/* pum above "row" */
@@ -141,8 +143,8 @@ redo:
+ curwin->w_cline_height - curwin->w_wrow;
pum_row = row + context_lines;
if (size > above_row - pum_row)
pum_height = above_row - pum_row;
if (size > below_row - pum_row)
pum_height = below_row - pum_row;
else
pum_height = size;
if (p_ph > 0 && pum_height > p_ph)
@@ -154,13 +156,11 @@ redo:
return;
#if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX)
/* If there is a preview window at the top avoid drawing over it. */
if (firstwin->w_p_pvw
&& pum_row < firstwin->w_height
&& pum_height > firstwin->w_height + 4)
/* If there is a preview window at the above avoid drawing over it. */
if (pvwin != NULL && pum_row < above_row && pum_height > above_row)
{
pum_row += firstwin->w_height;
pum_height -= firstwin->w_height;
pum_row += above_row;
pum_height -= above_row;
}
#endif
+1 -1
View File
@@ -12,5 +12,5 @@ int mch_expand_wildcards(int num_pat, char_u **pat, int *num_file, char_u ***fil
int mch_expandpath(garray_T *gap, char_u *path, int flags);
void *vms_fixfilename(void *instring);
void vms_remove_version(void *fname);
int RealWaitForChar(int fd, long msec, int *check_for_gpm);
int RealWaitForChar(int fd, long msec, int *check_for_gpm, int *interrupted);
/* vim: set ft=c : */
+42 -11
View File
@@ -4,7 +4,7 @@
# Authors: Zoltan Arpadffy, <arpadffy@polarhome.com>
# Sandor Kopanyi, <sandor.kopanyi@mailbox.hu>
#
# Last change: 2016 Aug 04
# Last change: 2016 Nov 04
#
# This has been tested on VMS 6.2 to 8.3 on DEC Alpha, VAX and IA64.
# Edit the lines in the Configuration section below to select.
@@ -74,14 +74,45 @@
VIMPROG = <->vim.exe
default : all
# This probably doesn't work, please fix.
.INCLUDE Make_all.mak
.SUFFIXES : .out .in
SCRIPT = $(SCRIPTS_ALL) $(SCRIPTS_MORE3)
SCRIPT = test1.out test3.out test4.out test5.out \
test7.out test8.out test9.out \
test14.out test15.out \
test19.out test20.out test22.out \
test23.out test24.out test26.out \
test28.out test29.out test30.out test31.out test32.out \
test33.out test34.out test36.out test37.out \
test38.out test39.out test40.out test41.out test42.out \
test43.out test44.out test45.out \
test48.out test49.out test51.out test53.out test54.out \
test55.out test56.out test57.out test60.out \
test64.out test65.out \
test66.out test67.out test68.out test69.out \
test72.out test75.out \
test77a.out test78.out test79.out test80.out \
test82.out test84.out test88.out test89.out \
test90.out test91.out test92.out test93.out test94.out \
test95.out test98.out test99.out \
test103.out test104.out \
test107.out test108.out\
test_autocmd_option.out \
test_autoformat_join.out \
test_breakindent.out \
test_changelist.out \
test_close_count.out \
test_comparators.out \
test_erasebackword.out \
test_eval.out \
test_fixeol.out \
test_getcwd.out \
test_insertcount.out \
test_listchars.out \
test_listlbr.out \
test_listlbr_utf8.out \
test_search_mbyte.out \
test_utf8.out \
test_wordcount.out
# Known problems:
# test17: ?
@@ -104,12 +135,12 @@ SCRIPT = $(SCRIPTS_ALL) $(SCRIPTS_MORE3)
# On ODS-2 tests fail.
.IFDEF WANT_GUI
SCRIPT_GUI =
SCRIPT_GUI = test16.out
GUI_OPTION = -g
.ENDIF
.IFDEF WANT_UNIX
SCRIPT_UNIX = test12.out test17.out test25.out test27.out test49.out test73.out
SCRIPT_UNIX = test10.out test12.out test17.out test25.out test27.out test49.out test73.out
.ENDIF
.IFDEF WANT_WIN
@@ -163,7 +194,7 @@ SCRIPT_PYTHON = test86.out test87.out
-@ write sys$output " "$*" "
-@ write sys$output "-----------------------------------------------"
-@ !run the test
-@ create/term/wait/nodetach mcr $(VIMPROG) $(GUI_OPTION) -u vms.vim $(NO_PLUGIN) -s dotest.in $*.in
-@ create/term/wait/nodetach mcr $(VIMPROG) $(GUI_OPTION) -u vms.vim --noplugin -s dotest.in $*.in
-@ !analyse the result
-@ directory /size/date test.out
-@ if "''F$SEARCH("test.out.*")'" .NES. "" then rename/nolog test.out $*.out
@@ -172,7 +203,7 @@ SCRIPT_PYTHON = test86.out test87.out
-@ if "''F$SEARCH("Xdotest.*")'" .NES. "" then delete/noconfirm/nolog Xdotest.*.*
-@ if "''F$SEARCH("Xtest.*")'" .NES. "" then delete/noconfirm/nolog Xtest.*.*
all : clean nolog $(SCRIPTS_FIRST) $(SCRIPT) $(SCRIPT_GUI) $(SCRIPT_UNIX) $(SCRIPT_WIN) $(SCRIPT_SPELL) $(SCRIPT_ODS5) $(SCRIPT_GZIP) \
all : clean nolog $(START_WITH) $(SCRIPT) $(SCRIPT_GUI) $(SCRIPT_UNIX) $(SCRIPT_WIN) $(SCRIPT_SPELL) $(SCRIPT_ODS5) $(SCRIPT_GZIP) \
$(SCRIPT_GDIFF) $(SCRIPT_MZSCH) $(SCRIPT_CKSUM) $(SCRIPT_ICONV) $(SCRIPT_LUA) $(SCRIPT_PYTHON) nolog
-@ write sys$output " "
-@ write sys$output "-----------------------------------------------"
+19 -1
View File
@@ -1222,7 +1222,7 @@ endfunc
func! Test_normal23_K()
" Test for K command
new
call append(0, ['version8.txt', 'man'])
call append(0, ['version8.txt', 'man', 'aa%bb', 'cc|dd'])
let k = &keywordprg
set keywordprg=:help
1
@@ -1237,6 +1237,24 @@ func! Test_normal23_K()
call assert_match('\*version8\.0\*', getline('.'))
helpclose
set keywordprg=:new
set iskeyword+=%
set iskeyword+=\|
2
norm! K
call assert_equal('man', fnamemodify(bufname('%'), ':t'))
bwipe!
3
norm! K
call assert_equal('aa%bb', fnamemodify(bufname('%'), ':t'))
bwipe!
4
norm! K
call assert_equal('cc|dd', fnamemodify(bufname('%'), ':t'))
bwipe!
set iskeyword-=%
set iskeyword-=\|
" Only expect "man" to work on Unix
if !has("unix")
let &keywordprg = k
+58
View File
@@ -48,3 +48,61 @@ func Test_signcolumn()
endif
endfunc
func Test_filetype_valid()
if !has('autocmd')
return
endif
set ft=valid_name
call assert_equal("valid_name", &filetype)
set ft=valid-name
call assert_equal("valid-name", &filetype)
call assert_fails(":set ft=wrong;name", "E474:")
call assert_fails(":set ft=wrong\\\\name", "E474:")
call assert_fails(":set ft=wrong\\|name", "E474:")
call assert_fails(":set ft=wrong/name", "E474:")
call assert_fails(":set ft=wrong\\\nname", "E474:")
call assert_equal("valid-name", &filetype)
exe "set ft=trunc\x00name"
call assert_equal("trunc", &filetype)
endfunc
func Test_syntax_valid()
if !has('syntax')
return
endif
set syn=valid_name
call assert_equal("valid_name", &syntax)
set syn=valid-name
call assert_equal("valid-name", &syntax)
call assert_fails(":set syn=wrong;name", "E474:")
call assert_fails(":set syn=wrong\\\\name", "E474:")
call assert_fails(":set syn=wrong\\|name", "E474:")
call assert_fails(":set syn=wrong/name", "E474:")
call assert_fails(":set syn=wrong\\\nname", "E474:")
call assert_equal("valid-name", &syntax)
exe "set syn=trunc\x00name"
call assert_equal("trunc", &syntax)
endfunc
func Test_keymap_valid()
if !has('keymap')
return
endif
call assert_fails(":set kmp=valid_name", "E544:")
call assert_fails(":set kmp=valid_name", "valid_name")
call assert_fails(":set kmp=valid-name", "E544:")
call assert_fails(":set kmp=valid-name", "valid-name")
call assert_fails(":set kmp=wrong;name", "E474:")
call assert_fails(":set kmp=wrong\\\\name", "E474:")
call assert_fails(":set kmp=wrong\\|name", "E474:")
call assert_fails(":set kmp=wrong/name", "E474:")
call assert_fails(":set kmp=wrong\\\nname", "E474:")
call assert_fails(":set kmp=trunc\x00name", "E544:")
call assert_fails(":set kmp=trunc\x00name", "trunc")
endfunc
+14
View File
@@ -779,6 +779,20 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
62,
/**/
61,
/**/
60,
/**/
59,
/**/
58,
/**/
57,
/**/
56,
/**/
55,
/**/