Compare commits

..

5 Commits

Author SHA1 Message Date
Ken Takata
c97b3febc8 patch 9.0.2013: confusing ifdefs in if_<lang>.c
Problem:  confusing ifdefs in if_<lang>.c
Solution: refactor ifndefs to #ifdefs

if_x: Avoid using #ifndef - #else - #endif

Using #ifndef - #else - #endif is sometimes confusing.
Use #ifdef - #else - #endif instead.

closes: #13310

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Ken Takata <kentkt@csc.jp>
2023-10-11 21:27:06 +02:00
Christian Brabandt
a634b92b96 patch 9.0.2013: Unicode tables outdated
Problem: Unicode tables outdated
Solution: Update Unicode tables to v15.1 (released 23.09.2023)

closes: #13311

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-10-11 21:24:49 +02:00
Ernie Rael
f8da324619 patch 9.0.2012: Vim9: error message can be more accurate
Problem:  Vim9: error message can be more accurate
Solution: Fix the error messages

Fix message for some single use error messages.

closes: #13312

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Ernie Rael <errael@raelity.com>
2023-10-11 21:22:12 +02:00
Martin Tournoij
4a82bdfaa8 patch 9.0.2011: INI files not detected
Problem:  INI files not detected
Solution: detect uppercase .INI as dosini files

It previo~1 only worked for lower-case .ini files, but upperc~1 .INI is
also somewhat common on account of DOS' old 8.3 upperc~2 only filena~1.

closes: #13316

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Martin Tournoij <martin@arp242.net>
2023-10-11 21:20:06 +02:00
Christian Brabandt
41e6f7d6ba patch 9.0.2010: [security] use-after-free from buf_contents_changed()
Problem:  [security] use-after-free from buf_contents_changed()
Solution: block autocommands

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-10-11 21:09:53 +02:00
18 changed files with 132 additions and 104 deletions

View File

@@ -1013,7 +1013,7 @@ au BufNewFile,BufRead ipf.conf,ipf6.conf,ipf.rules setf ipfilter
au BufNewFile,BufRead *.4gl,*.4gh,*.m4gl setf fgl
" .INI file for MSDOS
au BufNewFile,BufRead *.ini setf dosini
au BufNewFile,BufRead *.ini,*.INI setf dosini
" SysV Inittab
au BufNewFile,BufRead inittab setf inittab

View File

@@ -6013,6 +6013,9 @@ buf_contents_changed(buf_T *buf)
return TRUE;
}
// We don't want to trigger autocommands now, they may have nasty
// side-effects like wiping buffers
block_autocmds();
if (ml_open(curbuf) == OK
&& readfile(buf->b_ffname, buf->b_fname,
(linenr_T)0, (linenr_T)0, (linenr_T)MAXLNUM,
@@ -6038,6 +6041,8 @@ buf_contents_changed(buf_T *buf)
if (curbuf != newbuf) // safety check
wipe_buffer(newbuf, FALSE);
unblock_autocmds();
return differ;
}

View File

@@ -1771,8 +1771,8 @@ EXTERN char e_less_targets_than_list_items[]
INIT(= N_("E687: Less targets than List items"));
EXTERN char e_more_targets_than_list_items[]
INIT(= N_("E688: More targets than List items"));
EXTERN char e_can_only_index_list_dictionary_or_blob[]
INIT(= N_("E689: Can only index a List, Dictionary or Blob"));
EXTERN char e_index_not_allowed_after_str_str[]
INIT(= N_("E689: Index not allowed after a %s: %s"));
EXTERN char e_missing_in_after_for[]
INIT(= N_("E690: Missing \"in\" after :for"));
EXTERN char e_can_only_compare_list_with_list[]
@@ -3081,8 +3081,8 @@ EXTERN char e_libsodium_decryption_failed_premature[]
#ifdef FEAT_EVAL
EXTERN char e_no_white_space_allowed_after_str_str[]
INIT(= N_("E1202: No white space allowed after '%s': %s"));
EXTERN char e_dot_can_only_be_used_on_dictionary_str[]
INIT(= N_("E1203: Dot can only be used on a dictionary: %s"));
EXTERN char e_dot_not_allowed_after_str_str[]
INIT(= N_("E1203: Dot not allowed after a %s: %s"));
#endif
EXTERN char e_regexp_number_after_dot_pos_search_chr[]
INIT(= N_("E1204: No Number allowed after .: '\\%%%c'"));

View File

@@ -1375,9 +1375,9 @@ get_lval(
&& v_type != VAR_OBJECT
&& v_type != VAR_CLASS)
{
// TODO: have a message with obj/class, not just dict,
if (!quiet)
semsg(_(e_dot_can_only_be_used_on_dictionary_str), name);
semsg(_(e_dot_not_allowed_after_str_str),
vartype_name(v_type), name);
return NULL;
}
if (v_type != VAR_LIST
@@ -1386,9 +1386,9 @@ get_lval(
&& v_type != VAR_OBJECT
&& v_type != VAR_CLASS)
{
// TODO: have a message with obj/class, not just dict/list/blob,
if (!quiet)
emsg(_(e_can_only_index_list_dictionary_or_blob));
semsg(_(e_index_not_allowed_after_str_str),
vartype_name(v_type), name);
return NULL;
}

View File

@@ -102,18 +102,18 @@ static void luaV_call_lua_func_free(void *state);
#ifdef DYNAMIC_LUA
#ifndef MSWIN
#ifdef MSWIN
# define load_dll vimLoadLib
# define symbol_from_dll GetProcAddress
# define close_dll FreeLibrary
# define load_dll_error GetWin32Error
#else
# include <dlfcn.h>
# define HANDLE void*
# define load_dll(n) dlopen((n), RTLD_LAZY|RTLD_GLOBAL)
# define symbol_from_dll dlsym
# define close_dll dlclose
# define load_dll_error dlerror
#else
# define load_dll vimLoadLib
# define symbol_from_dll GetProcAddress
# define close_dll FreeLibrary
# define load_dll_error GetWin32Error
#endif
// lauxlib

View File

@@ -1366,10 +1366,10 @@ mzscheme_buffer_free(buf_T *buf)
bp = BUFFER_REF(buf);
bp->buf = INVALID_BUFFER_VALUE;
#ifndef MZ_PRECISE_GC
scheme_gc_ptr_ok(bp);
#else
#ifdef MZ_PRECISE_GC
scheme_free_immobile_box(buf->b_mzscheme_ref);
#else
scheme_gc_ptr_ok(bp);
#endif
buf->b_mzscheme_ref = NULL;
MZ_GC_CHECK();
@@ -1391,10 +1391,10 @@ mzscheme_window_free(win_T *win)
MZ_GC_REG();
wp = WINDOW_REF(win);
wp->win = INVALID_WINDOW_VALUE;
#ifndef MZ_PRECISE_GC
scheme_gc_ptr_ok(wp);
#else
#ifdef MZ_PRECISE_GC
scheme_free_immobile_box(win->w_mzscheme_ref);
#else
scheme_gc_ptr_ok(wp);
#endif
win->w_mzscheme_ref = NULL;
MZ_GC_CHECK();
@@ -1921,10 +1921,10 @@ window_new(win_T *win)
MZ_GC_REG();
self = scheme_malloc_fail_ok(scheme_malloc_tagged, sizeof(vim_mz_window));
CLEAR_POINTER(self);
#ifndef MZ_PRECISE_GC
scheme_dont_gc_ptr(self); // because win isn't visible to GC
#else
#ifdef MZ_PRECISE_GC
win->w_mzscheme_ref = scheme_malloc_immobile_box(NULL);
#else
scheme_dont_gc_ptr(self); // because win isn't visible to GC
#endif
MZ_GC_CHECK();
WINDOW_REF(win) = self;
@@ -2305,10 +2305,10 @@ buffer_new(buf_T *buf)
MZ_GC_REG();
self = scheme_malloc_fail_ok(scheme_malloc_tagged, sizeof(vim_mz_buffer));
CLEAR_POINTER(self);
#ifndef MZ_PRECISE_GC
scheme_dont_gc_ptr(self); // because buf isn't visible to GC
#else
#ifdef MZ_PRECISE_GC
buf->b_mzscheme_ref = scheme_malloc_immobile_box(NULL);
#else
scheme_dont_gc_ptr(self); // because buf isn't visible to GC
#endif
MZ_GC_CHECK();
BUFFER_REF(buf) = self;

View File

@@ -166,7 +166,13 @@ typedef int XSUBADDR_t;
typedef int perl_key;
# endif
# ifndef MSWIN
# ifdef MSWIN
# define PERL_PROC FARPROC
# define load_dll vimLoadLib
# define symbol_from_dll GetProcAddress
# define close_dll FreeLibrary
# define load_dll_error GetWin32Error
# else
# include <dlfcn.h>
# define HANDLE void*
# define PERL_PROC void*
@@ -174,12 +180,6 @@ typedef int perl_key;
# define symbol_from_dll dlsym
# define close_dll dlclose
# define load_dll_error dlerror
# else
# define PERL_PROC FARPROC
# define load_dll vimLoadLib
# define symbol_from_dll GetProcAddress
# define close_dll FreeLibrary
# define load_dll_error GetWin32Error
# endif
/*
* Wrapper defines

View File

@@ -130,7 +130,12 @@ struct PyMethodDef { Py_ssize_t a; };
# define HINSTANCE long_u // for generating prototypes
# endif
# ifndef MSWIN
# ifdef MSWIN
# define load_dll vimLoadLib
# define close_dll FreeLibrary
# define symbol_from_dll GetProcAddress
# define load_dll_error GetWin32Error
# else
# include <dlfcn.h>
# define FARPROC void*
# define HINSTANCE void*
@@ -142,11 +147,6 @@ struct PyMethodDef { Py_ssize_t a; };
# define close_dll dlclose
# define symbol_from_dll dlsym
# define load_dll_error dlerror
# else
# define load_dll vimLoadLib
# define close_dll FreeLibrary
# define symbol_from_dll GetProcAddress
# define load_dll_error GetWin32Error
# endif
// This makes if_python.c compile without warnings against Python 2.5
@@ -496,14 +496,14 @@ static struct
PYTHON_PROC *ptr;
} python_funcname_table[] =
{
# ifndef PY_SSIZE_T_CLEAN
{"PyArg_Parse", (PYTHON_PROC*)&dll_PyArg_Parse},
{"PyArg_ParseTuple", (PYTHON_PROC*)&dll_PyArg_ParseTuple},
{"Py_BuildValue", (PYTHON_PROC*)&dll_Py_BuildValue},
# else
# ifdef PY_SSIZE_T_CLEAN
{"_PyArg_Parse_SizeT", (PYTHON_PROC*)&dll_PyArg_Parse},
{"_PyArg_ParseTuple_SizeT", (PYTHON_PROC*)&dll_PyArg_ParseTuple},
{"_Py_BuildValue_SizeT", (PYTHON_PROC*)&dll_Py_BuildValue},
# else
{"PyArg_Parse", (PYTHON_PROC*)&dll_PyArg_Parse},
{"PyArg_ParseTuple", (PYTHON_PROC*)&dll_PyArg_ParseTuple},
{"Py_BuildValue", (PYTHON_PROC*)&dll_Py_BuildValue},
# endif
{"PyMem_Free", (PYTHON_PROC*)&dll_PyMem_Free},
{"PyMem_Malloc", (PYTHON_PROC*)&dll_PyMem_Malloc},

View File

@@ -104,6 +104,9 @@
#define PyString_FromString(repr) \
PyUnicode_Decode(repr, STRLEN(repr), ENC_OPT, ERRORS_DECODE_ARG)
#define PyString_FromFormat PyUnicode_FromFormat
#ifdef PyUnicode_FromFormat
# define Py_UNICODE_USE_UCS_FUNCTIONS
#endif
#ifndef PyInt_Check
# define PyInt_Check(obj) PyLong_Check(obj)
#endif
@@ -134,7 +137,12 @@ static HINSTANCE hinstPy3 = 0; // Instance of python.dll
#if defined(DYNAMIC_PYTHON3) || defined(PROTO)
# ifndef MSWIN
# ifdef MSWIN
# define load_dll vimLoadLib
# define close_dll FreeLibrary
# define symbol_from_dll GetProcAddress
# define load_dll_error GetWin32Error
# else
# include <dlfcn.h>
# define FARPROC void*
# if defined(PY_NO_RTLD_GLOBAL) && defined(PY3_NO_RTLD_GLOBAL)
@@ -145,11 +153,6 @@ static HINSTANCE hinstPy3 = 0; // Instance of python.dll
# define close_dll dlclose
# define symbol_from_dll dlsym
# define load_dll_error dlerror
# else
# define load_dll vimLoadLib
# define close_dll FreeLibrary
# define symbol_from_dll GetProcAddress
# define load_dll_error GetWin32Error
# endif
/*
* Wrapper defines
@@ -216,14 +219,14 @@ static HINSTANCE hinstPy3 = 0; // Instance of python.dll
# define PyObject_GetItem py3_PyObject_GetItem
# define PyObject_IsTrue py3_PyObject_IsTrue
# define PyModule_GetDict py3_PyModule_GetDict
# ifndef USE_LIMITED_API
# ifdef USE_LIMITED_API
# define Py_CompileString py3_Py_CompileString
# define PyEval_EvalCode py3_PyEval_EvalCode
# else
# undef PyRun_SimpleString
# define PyRun_SimpleString py3_PyRun_SimpleString
# undef PyRun_String
# define PyRun_String py3_PyRun_String
# else
# define Py_CompileString py3_Py_CompileString
# define PyEval_EvalCode py3_PyEval_EvalCode
# endif
# define PyObject_GetAttrString py3_PyObject_GetAttrString
# define PyObject_HasAttrString py3_PyObject_HasAttrString
@@ -321,15 +324,14 @@ static HINSTANCE hinstPy3 = 0; // Instance of python.dll
# define PyType_GenericNew py3_PyType_GenericNew
# undef PyUnicode_FromString
# define PyUnicode_FromString py3_PyUnicode_FromString
# ifndef PyUnicode_FromFormat
# define PyUnicode_FromFormat py3_PyUnicode_FromFormat
# else
# define Py_UNICODE_USE_UCS_FUNCTIONS
# ifdef Py_UNICODE_USE_UCS_FUNCTIONS
# ifdef Py_UNICODE_WIDE
# define PyUnicodeUCS4_FromFormat py3_PyUnicodeUCS4_FromFormat
# else
# define PyUnicodeUCS2_FromFormat py3_PyUnicodeUCS2_FromFormat
# endif
# else
# define PyUnicode_FromFormat py3_PyUnicode_FromFormat
# endif
# undef PyUnicode_Decode
# define PyUnicode_Decode py3_PyUnicode_Decode
@@ -388,12 +390,12 @@ static void (*py3_Py_Finalize)(void);
static void (*py3_PyErr_SetString)(PyObject *, const char *);
static void (*py3_PyErr_SetObject)(PyObject *, PyObject *);
static int (*py3_PyErr_ExceptionMatches)(PyObject *);
# ifndef USE_LIMITED_API
static int (*py3_PyRun_SimpleString)(char *);
static PyObject* (*py3_PyRun_String)(char *, int, PyObject *, PyObject *);
# else
# ifdef USE_LIMITED_API
static PyObject* (*py3_Py_CompileString)(const char *, const char *, int);
static PyObject* (*py3_PyEval_EvalCode)(PyObject *co, PyObject *globals, PyObject *locals);
# else
static int (*py3_PyRun_SimpleString)(char *);
static PyObject* (*py3_PyRun_String)(char *, int, PyObject *, PyObject *);
# endif
static PyObject* (*py3_PyObject_GetAttrString)(PyObject *, const char *);
static int (*py3_PyObject_HasAttrString)(PyObject *, const char *);
@@ -430,14 +432,14 @@ static int (*py3_PyType_GetFlags)(PyTypeObject *o);
static int (*py3_PyType_Ready)(PyTypeObject *type);
static int (*py3_PyDict_SetItemString)(PyObject *dp, char *key, PyObject *item);
static PyObject* (*py3_PyUnicode_FromString)(const char *u);
# ifndef Py_UNICODE_USE_UCS_FUNCTIONS
static PyObject* (*py3_PyUnicode_FromFormat)(const char *u, ...);
# else
# ifdef Py_UNICODE_USE_UCS_FUNCTIONS
# ifdef Py_UNICODE_WIDE
static PyObject* (*py3_PyUnicodeUCS4_FromFormat)(const char *u, ...);
# else
static PyObject* (*py3_PyUnicodeUCS2_FromFormat)(const char *u, ...);
# endif
# else
static PyObject* (*py3_PyUnicode_FromFormat)(const char *u, ...);
# endif
static PyObject* (*py3_PyUnicode_Decode)(const char *u, Py_ssize_t size,
const char *encoding, const char *errors);
@@ -594,12 +596,12 @@ static struct
{"PyErr_SetString", (PYTHON_PROC*)&py3_PyErr_SetString},
{"PyErr_SetObject", (PYTHON_PROC*)&py3_PyErr_SetObject},
{"PyErr_ExceptionMatches", (PYTHON_PROC*)&py3_PyErr_ExceptionMatches},
# ifndef USE_LIMITED_API
{"PyRun_SimpleString", (PYTHON_PROC*)&py3_PyRun_SimpleString},
{"PyRun_String", (PYTHON_PROC*)&py3_PyRun_String},
# else
# ifdef USE_LIMITED_API
{"Py_CompileString", (PYTHON_PROC*)&py3_Py_CompileString},
{"PyEval_EvalCode", (PYTHON_PROC*)&PyEval_EvalCode},
# else
{"PyRun_SimpleString", (PYTHON_PROC*)&py3_PyRun_SimpleString},
{"PyRun_String", (PYTHON_PROC*)&py3_PyRun_String},
# endif
{"PyObject_GetAttrString", (PYTHON_PROC*)&py3_PyObject_GetAttrString},
{"PyObject_HasAttrString", (PYTHON_PROC*)&py3_PyObject_HasAttrString},
@@ -668,14 +670,14 @@ static struct
# endif
{"PyUnicode_CompareWithASCIIString", (PYTHON_PROC*)&py3_PyUnicode_CompareWithASCIIString},
{"PyUnicode_AsUTF8String", (PYTHON_PROC*)&py3_PyUnicode_AsUTF8String},
# ifndef Py_UNICODE_USE_UCS_FUNCTIONS
{"PyUnicode_FromFormat", (PYTHON_PROC*)&py3_PyUnicode_FromFormat},
# else
# ifdef Py_UNICODE_USE_UCS_FUNCTIONS
# ifdef Py_UNICODE_WIDE
{"PyUnicodeUCS4_FromFormat", (PYTHON_PROC*)&py3_PyUnicodeUCS4_FromFormat},
# else
{"PyUnicodeUCS2_FromFormat", (PYTHON_PROC*)&py3_PyUnicodeUCS2_FromFormat},
# endif
# else
{"PyUnicode_FromFormat", (PYTHON_PROC*)&py3_PyUnicode_FromFormat},
# endif
{"PyBytes_AsString", (PYTHON_PROC*)&py3_PyBytes_AsString},
{"PyBytes_AsStringAndSize", (PYTHON_PROC*)&py3_PyBytes_AsStringAndSize},
@@ -1093,13 +1095,7 @@ static struct PyModuleDef vimmodule;
*/
#include "if_py_both.h"
#ifndef USE_LIMITED_API
# if PY_VERSION_HEX >= 0x030300f0
# define PY_UNICODE_GET_UTF8_CHARS(obj) PyUnicode_AsUTF8AndSize(obj, NULL)
# else
# define PY_UNICODE_GET_UTF8_CHARS _PyUnicode_AsString
# endif
#else
#ifdef USE_LIMITED_API
# if Py_LIMITED_API >= 0x030A0000
# define PY_UNICODE_GET_UTF8_CHARS(obj) PyUnicode_AsUTF8AndSize(obj, NULL)
# else
@@ -1131,6 +1127,12 @@ static char* PY_UNICODE_GET_UTF8_CHARS(PyObject* str)
return py3_unicode_utf8_chars;
}
# endif
#else // !USE_LIMITED_API
# if PY_VERSION_HEX >= 0x030300f0
# define PY_UNICODE_GET_UTF8_CHARS(obj) PyUnicode_AsUTF8AndSize(obj, NULL)
# else
# define PY_UNICODE_GET_UTF8_CHARS _PyUnicode_AsString
# endif
#endif
// NOTE: Must always be used at the start of a block, since it declares "name".

View File

@@ -174,7 +174,13 @@
#include "version.h"
#ifdef DYNAMIC_RUBY
# if !defined(MSWIN) // must come after including vim.h, where it is defined
# ifdef MSWIN // must come after including vim.h, where it is defined
# define RUBY_PROC FARPROC
# define load_dll vimLoadLib
# define symbol_from_dll GetProcAddress
# define close_dll FreeLibrary
# define load_dll_error GetWin32Error
# else
# include <dlfcn.h>
# define HINSTANCE void*
# define RUBY_PROC void*
@@ -182,12 +188,6 @@
# define symbol_from_dll dlsym
# define close_dll dlclose
# define load_dll_error dlerror
# else
# define RUBY_PROC FARPROC
# define load_dll vimLoadLib
# define symbol_from_dll GetProcAddress
# define close_dll FreeLibrary
# define load_dll_error GetWin32Error
# endif
#endif

View File

@@ -160,7 +160,13 @@ static struct ref refsdeleted; // dummy object for deleted ref list
typedef int HANDLE;
# endif
# ifndef MSWIN
# ifdef MSWIN
# define TCL_PROC FARPROC
# define load_dll vimLoadLib
# define symbol_from_dll GetProcAddress
# define close_dll FreeLibrary
# define load_dll_error GetWin32Error
# else
# include <dlfcn.h>
# define HANDLE void*
# define TCL_PROC void*
@@ -168,12 +174,6 @@ typedef int HANDLE;
# define symbol_from_dll dlsym
# define close_dll dlclose
# define load_dll_error dlerror
# else
# define TCL_PROC FARPROC
# define load_dll vimLoadLib
# define symbol_from_dll GetProcAddress
# define close_dll FreeLibrary
# define load_dll_error GetWin32Error
# endif
/*
@@ -242,10 +242,10 @@ static char *find_executable_arg = NULL;
void
vim_tcl_init(char *arg)
{
#ifndef DYNAMIC_TCL
Tcl_FindExecutable(arg);
#else
#ifdef DYNAMIC_TCL
find_executable_arg = arg;
#else
Tcl_FindExecutable(arg);
#endif
}

View File

@@ -1419,14 +1419,13 @@ utf_char2cells(int c)
{0x2e80, 0x2e99},
{0x2e9b, 0x2ef3},
{0x2f00, 0x2fd5},
{0x2ff0, 0x2ffb},
{0x3000, 0x303e},
{0x2ff0, 0x303e},
{0x3041, 0x3096},
{0x3099, 0x30ff},
{0x3105, 0x312f},
{0x3131, 0x318e},
{0x3190, 0x31e3},
{0x31f0, 0x321e},
{0x31ef, 0x321e},
{0x3220, 0x3247},
{0x3250, 0x4dbf},
{0x4e00, 0xa48c},
@@ -3152,8 +3151,10 @@ static convertStruct foldCase[] =
{0x1fbe,0x1fbe,-1,-7173},
{0x1fc8,0x1fcb,1,-86},
{0x1fcc,0x1fcc,-1,-9},
{0x1fd3,0x1fd3,-1,-7235},
{0x1fd8,0x1fd9,1,-8},
{0x1fda,0x1fdb,1,-100},
{0x1fe3,0x1fe3,-1,-7219},
{0x1fe8,0x1fe9,1,-8},
{0x1fea,0x1feb,1,-112},
{0x1fec,0x1fec,-1,-7},
@@ -3210,6 +3211,7 @@ static convertStruct foldCase[] =
{0xa7d0,0xa7d6,6,1},
{0xa7d8,0xa7f5,29,1},
{0xab70,0xabbf,1,-38864},
{0xfb05,0xfb05,-1,1},
{0xff21,0xff3a,1,32},
{0x10400,0x10427,1,40},
{0x104b0,0x104d3,1,40},

Binary file not shown.

View File

@@ -78,6 +78,14 @@ func Test_crash1()
\ ' && echo "crash 9: [OK]" >> X_crash1_result.txt' .. "\<cr>")
call TermWait(buf, 1000)
let file = 'crash/editing_arg_idx_POC_1'
let args = printf(cmn_args, vim, file)
call term_sendkeys(buf, args ..
\ ' || echo "crash 10: [OK]" >> X_crash1_result.txt' .. "\<cr>")
call TermWait(buf, 1000)
call delete('Xerr')
call delete('@')
" clean up
exe buf .. "bw!"
@@ -93,6 +101,7 @@ func Test_crash1()
\ 'crash 7: [OK]',
\ 'crash 8: [OK]',
\ 'crash 9: [OK]',
\ 'crash 10: [OK]',
\ ]
call assert_equal(expected, getline(1, '$'))

View File

@@ -206,7 +206,7 @@ def s:GetFilenameChecks(): dict<list<string>>
dnsmasq: ['/etc/dnsmasq.conf', '/etc/dnsmasq.d/file', 'any/etc/dnsmasq.conf', 'any/etc/dnsmasq.d/file'],
dockerfile: ['Containerfile', 'Dockerfile', 'dockerfile', 'file.Dockerfile', 'file.dockerfile', 'Dockerfile.debian', 'Containerfile.something'],
dosbatch: ['file.bat'],
dosini: ['/etc/yum.conf', 'file.ini', 'npmrc', '.npmrc', 'php.ini', 'php.ini-5', 'php.ini-file', '/etc/yum.repos.d/file', 'any/etc/yum.conf', 'any/etc/yum.repos.d/file', 'file.wrap', 'file.vbp'],
dosini: ['/etc/yum.conf', 'file.ini', 'npmrc', '.npmrc', 'php.ini', 'php.ini-5', 'php.ini-file', '/etc/yum.repos.d/file', 'any/etc/yum.conf', 'any/etc/yum.repos.d/file', 'file.wrap', 'file.vbp', 'ja2.ini', 'JA2.INI'],
dot: ['file.dot', 'file.gv'],
dracula: ['file.drac', 'file.drc', 'filelvs', 'filelpe', 'drac.file', 'lpe', 'lvs', 'some-lpe', 'some-lvs'],
dtd: ['file.dtd'],

View File

@@ -435,13 +435,13 @@ func Test_dict_assign()
let n = 0
let n.key = 3
END
call v9.CheckScriptFailure(lines, 'E1203: Dot can only be used on a dictionary: n.key = 3')
call v9.CheckScriptFailure(lines, 'E1203: Dot not allowed after a number: n.key = 3')
let lines =<< trim END
vim9script
var n = 0
n.key = 3
END
call v9.CheckScriptFailure(lines, 'E1203: Dot can only be used on a dictionary: n.key = 3')
call v9.CheckScriptFailure(lines, 'E1203: Dot not allowed after a number: n.key = 3')
let lines =<< trim END
var n = 0
n.key = 3

View File

@@ -1278,7 +1278,7 @@ def Test_assignment_dict()
var n: any
n.key = 5
END
v9.CheckDefExecAndScriptFailure(lines, ['E1148:', 'E1203: Dot can only be used on a dictionary: n.key = 5'], 2)
v9.CheckDefExecAndScriptFailure(lines, ['E1148:', 'E1203: Dot not allowed after a number: n.key = 5'], 2)
enddef
def Test_assignment_local()

View File

@@ -704,6 +704,16 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
2014,
/**/
2013,
/**/
2012,
/**/
2011,
/**/
2010,
/**/
2009,
/**/