aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/nvim/CMakeLists.txt22
-rw-r--r--src/nvim/api/vim.c50
-rw-r--r--src/nvim/auevents.lua106
-rw-r--r--src/nvim/buffer.c4
-rw-r--r--src/nvim/eval.c216
-rw-r--r--src/nvim/eval.h3
-rw-r--r--src/nvim/event/rstream.c14
-rw-r--r--src/nvim/ex_cmds.c14
-rw-r--r--src/nvim/ex_cmds.lua6
-rw-r--r--src/nvim/ex_docmd.c16
-rw-r--r--src/nvim/fileio.c120
-rw-r--r--src/nvim/fileio.h96
-rw-r--r--src/nvim/globals.h11
-rw-r--r--src/nvim/main.c5
-rw-r--r--src/nvim/memline.c3
-rw-r--r--src/nvim/menu.c77
-rw-r--r--src/nvim/message.c16
-rw-r--r--src/nvim/msgpack_rpc/remote_ui.c21
-rw-r--r--src/nvim/normal.c32
-rw-r--r--src/nvim/ops.c5
-rw-r--r--src/nvim/option.c1422
-rw-r--r--src/nvim/option_defs.h12
-rw-r--r--src/nvim/options.lua2777
-rw-r--r--src/nvim/os/fs.c50
-rw-r--r--src/nvim/os/os_defs.h5
-rw-r--r--src/nvim/path.c22
-rw-r--r--src/nvim/regexp.c7
-rw-r--r--src/nvim/regexp_nfa.c130
-rw-r--r--src/nvim/screen.c22
-rw-r--r--src/nvim/search.c8
-rw-r--r--src/nvim/testdir/Makefile16
-rw-r--r--src/nvim/testdir/test57.in500
-rw-r--r--src/nvim/testdir/test57.ok459
-rw-r--r--src/nvim/testdir/test79.inbin3381 -> 3335 bytes
-rw-r--r--src/nvim/testdir/test79.okbin574 -> 570 bytes
-rw-r--r--src/nvim/testdir/test80.in201
-rw-r--r--src/nvim/testdir/test80.ok131
-rw-r--r--src/nvim/testdir/test86.in1425
-rw-r--r--src/nvim/testdir/test86.ok1266
-rw-r--r--src/nvim/testdir/test87.in1402
-rw-r--r--src/nvim/testdir/test87.ok1266
-rw-r--r--src/nvim/tui/tui.c75
-rw-r--r--src/nvim/ui.c27
-rw-r--r--src/nvim/ui.h3
-rw-r--r--src/nvim/version.c20
-rw-r--r--src/nvim/vim.h13
46 files changed, 3357 insertions, 8739 deletions
diff --git a/src/nvim/CMakeLists.txt b/src/nvim/CMakeLists.txt
index 4448859b64..d49b8dc416 100644
--- a/src/nvim/CMakeLists.txt
+++ b/src/nvim/CMakeLists.txt
@@ -18,8 +18,15 @@ set(HEADER_GENERATOR ${PROJECT_SOURCE_DIR}/scripts/gendeclarations.lua)
set(GENERATED_INCLUDES_DIR ${PROJECT_BINARY_DIR}/include)
set(GENERATED_EX_CMDS_ENUM ${GENERATED_INCLUDES_DIR}/ex_cmds_enum.generated.h)
set(GENERATED_EX_CMDS_DEFS ${GENERATED_DIR}/ex_cmds_defs.generated.h)
+set(GENERATED_EVENTS_ENUM ${GENERATED_INCLUDES_DIR}/auevents_enum.generated.h)
+set(GENERATED_EVENTS_NAMES_MAP ${GENERATED_DIR}/auevents_name_map.generated.h)
+set(GENERATED_OPTIONS ${GENERATED_DIR}/options.generated.h)
set(EX_CMDS_GENERATOR ${PROJECT_SOURCE_DIR}/scripts/genex_cmds.lua)
+set(EVENTS_GENERATOR ${PROJECT_SOURCE_DIR}/scripts/gen_events.lua)
+set(OPTIONS_GENERATOR ${PROJECT_SOURCE_DIR}/scripts/genoptions.lua)
+set(EVENTS_LIST_FILE ${PROJECT_SOURCE_DIR}/src/nvim/auevents.lua)
set(EX_CMDS_DEFS_FILE ${PROJECT_SOURCE_DIR}/src/nvim/ex_cmds.lua)
+set(OPTIONS_LIST_FILE ${PROJECT_SOURCE_DIR}/src/nvim/options.lua)
include_directories(${GENERATED_DIR})
include_directories(${GENERATED_INCLUDES_DIR})
@@ -149,6 +156,9 @@ list(APPEND NEOVIM_GENERATED_SOURCES
"${MSGPACK_DISPATCH}"
"${GENERATED_EX_CMDS_ENUM}"
"${GENERATED_EX_CMDS_DEFS}"
+ "${GENERATED_EVENTS_ENUM}"
+ "${GENERATED_EVENTS_NAMES_MAP}"
+ "${GENERATED_OPTIONS}"
)
add_custom_command(OUTPUT ${GENERATED_EX_CMDS_ENUM} ${GENERATED_EX_CMDS_DEFS}
@@ -157,6 +167,18 @@ add_custom_command(OUTPUT ${GENERATED_EX_CMDS_ENUM} ${GENERATED_EX_CMDS_DEFS}
DEPENDS ${EX_CMDS_GENERATOR} ${EX_CMDS_DEFS_FILE}
)
+add_custom_command(OUTPUT ${GENERATED_EVENTS_ENUM} ${GENERATED_EVENTS_NAMES_MAP}
+ COMMAND ${LUA_PRG} ${EVENTS_GENERATOR}
+ ${PROJECT_SOURCE_DIR}/src/nvim ${GENERATED_EVENTS_ENUM} ${GENERATED_EVENTS_NAMES_MAP}
+ DEPENDS ${EVENTS_GENERATOR} ${EVENTS_LIST_FILE}
+)
+
+add_custom_command(OUTPUT ${GENERATED_OPTIONS}
+ COMMAND ${LUA_PRG} ${OPTIONS_GENERATOR}
+ ${PROJECT_SOURCE_DIR}/src/nvim ${GENERATED_OPTIONS}
+ DEPENDS ${OPTIONS_GENERATOR} ${OPTIONS_LIST_FILE}
+)
+
# Our dependencies come first.
if (LibIntl_FOUND)
diff --git a/src/nvim/api/vim.c b/src/nvim/api/vim.c
index 22bdbc2ee5..f5dadb00ea 100644
--- a/src/nvim/api/vim.c
+++ b/src/nvim/api/vim.c
@@ -164,6 +164,56 @@ Object vim_eval(String str, Error *err)
return rv;
}
+/// Call the given function with the given arguments stored in an array.
+///
+/// @param fname Function to call
+/// @param args Functions arguments packed in an Array
+/// @param[out] err Details of an error that may have occurred
+/// @return Result of the function call
+Object vim_call_function(String fname, Array args, Error *err)
+ FUNC_ATTR_DEFERRED
+{
+ Object rv = OBJECT_INIT;
+ if (args.size > MAX_FUNC_ARGS) {
+ api_set_error(err, Validation,
+ _("Function called with too many arguments."));
+ return rv;
+ }
+
+ // Convert the arguments in args from Object to typval_T values
+ typval_T vim_args[MAX_FUNC_ARGS + 1];
+ size_t i = 0; // also used for freeing the variables
+ for (; i < args.size; i++) {
+ if (!object_to_vim(args.items[i], &vim_args[i], err)) {
+ goto free_vim_args;
+ }
+ }
+
+ try_start();
+ // Call the function
+ typval_T rettv;
+ int dummy;
+ int r = call_func((char_u *) fname.data, (int) fname.size,
+ &rettv, (int) args.size, vim_args,
+ curwin->w_cursor.lnum, curwin->w_cursor.lnum, &dummy,
+ true,
+ NULL);
+ if (r == FAIL) {
+ api_set_error(err, Exception, _("Error calling function."));
+ }
+ if (!try_end(err)) {
+ rv = vim_to_object(&rettv);
+ }
+ clear_tv(&rettv);
+
+free_vim_args:
+ while (i > 0) {
+ clear_tv(&vim_args[--i]);
+ }
+
+ return rv;
+}
+
/// Calculates the number of display cells `str` occupies, tab is counted as
/// one cell.
///
diff --git a/src/nvim/auevents.lua b/src/nvim/auevents.lua
new file mode 100644
index 0000000000..af801c6f1a
--- /dev/null
+++ b/src/nvim/auevents.lua
@@ -0,0 +1,106 @@
+return {
+ events = {
+ 'BufAdd', -- after adding a buffer to the buffer list
+ 'BufDelete', -- deleting a buffer from the buffer list
+ 'BufEnter', -- after entering a buffer
+ 'BufFilePost', -- after renaming a buffer
+ 'BufFilePre', -- before renaming a buffer
+ 'BufHidden', -- just after buffer becomes hidden
+ 'BufLeave', -- before leaving a buffer
+ 'BufNew', -- after creating any buffer
+ 'BufNewFile', -- when creating a buffer for a new file
+ 'BufReadCmd', -- read buffer using command
+ 'BufReadPost', -- after reading a buffer
+ 'BufReadPre', -- before reading a buffer
+ 'BufUnload', -- just before unloading a buffer
+ 'BufWinEnter', -- after showing a buffer in a window
+ 'BufWinLeave', -- just after buffer removed from window
+ 'BufWipeout', -- just before really deleting a buffer
+ 'BufWriteCmd', -- write buffer using command
+ 'BufWritePost', -- after writing a buffer
+ 'BufWritePre', -- before writing a buffer
+ 'CmdUndefined', -- command undefined
+ 'CmdWinEnter', -- after entering the cmdline window
+ 'CmdWinLeave', -- before leaving the cmdline window
+ 'ColorScheme', -- after loading a colorscheme
+ 'CompleteDone', -- after finishing insert complete
+ 'CursorHold', -- cursor in same position for a while
+ 'CursorHoldI', -- idem, in Insert mode
+ 'CursorMoved', -- cursor was moved
+ 'CursorMovedI', -- cursor was moved in Insert mode
+ 'EncodingChanged', -- after changing the 'encoding' option
+ 'FileAppendCmd', -- append to a file using command
+ 'FileAppendPost', -- after appending to a file
+ 'FileAppendPre', -- before appending to a file
+ 'FileChangedRO', -- before first change to read-only file
+ 'FileChangedShell', -- after shell command that changed file
+ 'FileChangedShellPost', -- after (not) reloading changed file
+ 'FileReadCmd', -- read from a file using command
+ 'FileReadPost', -- after reading a file
+ 'FileReadPre', -- before reading a file
+ 'FileType', -- new file type detected (user defined)
+ 'FileWriteCmd', -- write to a file using command
+ 'FileWritePost', -- after writing a file
+ 'FileWritePre', -- before writing a file
+ 'FilterReadPost', -- after reading from a filter
+ 'FilterReadPre', -- before reading from a filter
+ 'FilterWritePost', -- after writing to a filter
+ 'FilterWritePre', -- before writing to a filter
+ 'FocusGained', -- got the focus
+ 'FocusLost', -- lost the focus to another app
+ 'FuncUndefined', -- if calling a function which doesn't exist
+ 'GUIEnter', -- after starting the GUI
+ 'GUIFailed', -- after starting the GUI failed
+ 'InsertChange', -- when changing Insert/Replace mode
+ 'InsertCharPre', -- before inserting a char
+ 'InsertEnter', -- when entering Insert mode
+ 'InsertLeave', -- when leaving Insert mode
+ 'JobActivity', -- when job sent some data
+ 'MenuPopup', -- just before popup menu is displayed
+ 'QuickFixCmdPost', -- after :make, :grep etc.
+ 'QuickFixCmdPre', -- before :make, :grep etc.
+ 'QuitPre', -- before :quit
+ 'RemoteReply', -- upon string reception from a remote vim
+ 'SessionLoadPost', -- after loading a session file
+ 'ShellCmdPost', -- after ":!cmd"
+ 'ShellFilterPost', -- after ":1,2!cmd", ":w !cmd", ":r !cmd".
+ 'SourceCmd', -- sourcing a Vim script using command
+ 'SourcePre', -- before sourcing a Vim script
+ 'SpellFileMissing', -- spell file missing
+ 'StdinReadPost', -- after reading from stdin
+ 'StdinReadPre', -- before reading from stdin
+ 'SwapExists', -- found existing swap file
+ 'Syntax', -- syntax selected
+ 'TabClosed', -- a tab has closed
+ 'TabEnter', -- after entering a tab page
+ 'TabLeave', -- before leaving a tab page
+ 'TabNew', -- when creating a new tab
+ 'TabNewEntered', -- after entering a new tab
+ 'TermChanged', -- after changing 'term'
+ 'TermResponse', -- after setting "v:termresponse"
+ 'TermOpen', -- after opening a terminal buffer
+ 'TextChanged', -- text was modified
+ 'TextChangedI', -- text was modified in Insert mode
+ 'User', -- user defined autocommand
+ 'VimEnter', -- after starting Vim
+ 'VimLeave', -- before exiting Vim
+ 'VimLeavePre', -- before exiting Vim and writing .viminfo
+ 'VimResized', -- after Vim window was resized
+ 'WinEnter', -- after entering a window
+ 'WinLeave', -- before leaving a window
+ },
+ aliases = {
+ BufCreate = 'BufAdd',
+ BufRead = 'BufReadPost',
+ BufWrite = 'BufWritePre',
+ FileEncoding = 'EncodingChanged',
+ },
+ -- List of neovim-specific events or aliases for the purpose of generating
+ -- syntax file
+ neovim_specific = {
+ TabNew=true,
+ TabNewEntered=true,
+ TabClosed=true,
+ TermEnter=true,
+ },
+}
diff --git a/src/nvim/buffer.c b/src/nvim/buffer.c
index b4b36f7fc0..2f87c9cbd2 100644
--- a/src/nvim/buffer.c
+++ b/src/nvim/buffer.c
@@ -2679,7 +2679,7 @@ void maketitle(void)
append_arg_number(curwin, buf, SPACE_FOR_ARGNR, FALSE);
- STRCAT(buf, " - VIM");
+ STRCAT(buf, " - NVIM");
if (maxlen > 0) {
/* make it shorter by removing a bit in the middle */
@@ -3576,7 +3576,7 @@ void fname_expand(buf_T *buf, char_u **ffname, char_u **sfname)
*sfname = *ffname;
*ffname = (char_u *)fix_fname((char *)*ffname); /* expand to full path */
-#ifdef FEAT_SHORTCUT
+#ifdef WIN32
if (!buf->b_p_bin) {
char_u *rfname;
diff --git a/src/nvim/eval.c b/src/nvim/eval.c
index ed0b6290dc..48f9faa777 100644
--- a/src/nvim/eval.c
+++ b/src/nvim/eval.c
@@ -300,7 +300,6 @@ static ufunc_T dumuf;
#define FUNCARG(fp, j) ((char_u **)(fp->uf_args.ga_data))[j]
#define FUNCLINE(fp, j) ((char_u **)(fp->uf_lines.ga_data))[j]
-#define MAX_FUNC_ARGS 20 /* maximum number of function arguments */
#define VAR_SHORT_LEN 20 /* short variable name length */
#define FIXVAR_CNT 12 /* number of fixed variables */
@@ -6973,7 +6972,7 @@ get_func_tv (
* Return FAIL when the function can't be called, OK otherwise.
* Also returns OK when an error was encountered while executing the function.
*/
-static int
+int
call_func (
char_u *funcname, /* name of the function */
int len, /* length of "name" */
@@ -7194,7 +7193,7 @@ static int non_zero_arg(typval_T *argvars)
* Get the float value of "argvars[0]" into "f".
* Returns FAIL when the argument is not a Number or Float.
*/
-static int get_float_arg(typval_T *argvars, float_T *f)
+static inline int get_float_arg(typval_T *argvars, float_T *f)
{
if (argvars[0].v_type == VAR_FLOAT) {
*f = argvars[0].vval.v_float;
@@ -7208,14 +7207,34 @@ static int get_float_arg(typval_T *argvars, float_T *f)
return FAIL;
}
+// Apply a floating point C function on a typval with one float_T.
+//
+// Some versions of glibc on i386 have an optimization that makes it harder to
+// call math functions indirectly from inside an inlined function, causing
+// compile-time errors. Avoid `inline` in that case. #3072
+#ifndef ARCH_32
+inline
+#endif
+static void float_op_wrapper(typval_T *argvars, typval_T *rettv,
+ float_T (*function)(float_T))
+{
+ float_T f;
+
+ rettv->v_type = VAR_FLOAT;
+ if (get_float_arg(argvars, &f) == OK) {
+ rettv->vval.v_float = function(f);
+ } else {
+ rettv->vval.v_float = 0.0;
+ }
+}
+
/*
* "abs(expr)" function
*/
static void f_abs(typval_T *argvars, typval_T *rettv)
{
if (argvars[0].v_type == VAR_FLOAT) {
- rettv->v_type = VAR_FLOAT;
- rettv->vval.v_float = fabs(argvars[0].vval.v_float);
+ float_op_wrapper(argvars, rettv, &fabs);
} else {
varnumber_T n;
int error = FALSE;
@@ -7235,13 +7254,7 @@ static void f_abs(typval_T *argvars, typval_T *rettv)
*/
static void f_acos(typval_T *argvars, typval_T *rettv)
{
- float_T f;
-
- rettv->v_type = VAR_FLOAT;
- if (get_float_arg(argvars, &f) == OK)
- rettv->vval.v_float = acos(f);
- else
- rettv->vval.v_float = 0.0;
+ float_op_wrapper(argvars, rettv, &acos);
}
/*
@@ -7395,13 +7408,7 @@ static void f_argv(typval_T *argvars, typval_T *rettv)
*/
static void f_asin(typval_T *argvars, typval_T *rettv)
{
- float_T f;
-
- rettv->v_type = VAR_FLOAT;
- if (get_float_arg(argvars, &f) == OK)
- rettv->vval.v_float = asin(f);
- else
- rettv->vval.v_float = 0.0;
+ float_op_wrapper(argvars, rettv, &asin);
}
/*
@@ -7409,13 +7416,7 @@ static void f_asin(typval_T *argvars, typval_T *rettv)
*/
static void f_atan(typval_T *argvars, typval_T *rettv)
{
- float_T f;
-
- rettv->v_type = VAR_FLOAT;
- if (get_float_arg(argvars, &f) == OK)
- rettv->vval.v_float = atan(f);
- else
- rettv->vval.v_float = 0.0;
+ float_op_wrapper(argvars, rettv, &atan);
}
/*
@@ -7744,13 +7745,7 @@ static void f_call(typval_T *argvars, typval_T *rettv)
*/
static void f_ceil(typval_T *argvars, typval_T *rettv)
{
- float_T f;
-
- rettv->v_type = VAR_FLOAT;
- if (get_float_arg(argvars, &f) == OK)
- rettv->vval.v_float = ceil(f);
- else
- rettv->vval.v_float = 0.0;
+ float_op_wrapper(argvars, rettv, &ceil);
}
/*
@@ -7954,13 +7949,7 @@ static void f_copy(typval_T *argvars, typval_T *rettv)
*/
static void f_cos(typval_T *argvars, typval_T *rettv)
{
- float_T f;
-
- rettv->v_type = VAR_FLOAT;
- if (get_float_arg(argvars, &f) == OK)
- rettv->vval.v_float = cos(f);
- else
- rettv->vval.v_float = 0.0;
+ float_op_wrapper(argvars, rettv, &cos);
}
/*
@@ -7968,13 +7957,7 @@ static void f_cos(typval_T *argvars, typval_T *rettv)
*/
static void f_cosh(typval_T *argvars, typval_T *rettv)
{
- float_T f;
-
- rettv->v_type = VAR_FLOAT;
- if (get_float_arg(argvars, &f) == OK)
- rettv->vval.v_float = cosh(f);
- else
- rettv->vval.v_float = 0.0;
+ float_op_wrapper(argvars, rettv, &cosh);
}
/*
@@ -8373,13 +8356,7 @@ static void f_exists(typval_T *argvars, typval_T *rettv)
*/
static void f_exp(typval_T *argvars, typval_T *rettv)
{
- float_T f;
-
- rettv->v_type = VAR_FLOAT;
- if (get_float_arg(argvars, &f) == OK)
- rettv->vval.v_float = exp(f);
- else
- rettv->vval.v_float = 0.0;
+ float_op_wrapper(argvars, rettv, &exp);
}
/*
@@ -8858,13 +8835,7 @@ static void f_float2nr(typval_T *argvars, typval_T *rettv)
*/
static void f_floor(typval_T *argvars, typval_T *rettv)
{
- float_T f;
-
- rettv->v_type = VAR_FLOAT;
- if (get_float_arg(argvars, &f) == OK)
- rettv->vval.v_float = floor(f);
- else
- rettv->vval.v_float = 0.0;
+ float_op_wrapper(argvars, rettv, &floor);
}
/*
@@ -10042,9 +10013,7 @@ static void f_has(typval_T *argvars, typval_T *rettv)
#endif
"arabic",
"autocmd",
-#if defined(FEAT_BROWSE) && (defined(USE_FILE_CHOOSER) \
- || defined(FEAT_GUI_W32) \
- || defined(FEAT_GUI_MOTIF))
+#ifdef FEAT_BROWSE
"browsefilter",
#endif
"byte_offset",
@@ -11421,13 +11390,7 @@ static void get_maparg(typval_T *argvars, typval_T *rettv, int exact)
*/
static void f_log(typval_T *argvars, typval_T *rettv)
{
- float_T f;
-
- rettv->v_type = VAR_FLOAT;
- if (get_float_arg(argvars, &f) == OK)
- rettv->vval.v_float = log(f);
- else
- rettv->vval.v_float = 0.0;
+ float_op_wrapper(argvars, rettv, &log);
}
/*
@@ -11435,13 +11398,7 @@ static void f_log(typval_T *argvars, typval_T *rettv)
*/
static void f_log10(typval_T *argvars, typval_T *rettv)
{
- float_T f;
-
- rettv->v_type = VAR_FLOAT;
- if (get_float_arg(argvars, &f) == OK)
- rettv->vval.v_float = log10(f);
- else
- rettv->vval.v_float = 0.0;
+ float_op_wrapper(argvars, rettv, &log10);
}
@@ -11833,33 +11790,6 @@ static void f_min(typval_T *argvars, typval_T *rettv)
max_min(argvars, rettv, FALSE);
}
-
-/*
- * Create the directory in which "dir" is located, and higher levels when
- * needed.
- */
-static int mkdir_recurse(char_u *dir, int prot)
-{
- char_u *p;
- char_u *updir;
- int r = FAIL;
-
- /* Get end of directory name in "dir".
- * We're done when it's "/" or "c:/". */
- p = path_tail_with_sep(dir);
- if (p <= get_past_head(dir))
- return OK;
-
- /* If the directory exists we're done. Otherwise: create it.*/
- updir = vim_strnsave(dir, (int)(p - dir));
- if (os_isdir(updir))
- r = OK;
- else if (mkdir_recurse(updir, prot) == OK)
- r = vim_mkdir_emsg(updir, prot);
- xfree(updir);
- return r;
-}
-
/*
* "mkdir()" function
*/
@@ -11884,8 +11814,19 @@ static void f_mkdir(typval_T *argvars, typval_T *rettv)
if (argvars[1].v_type != VAR_UNKNOWN) {
if (argvars[2].v_type != VAR_UNKNOWN)
prot = get_tv_number_chk(&argvars[2], NULL);
- if (prot != -1 && STRCMP(get_tv_string(&argvars[1]), "p") == 0)
- mkdir_recurse(dir, prot);
+ if (prot != -1 && STRCMP(get_tv_string(&argvars[1]), "p") == 0) {
+ char *failed_dir;
+ int ret = os_mkdir_recurse((char *) dir, prot, &failed_dir);
+ if (ret != 0) {
+ EMSG3(_(e_mkdir), failed_dir, os_strerror(ret));
+ xfree(failed_dir);
+ rettv->vval.v_number = FAIL;
+ return;
+ } else {
+ rettv->vval.v_number = OK;
+ return;
+ }
+ }
}
rettv->vval.v_number = prot == -1 ? FAIL : vim_mkdir_emsg(dir, prot);
}
@@ -13356,7 +13297,7 @@ static void f_resolve(typval_T *argvars, typval_T *rettv)
#endif
p = get_tv_string(&argvars[0]);
-#ifdef FEAT_SHORTCUT
+#ifdef WIN32
{
char_u *v = NULL;
@@ -13692,13 +13633,7 @@ theend:
*/
static void f_round(typval_T *argvars, typval_T *rettv)
{
- float_T f;
-
- rettv->v_type = VAR_FLOAT;
- if (get_float_arg(argvars, &f) == OK)
- rettv->vval.v_float = round(f);
- else
- rettv->vval.v_float = 0.0;
+ float_op_wrapper(argvars, rettv, &round);
}
// "rpcnotify()" function
@@ -14829,13 +14764,7 @@ static void f_simplify(typval_T *argvars, typval_T *rettv)
*/
static void f_sin(typval_T *argvars, typval_T *rettv)
{
- float_T f;
-
- rettv->v_type = VAR_FLOAT;
- if (get_float_arg(argvars, &f) == OK)
- rettv->vval.v_float = sin(f);
- else
- rettv->vval.v_float = 0.0;
+ float_op_wrapper(argvars, rettv, &sin);
}
/*
@@ -14843,13 +14772,7 @@ static void f_sin(typval_T *argvars, typval_T *rettv)
*/
static void f_sinh(typval_T *argvars, typval_T *rettv)
{
- float_T f;
-
- rettv->v_type = VAR_FLOAT;
- if (get_float_arg(argvars, &f) == OK)
- rettv->vval.v_float = sinh(f);
- else
- rettv->vval.v_float = 0.0;
+ float_op_wrapper(argvars, rettv, &sinh);
}
/// struct used in the array that's given to qsort()
@@ -15320,13 +15243,7 @@ static void f_split(typval_T *argvars, typval_T *rettv)
*/
static void f_sqrt(typval_T *argvars, typval_T *rettv)
{
- float_T f;
-
- rettv->v_type = VAR_FLOAT;
- if (get_float_arg(argvars, &f) == OK)
- rettv->vval.v_float = sqrt(f);
- else
- rettv->vval.v_float = 0.0;
+ float_op_wrapper(argvars, rettv, &sqrt);
}
/*
@@ -15699,6 +15616,8 @@ static void f_synIDattr(typval_T *argvars, typval_T *rettv)
modec = TOLOWER_ASC(mode[0]);
if (modec != 'c' && modec != 'g')
modec = 0; /* replace invalid with current */
+ } else if (ui_rgb_attached()) {
+ modec = 'g';
} else {
modec = 'c';
}
@@ -16210,13 +16129,7 @@ static void f_test(typval_T *argvars, typval_T *rettv)
*/
static void f_tan(typval_T *argvars, typval_T *rettv)
{
- float_T f;
-
- rettv->v_type = VAR_FLOAT;
- if (get_float_arg(argvars, &f) == OK)
- rettv->vval.v_float = tan(f);
- else
- rettv->vval.v_float = 0.0;
+ float_op_wrapper(argvars, rettv, &tan);
}
/*
@@ -16224,13 +16137,7 @@ static void f_tan(typval_T *argvars, typval_T *rettv)
*/
static void f_tanh(typval_T *argvars, typval_T *rettv)
{
- float_T f;
-
- rettv->v_type = VAR_FLOAT;
- if (get_float_arg(argvars, &f) == OK)
- rettv->vval.v_float = tanh(f);
- else
- rettv->vval.v_float = 0.0;
+ float_op_wrapper(argvars, rettv, &tanh);
}
/*
@@ -16378,14 +16285,7 @@ error:
*/
static void f_trunc(typval_T *argvars, typval_T *rettv)
{
- float_T f;
-
- rettv->v_type = VAR_FLOAT;
- if (get_float_arg(argvars, &f) == OK)
- /* trunc() is not in C90, use floor() or ceil() instead. */
- rettv->vval.v_float = f > 0 ? floor(f) : ceil(f);
- else
- rettv->vval.v_float = 0.0;
+ float_op_wrapper(argvars, rettv, &trunc);
}
/*
diff --git a/src/nvim/eval.h b/src/nvim/eval.h
index f3a1c26a5d..8f065eda33 100644
--- a/src/nvim/eval.h
+++ b/src/nvim/eval.h
@@ -69,6 +69,9 @@ enum {
VV_LEN, /* number of v: vars */
};
+/// Maximum number of function arguments
+#define MAX_FUNC_ARGS 20
+
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "eval.h.generated.h"
#endif
diff --git a/src/nvim/event/rstream.c b/src/nvim/event/rstream.c
index 78c044347f..9d2439ac2b 100644
--- a/src/nvim/event/rstream.c
+++ b/src/nvim/event/rstream.c
@@ -112,7 +112,7 @@ static void read_cb(uv_stream_t *uvstream, ssize_t cnt, const uv_buf_t *buf)
// Read error or EOF, either way stop the stream and invoke the callback
// with eof == true
uv_read_stop(uvstream);
- stream->read_cb(stream, stream->buffer, stream->data, true);
+ invoke_read_cb(stream, true);
}
return;
}
@@ -122,7 +122,7 @@ static void read_cb(uv_stream_t *uvstream, ssize_t cnt, const uv_buf_t *buf)
// Data was already written, so all we need is to update 'wpos' to reflect
// the space actually used in the buffer.
rbuffer_produced(stream->buffer, nread);
- stream->read_cb(stream, stream->buffer, stream->data, false);
+ invoke_read_cb(stream, false);
}
// Called by the by the 'idle' handle to emulate a reading event
@@ -156,7 +156,7 @@ static void fread_idle_cb(uv_idle_t *handle)
if (req.result <= 0) {
uv_idle_stop(&stream->uv.idle);
- stream->read_cb(stream, stream->buffer, stream->data, true);
+ invoke_read_cb(stream, true);
return;
}
@@ -164,4 +164,12 @@ static void fread_idle_cb(uv_idle_t *handle)
size_t nread = (size_t) req.result;
rbuffer_produced(stream->buffer, nread);
stream->fpos += nread;
+ invoke_read_cb(stream, false);
+}
+
+static void invoke_read_cb(Stream *stream, bool eof)
+{
+ if (stream->read_cb) {
+ stream->read_cb(stream, stream->buffer, stream->data, eof);
+ }
}
diff --git a/src/nvim/ex_cmds.c b/src/nvim/ex_cmds.c
index 2dc5c3045d..cacef01b19 100644
--- a/src/nvim/ex_cmds.c
+++ b/src/nvim/ex_cmds.c
@@ -3472,18 +3472,8 @@ void do_sub(exarg_T *eap)
}
if (!eap->skip) {
- /* In POSIX vi ":s/pat/%/" uses the previous subst. string. */
- if (STRCMP(sub, "%") == 0
- && vim_strchr(p_cpo, CPO_SUBPERCENT) != NULL) {
- if (old_sub == NULL) { /* there is no previous command */
- EMSG(_(e_nopresub));
- return;
- }
- sub = old_sub;
- } else {
- xfree(old_sub);
- old_sub = vim_strsave(sub);
- }
+ xfree(old_sub);
+ old_sub = vim_strsave(sub);
}
} else if (!eap->skip) { /* use previous pattern and substitution */
if (old_sub == NULL) { /* there is no previous command */
diff --git a/src/nvim/ex_cmds.lua b/src/nvim/ex_cmds.lua
index 41c596c5a8..5221554306 100644
--- a/src/nvim/ex_cmds.lua
+++ b/src/nvim/ex_cmds.lua
@@ -3165,12 +3165,6 @@ return {
func='ex_previous',
},
{
- command='Print',
- flags=bit.bor(RANGE, WHOLEFOLD, COUNT, EXFLAGS, TRLBAR, CMDWIN),
- addr_type=ADDR_LINES,
- func='ex_print',
- },
- {
command='~',
enum='CMD_tilde',
flags=bit.bor(RANGE, WHOLEFOLD, EXTRA, CMDWIN, MODIFY),
diff --git a/src/nvim/ex_docmd.c b/src/nvim/ex_docmd.c
index 3b6e05fd8a..3c57537397 100644
--- a/src/nvim/ex_docmd.c
+++ b/src/nvim/ex_docmd.c
@@ -2401,9 +2401,8 @@ static char_u *find_command(exarg_T *eap, int *full)
break;
}
- /* Look for a user defined command as a last resort. Let ":Print" be
- * overruled by a user defined command. */
- if ((eap->cmdidx == CMD_SIZE || eap->cmdidx == CMD_Print)
+ // Look for a user defined command as a last resort.
+ if ((eap->cmdidx == CMD_SIZE)
&& *eap->cmd >= 'A' && *eap->cmd <= 'Z') {
/* User defined commands may contain digits. */
while (ASCII_ISALNUM(*p))
@@ -6834,12 +6833,6 @@ void ex_cd(exarg_T *eap)
{
if (allbuf_locked())
return;
- if (vim_strchr(p_cpo, CPO_CHDIR) != NULL && curbufIsChanged()
- && !eap->forceit) {
- EMSG(_(
- "E747: Cannot change directory, buffer is modified (add ! to override)"));
- return;
- }
/* ":cd -": Change to previous directory */
if (STRCMP(new_dir, "-") == 0) {
@@ -7554,8 +7547,9 @@ static void ex_mkrc(exarg_T *eap)
int vim_mkdir_emsg(char_u *name, int prot)
{
- if (os_mkdir((char *)name, prot) != 0) {
- EMSG2(_("E739: Cannot create directory: %s"), name);
+ int ret;
+ if ((ret = os_mkdir((char *)name, prot)) != 0) {
+ EMSG3(_(e_mkdir), name, os_strerror(ret));
return FAIL;
}
return OK;
diff --git a/src/nvim/fileio.c b/src/nvim/fileio.c
index 4dfa155e61..58e4873e00 100644
--- a/src/nvim/fileio.c
+++ b/src/nvim/fileio.c
@@ -415,14 +415,11 @@ readfile (
msg_scroll = TRUE; /* don't overwrite previous file message */
/*
- * If the name ends in a path separator, we can't open it. Check here,
- * because reading the file may actually work, but then creating the swap
- * file may destroy it! Reported on MS-DOS and Win 95.
* If the name is too long we might crash further on, quit here.
*/
if (fname != NULL && *fname != NUL) {
p = fname + STRLEN(fname);
- if (after_pathsep((char *)fname, (char *)p) || STRLEN(fname) >= MAXPATHL) {
+ if (STRLEN(fname) >= MAXPATHL) {
filemess(curbuf, fname, (char_u *)_("Illegal file name"), 0);
msg_end();
msg_scroll = msg_save;
@@ -5121,116 +5118,9 @@ void forward_slash(char_u *fname)
/*
* Code for automatic commands.
*/
-
-
-static struct event_name {
- char *name; /* event name */
- event_T event; /* event number */
-} event_names[] =
-{
- {"BufAdd", EVENT_BUFADD},
- {"BufCreate", EVENT_BUFADD},
- {"BufDelete", EVENT_BUFDELETE},
- {"BufEnter", EVENT_BUFENTER},
- {"BufFilePost", EVENT_BUFFILEPOST},
- {"BufFilePre", EVENT_BUFFILEPRE},
- {"BufHidden", EVENT_BUFHIDDEN},
- {"BufLeave", EVENT_BUFLEAVE},
- {"BufNew", EVENT_BUFNEW},
- {"BufNewFile", EVENT_BUFNEWFILE},
- {"BufRead", EVENT_BUFREADPOST},
- {"BufReadCmd", EVENT_BUFREADCMD},
- {"BufReadPost", EVENT_BUFREADPOST},
- {"BufReadPre", EVENT_BUFREADPRE},
- {"BufUnload", EVENT_BUFUNLOAD},
- {"BufWinEnter", EVENT_BUFWINENTER},
- {"BufWinLeave", EVENT_BUFWINLEAVE},
- {"BufWipeout", EVENT_BUFWIPEOUT},
- {"BufWrite", EVENT_BUFWRITEPRE},
- {"BufWritePost", EVENT_BUFWRITEPOST},
- {"BufWritePre", EVENT_BUFWRITEPRE},
- {"BufWriteCmd", EVENT_BUFWRITECMD},
- {"CmdwinEnter", EVENT_CMDWINENTER},
- {"CmdwinLeave", EVENT_CMDWINLEAVE},
- {"CmdUndefined", EVENT_CMDUNDEFINED},
- {"ColorScheme", EVENT_COLORSCHEME},
- {"CompleteDone", EVENT_COMPLETEDONE},
- {"CursorHold", EVENT_CURSORHOLD},
- {"CursorHoldI", EVENT_CURSORHOLDI},
- {"CursorMoved", EVENT_CURSORMOVED},
- {"CursorMovedI", EVENT_CURSORMOVEDI},
- {"EncodingChanged", EVENT_ENCODINGCHANGED},
- {"FileEncoding", EVENT_ENCODINGCHANGED},
- {"FileAppendPost", EVENT_FILEAPPENDPOST},
- {"FileAppendPre", EVENT_FILEAPPENDPRE},
- {"FileAppendCmd", EVENT_FILEAPPENDCMD},
- {"FileChangedShell",EVENT_FILECHANGEDSHELL},
- {"FileChangedShellPost",EVENT_FILECHANGEDSHELLPOST},
- {"FileChangedRO", EVENT_FILECHANGEDRO},
- {"FileReadPost", EVENT_FILEREADPOST},
- {"FileReadPre", EVENT_FILEREADPRE},
- {"FileReadCmd", EVENT_FILEREADCMD},
- {"FileType", EVENT_FILETYPE},
- {"FileWritePost", EVENT_FILEWRITEPOST},
- {"FileWritePre", EVENT_FILEWRITEPRE},
- {"FileWriteCmd", EVENT_FILEWRITECMD},
- {"FilterReadPost", EVENT_FILTERREADPOST},
- {"FilterReadPre", EVENT_FILTERREADPRE},
- {"FilterWritePost", EVENT_FILTERWRITEPOST},
- {"FilterWritePre", EVENT_FILTERWRITEPRE},
- {"FocusGained", EVENT_FOCUSGAINED},
- {"FocusLost", EVENT_FOCUSLOST},
- {"FuncUndefined", EVENT_FUNCUNDEFINED},
- {"GUIEnter", EVENT_GUIENTER},
- {"GUIFailed", EVENT_GUIFAILED},
- {"InsertChange", EVENT_INSERTCHANGE},
- {"InsertEnter", EVENT_INSERTENTER},
- {"InsertLeave", EVENT_INSERTLEAVE},
- {"InsertCharPre", EVENT_INSERTCHARPRE},
- {"MenuPopup", EVENT_MENUPOPUP},
- {"QuickFixCmdPost", EVENT_QUICKFIXCMDPOST},
- {"QuickFixCmdPre", EVENT_QUICKFIXCMDPRE},
- {"QuitPre", EVENT_QUITPRE},
- {"RemoteReply", EVENT_REMOTEREPLY},
- {"SessionLoadPost", EVENT_SESSIONLOADPOST},
- {"ShellCmdPost", EVENT_SHELLCMDPOST},
- {"ShellFilterPost", EVENT_SHELLFILTERPOST},
- {"SourcePre", EVENT_SOURCEPRE},
- {"SourceCmd", EVENT_SOURCECMD},
- {"SpellFileMissing",EVENT_SPELLFILEMISSING},
- {"StdinReadPost", EVENT_STDINREADPOST},
- {"StdinReadPre", EVENT_STDINREADPRE},
- {"SwapExists", EVENT_SWAPEXISTS},
- {"Syntax", EVENT_SYNTAX},
- {"TabClosed", EVENT_TABCLOSED},
- {"TabEnter", EVENT_TABENTER},
- {"TabLeave", EVENT_TABLEAVE},
- {"TabNew", EVENT_TABNEW},
- {"TabNewEntered", EVENT_TABNEWENTERED},
- {"TermChanged", EVENT_TERMCHANGED},
- {"TermOpen", EVENT_TERMOPEN},
- {"TermResponse", EVENT_TERMRESPONSE},
- {"TextChanged", EVENT_TEXTCHANGED},
- {"TextChangedI", EVENT_TEXTCHANGEDI},
- {"User", EVENT_USER},
- {"VimEnter", EVENT_VIMENTER},
- {"VimLeave", EVENT_VIMLEAVE},
- {"VimLeavePre", EVENT_VIMLEAVEPRE},
- {"WinEnter", EVENT_WINENTER},
- {"WinLeave", EVENT_WINLEAVE},
- {"VimResized", EVENT_VIMRESIZED},
- {NULL, (event_T)0}
-};
-
-static AutoPat *first_autopat[NUM_EVENTS] =
-{
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL
-};
+#ifdef INCLUDE_GENERATED_DECLARATIONS
+# include "auevents_name_map.generated.h"
+#endif
static AutoPatCmd *active_apc_list = NULL; /* stack of active autocommands */
@@ -5526,7 +5416,7 @@ static event_T event_name2nr(char_u *start, char_u **end)
for (p = start; *p && !ascii_iswhite(*p) && *p != ','; ++p)
;
for (i = 0; event_names[i].name != NULL; ++i) {
- len = (int)STRLEN(event_names[i].name);
+ len = (int) event_names[i].len;
if (len == p - start && STRNICMP(event_names[i].name, start, len) == 0)
break;
}
diff --git a/src/nvim/fileio.h b/src/nvim/fileio.h
index 3b37d359d7..d93f3f3eb3 100644
--- a/src/nvim/fileio.h
+++ b/src/nvim/fileio.h
@@ -13,100 +13,6 @@
#define READ_KEEP_UNDO 0x20 /* keep undo info*/
/*
- * Events for autocommands.
- */
-typedef enum auto_event {
- EVENT_BUFADD = 0, /* after adding a buffer to the buffer list */
- EVENT_BUFNEW, /* after creating any buffer */
- EVENT_BUFDELETE, /* deleting a buffer from the buffer list */
- EVENT_BUFWIPEOUT, /* just before really deleting a buffer */
- EVENT_BUFENTER, /* after entering a buffer */
- EVENT_BUFFILEPOST, /* after renaming a buffer */
- EVENT_BUFFILEPRE, /* before renaming a buffer */
- EVENT_BUFLEAVE, /* before leaving a buffer */
- EVENT_BUFNEWFILE, /* when creating a buffer for a new file */
- EVENT_BUFREADPOST, /* after reading a buffer */
- EVENT_BUFREADPRE, /* before reading a buffer */
- EVENT_BUFREADCMD, /* read buffer using command */
- EVENT_BUFUNLOAD, /* just before unloading a buffer */
- EVENT_BUFHIDDEN, /* just after buffer becomes hidden */
- EVENT_BUFWINENTER, /* after showing a buffer in a window */
- EVENT_BUFWINLEAVE, /* just after buffer removed from window */
- EVENT_BUFWRITEPOST, /* after writing a buffer */
- EVENT_BUFWRITEPRE, /* before writing a buffer */
- EVENT_BUFWRITECMD, /* write buffer using command */
- EVENT_CMDWINENTER, /* after entering the cmdline window */
- EVENT_CMDWINLEAVE, /* before leaving the cmdline window */
- EVENT_COLORSCHEME, /* after loading a colorscheme */
- EVENT_COMPLETEDONE, /* after finishing insert complete */
- EVENT_FILEAPPENDPOST, /* after appending to a file */
- EVENT_FILEAPPENDPRE, /* before appending to a file */
- EVENT_FILEAPPENDCMD, /* append to a file using command */
- EVENT_FILECHANGEDSHELL, /* after shell command that changed file */
- EVENT_FILECHANGEDSHELLPOST, /* after (not) reloading changed file */
- EVENT_FILECHANGEDRO, /* before first change to read-only file */
- EVENT_FILEREADPOST, /* after reading a file */
- EVENT_FILEREADPRE, /* before reading a file */
- EVENT_FILEREADCMD, /* read from a file using command */
- EVENT_FILETYPE, /* new file type detected (user defined) */
- EVENT_FILEWRITEPOST, /* after writing a file */
- EVENT_FILEWRITEPRE, /* before writing a file */
- EVENT_FILEWRITECMD, /* write to a file using command */
- EVENT_FILTERREADPOST, /* after reading from a filter */
- EVENT_FILTERREADPRE, /* before reading from a filter */
- EVENT_FILTERWRITEPOST, /* after writing to a filter */
- EVENT_FILTERWRITEPRE, /* before writing to a filter */
- EVENT_FOCUSGAINED, /* got the focus */
- EVENT_FOCUSLOST, /* lost the focus to another app */
- EVENT_GUIENTER, /* after starting the GUI */
- EVENT_GUIFAILED, /* after starting the GUI failed */
- EVENT_INSERTCHANGE, /* when changing Insert/Replace mode */
- EVENT_INSERTENTER, /* when entering Insert mode */
- EVENT_INSERTLEAVE, /* when leaving Insert mode */
- EVENT_MENUPOPUP, /* just before popup menu is displayed */
- EVENT_QUICKFIXCMDPOST, /* after :make, :grep etc. */
- EVENT_QUICKFIXCMDPRE, /* before :make, :grep etc. */
- EVENT_QUITPRE, /* before :quit */
- EVENT_SESSIONLOADPOST, /* after loading a session file */
- EVENT_STDINREADPOST, /* after reading from stdin */
- EVENT_STDINREADPRE, /* before reading from stdin */
- EVENT_SYNTAX, /* syntax selected */
- EVENT_TERMCHANGED, /* after changing 'term' */
- EVENT_TERMRESPONSE, /* after setting "v:termresponse" */
- EVENT_USER, /* user defined autocommand */
- EVENT_VIMENTER, /* after starting Vim */
- EVENT_VIMLEAVE, /* before exiting Vim */
- EVENT_VIMLEAVEPRE, /* before exiting Vim and writing .viminfo */
- EVENT_VIMRESIZED, /* after Vim window was resized */
- EVENT_WINENTER, /* after entering a window */
- EVENT_WINLEAVE, /* before leaving a window */
- EVENT_ENCODINGCHANGED, /* after changing the 'encoding' option */
- EVENT_INSERTCHARPRE, /* before inserting a char */
- EVENT_CURSORHOLD, /* cursor in same position for a while */
- EVENT_CURSORHOLDI, /* idem, in Insert mode */
- EVENT_FUNCUNDEFINED, /* if calling a function which doesn't exist */
- EVENT_REMOTEREPLY, /* upon string reception from a remote vim */
- EVENT_SWAPEXISTS, /* found existing swap file */
- EVENT_SOURCEPRE, /* before sourcing a Vim script */
- EVENT_SOURCECMD, /* sourcing a Vim script using command */
- EVENT_SPELLFILEMISSING, /* spell file missing */
- EVENT_CURSORMOVED, /* cursor was moved */
- EVENT_CURSORMOVEDI, /* cursor was moved in Insert mode */
- EVENT_TABCLOSED, /* a tab has closed */
- EVENT_TABLEAVE, /* before leaving a tab page */
- EVENT_TABENTER, /* after entering a tab page */
- EVENT_TABNEW, /* when creating a new tab */
- EVENT_TABNEWENTERED, /* after entering a new tab */
- EVENT_SHELLCMDPOST, /* after ":!cmd" */
- EVENT_SHELLFILTERPOST, /* after ":1,2!cmd", ":w !cmd", ":r !cmd". */
- EVENT_TERMOPEN, // after opening a terminal buffer
- EVENT_TEXTCHANGED, /* text was modified */
- EVENT_TEXTCHANGEDI, /* text was modified in Insert mode*/
- EVENT_CMDUNDEFINED, ///< command undefined
- NUM_EVENTS /* MUST be the last one */
-} event_T;
-
-/*
* Struct to save values in before executing autocommands for a buffer that is
* not the current buffer.
*/
@@ -120,6 +26,8 @@ typedef struct {
} aco_save_T;
#ifdef INCLUDE_GENERATED_DECLARATIONS
+// Events for autocommands
+# include "auevents_enum.generated.h"
# include "fileio.h.generated.h"
#endif
#endif // NVIM_FILEIO_H
diff --git a/src/nvim/globals.h b/src/nvim/globals.h
index c7164ef1f1..e4dcad9afb 100644
--- a/src/nvim/globals.h
+++ b/src/nvim/globals.h
@@ -59,7 +59,7 @@
/* Values for "starting" */
#define NO_SCREEN 2 /* no screen updating yet */
#define NO_BUFFERS 1 /* not all buffers loaded yet */
-/* 0 not starting anymore */
+/* 0 not starting anymore */
/*
* Number of Rows and Columns in the screen.
@@ -68,12 +68,16 @@
* They may have different values when the screen wasn't (re)allocated yet
* after setting Rows or Columns (e.g., when starting up).
*/
+
+#define DFLT_COLS 80 /* default value for 'columns' */
+#define DFLT_ROWS 24 /* default value for 'lines' */
+
EXTERN long Rows /* nr of rows in the screen */
#ifdef DO_INIT
- = 24L
+ = DFLT_ROWS
#endif
;
-EXTERN long Columns INIT(= 80); /* nr of columns in the screen */
+EXTERN long Columns INIT(= DFLT_COLS); /* nr of columns in the screen */
/*
* The characters and attributes cached for the screen.
@@ -1113,6 +1117,7 @@ EXTERN char_u e_jobtblfull[] INIT(= N_("E901: Job table is full"));
EXTERN char_u e_jobexe[] INIT(= N_("E902: \"%s\" is not an executable"));
EXTERN char_u e_jobnotpty[] INIT(= N_("E904: Job is not connected to a pty"));
EXTERN char_u e_libcall[] INIT(= N_("E364: Library call failed for \"%s()\""));
+EXTERN char_u e_mkdir[] INIT(= N_("E739: Cannot create directory %s: %s"));
EXTERN char_u e_markinval[] INIT(= N_("E19: Mark has invalid line number"));
EXTERN char_u e_marknotset[] INIT(= N_("E20: Mark not set"));
EXTERN char_u e_modifiable[] INIT(= N_(
diff --git a/src/nvim/main.c b/src/nvim/main.c
index e2ae63e134..bfaeada6de 100644
--- a/src/nvim/main.c
+++ b/src/nvim/main.c
@@ -521,6 +521,11 @@ int main(int argc, char **argv)
if (restart_edit != 0)
stuffcharReadbuff(K_NOP);
+ // WORKAROUND(mhi): #3023
+ if (cb_flags & CB_UNNAMEDMASK) {
+ (void)eval_has_provider("clipboard");
+ }
+
TIME_MSG("before starting main loop");
/*
diff --git a/src/nvim/memline.c b/src/nvim/memline.c
index f11dc636a3..53f9a544b4 100644
--- a/src/nvim/memline.c
+++ b/src/nvim/memline.c
@@ -587,8 +587,7 @@ void ml_close(buf_T *buf, int del_file)
void ml_close_all(int del_file)
{
FOR_ALL_BUFFERS(buf) {
- ml_close(buf, del_file && ((buf->b_flags & BF_PRESERVED) == 0
- || vim_strchr(p_cpo, CPO_PRESERVE) == NULL));
+ ml_close(buf, del_file && ((buf->b_flags & BF_PRESERVED) == 0));
}
spell_delete_wordlist(); /* delete the internal wordlist */
vim_deltempdir(); /* delete created temp directory */
diff --git a/src/nvim/menu.c b/src/nvim/menu.c
index 06351581ea..d965de6019 100644
--- a/src/nvim/menu.c
+++ b/src/nvim/menu.c
@@ -460,12 +460,6 @@ add_menu_path (
menu->silent[i] = menuarg->silent[0];
}
}
-#if defined(FEAT_TOOLBAR) && !defined(FEAT_GUI_W32) \
- && (defined(FEAT_BEVAL) || defined(FEAT_GUI_GTK))
- /* Need to update the menu tip. */
- if (modes & MENU_TIP_MODE)
- gui_mch_menu_set_tip(menu);
-#endif
}
return OK;
@@ -613,12 +607,6 @@ remove_menu (
menu->modes |= child->modes;
if (modes & MENU_TIP_MODE) {
free_menu_string(menu, MENU_INDEX_TIP);
-#if defined(FEAT_TOOLBAR) && !defined(FEAT_GUI_W32) \
- && (defined(FEAT_BEVAL) || defined(FEAT_GUI_GTK))
- /* Need to update the menu tip. */
- if (gui.in_use)
- gui_mch_menu_set_tip(menu);
-#endif
}
if ((menu->modes & MENU_ALL_MODES) == 0) {
/* The menu item is no longer valid in ANY mode, so delete it */
@@ -1269,11 +1257,15 @@ void ex_emenu(exarg_T *eap)
/* Found the menu, so execute.
* Use the Insert mode entry when returning to Insert mode. */
- if (restart_edit
- && !current_SID
- ) {
+ if (((State & INSERT) || restart_edit) && !current_SID) {
mode = (char_u *)"Insert";
idx = MENU_INDEX_INSERT;
+ } else if (get_real_state() & VISUAL) {
+ /* Detect real visual mode -- if we are really in visual mode we
+ * don't need to do any guesswork to figure out what the selection
+ * is. Just execute the visual binding for the menu. */
+ mode = (char_u *)"Visual";
+ idx = MENU_INDEX_VISUAL;
} else if (eap->addr_count) {
pos_T tpos;
@@ -1332,61 +1324,6 @@ void ex_emenu(exarg_T *eap)
EMSG2(_("E335: Menu not defined for %s mode"), mode);
}
-#if defined(FEAT_GUI_MSWIN) \
- || defined(FEAT_GUI_GTK) \
- || defined(FEAT_BEVAL_TIP)
-/*
- * Given a menu descriptor, e.g. "File.New", find it in the menu hierarchy.
- */
-vimmenu_T *gui_find_menu(char_u *path_name)
-{
- vimmenu_T *menu = NULL;
- char_u *name;
- char_u *saved_name;
- char_u *p;
-
- menu = root_menu;
-
- saved_name = vim_strsave(path_name);
-
- name = saved_name;
- while (*name) {
- /* find the end of one dot-separated name and put a NUL at the dot */
- p = menu_name_skip(name);
-
- while (menu != NULL) {
- if (menu_name_equal(name, menu)) {
- if (menu->children == NULL) {
- /* found a menu item instead of a sub-menu */
- if (*p == NUL)
- EMSG(_("E336: Menu path must lead to a sub-menu"));
- else
- EMSG(_(e_notsubmenu));
- menu = NULL;
- goto theend;
- }
- if (*p == NUL) /* found a full match */
- goto theend;
- break;
- }
- menu = menu->next;
- }
- if (menu == NULL) /* didn't find it */
- break;
-
- /* Found a match, search the sub-menu. */
- menu = menu->children;
- name = p;
- }
-
- if (menu == NULL)
- EMSG(_("E337: Menu not found - check menu names"));
-theend:
- xfree(saved_name);
- return menu;
-}
-#endif
-
/*
* Translation of menu names. Just a simple lookup table.
*/
diff --git a/src/nvim/message.c b/src/nvim/message.c
index 5b4c90cc8f..8263ff4896 100644
--- a/src/nvim/message.c
+++ b/src/nvim/message.c
@@ -2234,15 +2234,11 @@ void mch_errmsg(char *str)
{
int len;
-#if (defined(UNIX) || defined(FEAT_GUI)) && !defined(ALWAYS_USE_GUI)
+#ifdef UNIX
/* On Unix use stderr if it's a tty.
* When not going to start the GUI also use stderr.
* On Mac, when started from Finder, stderr is the console. */
- if (
-# ifdef UNIX
- isatty(2)
-# endif
- ) {
+ if (os_isatty(2)) {
fprintf(stderr, "%s", str);
return;
}
@@ -2284,16 +2280,12 @@ void mch_errmsg(char *str)
*/
void mch_msg(char *str)
{
-#if (defined(UNIX) || defined(FEAT_GUI)) && !defined(ALWAYS_USE_GUI)
+#ifdef UNIX
/* On Unix use stdout if we have a tty. This allows "vim -h | more" and
* uses mch_errmsg() when started from the desktop.
* When not going to start the GUI also use stdout.
* On Mac, when started from Finder, stderr is the console. */
- if (
-# ifdef UNIX
- isatty(2)
-# endif
- ) {
+ if (os_isatty(2)) {
printf("%s", str);
return;
}
diff --git a/src/nvim/msgpack_rpc/remote_ui.c b/src/nvim/msgpack_rpc/remote_ui.c
index 07d78dd9d7..e582bf9550 100644
--- a/src/nvim/msgpack_rpc/remote_ui.c
+++ b/src/nvim/msgpack_rpc/remote_ui.c
@@ -86,8 +86,7 @@ static Object remote_ui_attach(uint64_t channel_id, uint64_t request_id,
ui->busy_stop = remote_ui_busy_stop;
ui->mouse_on = remote_ui_mouse_on;
ui->mouse_off = remote_ui_mouse_off;
- ui->insert_mode = remote_ui_insert_mode;
- ui->normal_mode = remote_ui_normal_mode;
+ ui->mode_change = remote_ui_mode_change;
ui->set_scroll_region = remote_ui_set_scroll_region;
ui->scroll = remote_ui_scroll;
ui->highlight_set = remote_ui_highlight_set;
@@ -214,16 +213,18 @@ static void remote_ui_mouse_off(UI *ui)
push_call(ui, "mouse_off", args);
}
-static void remote_ui_insert_mode(UI *ui)
+static void remote_ui_mode_change(UI *ui, int mode)
{
Array args = ARRAY_DICT_INIT;
- push_call(ui, "insert_mode", args);
-}
-
-static void remote_ui_normal_mode(UI *ui)
-{
- Array args = ARRAY_DICT_INIT;
- push_call(ui, "normal_mode", args);
+ if (mode == INSERT) {
+ ADD(args, STRING_OBJ(cstr_to_string("insert")));
+ } else if (mode == REPLACE) {
+ ADD(args, STRING_OBJ(cstr_to_string("replace")));
+ } else {
+ assert(mode == NORMAL);
+ ADD(args, STRING_OBJ(cstr_to_string("normal")));
+ }
+ push_call(ui, "mode_change", args);
}
static void remote_ui_set_scroll_region(UI *ui, int top, int bot, int left,
diff --git a/src/nvim/normal.c b/src/nvim/normal.c
index b66bc31b74..95e1c3d113 100644
--- a/src/nvim/normal.c
+++ b/src/nvim/normal.c
@@ -2016,6 +2016,9 @@ do_mouse (
if (regname == '.')
insert_reg(regname, true);
else {
+ if (regname == 0 && eval_has_provider("clipboard")) {
+ regname = '*';
+ }
if ((State & REPLACE_FLAG) && !yank_register_mline(regname))
insert_reg(regname, true);
else {
@@ -2105,11 +2108,6 @@ do_mouse (
* NOTE: Ignore right button down and drag mouse events.
* Windows only shows the popup menu on the button up event.
*/
-#if defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_GTK) \
- || defined(FEAT_GUI_MAC)
- if (!is_click)
- return false;
-#endif
return false;
}
if (which_button == MOUSE_LEFT
@@ -2284,6 +2282,9 @@ do_mouse (
* Middle mouse click: Put text before cursor.
*/
if (which_button == MOUSE_MIDDLE) {
+ if (regname == 0 && eval_has_provider("clipboard")) {
+ regname = '*';
+ }
if (yank_register_mline(regname)) {
if (mouse_past_bottom)
dir = FORWARD;
@@ -5740,22 +5741,10 @@ static void nv_optrans(cmdarg_T *cap)
static char_u *str = (char_u *)"xXDCsSY&";
if (!checkclearopq(cap->oap)) {
- /* In Vi "2D" doesn't delete the next line. Can't translate it
- * either, because "2." should also not use the count. */
- if (cap->cmdchar == 'D' && vim_strchr(p_cpo, CPO_HASH) != NULL) {
- cap->oap->start = curwin->w_cursor;
- cap->oap->op_type = OP_DELETE;
- set_op_var(OP_DELETE);
- cap->count1 = 1;
- nv_dollar(cap);
- finish_op = true;
- ResetRedobuff();
- AppendCharToRedobuff('D');
- } else {
- if (cap->count0)
- stuffnumReadbuff(cap->count0);
- stuffReadbuff(ar[(int)(vim_strchr(str, cap->cmdchar) - str)]);
+ if (cap->count0) {
+ stuffnumReadbuff(cap->count0);
}
+ stuffReadbuff(ar[(int)(vim_strchr(str, cap->cmdchar) - str)]);
}
cap->opcount = 0;
}
@@ -6553,9 +6542,6 @@ static void n_opencmd(cmdarg_T *cap)
0, 0)) {
if (curwin->w_p_cole > 0 && oldline != curwin->w_cursor.lnum)
update_single_line(curwin, oldline);
- /* When '#' is in 'cpoptions' ignore the count. */
- if (vim_strchr(p_cpo, CPO_HASH) != NULL)
- cap->count1 = 1;
invoke_edit(cap, false, cap->cmdchar, true);
}
}
diff --git a/src/nvim/ops.c b/src/nvim/ops.c
index 063ad154f1..8a7ced138b 100644
--- a/src/nvim/ops.c
+++ b/src/nvim/ops.c
@@ -765,7 +765,10 @@ yankreg_T *get_yank_register(int regname, int mode)
if (mode == YREG_PASTE && get_clipboard(regname, &reg, false)) {
// reg is set to clipboard contents.
return reg;
- } else if (mode != YREG_YANK && (regname == 0 || regname == '"') && y_previous != NULL) {
+ } else if (mode != YREG_YANK
+ && (regname == 0 || regname == '"' || regname == '*' || regname == '+')
+ && y_previous != NULL) {
+ // in case clipboard not available, paste from previous used register
return y_previous;
}
diff --git a/src/nvim/option.c b/src/nvim/option.c
index 113c47f112..9a375c0675 100644
--- a/src/nvim/option.c
+++ b/src/nvim/option.c
@@ -97,121 +97,6 @@
#define OPT_BUF(x) (idopt_T)(PV_BUF + (int)(x))
#define OPT_BOTH(x) (idopt_T)(PV_BOTH + (int)(x))
-/*
- * Definition of the PV_ values for buffer-local options.
- * The BV_ values are defined in option_defs.h.
- */
-#define PV_AI OPT_BUF(BV_AI)
-#define PV_AR OPT_BOTH(OPT_BUF(BV_AR))
-#define PV_BKC OPT_BOTH(OPT_BUF(BV_BKC))
-# define PV_BH OPT_BUF(BV_BH)
-# define PV_BT OPT_BUF(BV_BT)
-# define PV_EFM OPT_BOTH(OPT_BUF(BV_EFM))
-# define PV_GP OPT_BOTH(OPT_BUF(BV_GP))
-# define PV_MP OPT_BOTH(OPT_BUF(BV_MP))
-#define PV_BIN OPT_BUF(BV_BIN)
-#define PV_BL OPT_BUF(BV_BL)
-# define PV_BOMB OPT_BUF(BV_BOMB)
-#define PV_CI OPT_BUF(BV_CI)
-# define PV_CIN OPT_BUF(BV_CIN)
-# define PV_CINK OPT_BUF(BV_CINK)
-# define PV_CINO OPT_BUF(BV_CINO)
-# define PV_CINW OPT_BUF(BV_CINW)
-#define PV_CM OPT_BOTH(OPT_BUF(BV_CM))
-# define PV_CMS OPT_BUF(BV_CMS)
-# define PV_COM OPT_BUF(BV_COM)
-# define PV_CPT OPT_BUF(BV_CPT)
-# define PV_DICT OPT_BOTH(OPT_BUF(BV_DICT))
-# define PV_TSR OPT_BOTH(OPT_BUF(BV_TSR))
-# define PV_CFU OPT_BUF(BV_CFU)
-# define PV_DEF OPT_BOTH(OPT_BUF(BV_DEF))
-# define PV_INC OPT_BOTH(OPT_BUF(BV_INC))
-#define PV_EOL OPT_BUF(BV_EOL)
-#define PV_EP OPT_BOTH(OPT_BUF(BV_EP))
-#define PV_ET OPT_BUF(BV_ET)
-# define PV_FENC OPT_BUF(BV_FENC)
-# define PV_FEX OPT_BUF(BV_FEX)
-#define PV_FF OPT_BUF(BV_FF)
-#define PV_FLP OPT_BUF(BV_FLP)
-#define PV_FO OPT_BUF(BV_FO)
-# define PV_FT OPT_BUF(BV_FT)
-#define PV_IMI OPT_BUF(BV_IMI)
-#define PV_IMS OPT_BUF(BV_IMS)
-# define PV_INDE OPT_BUF(BV_INDE)
-# define PV_INDK OPT_BUF(BV_INDK)
-# define PV_INEX OPT_BUF(BV_INEX)
-#define PV_INF OPT_BUF(BV_INF)
-#define PV_ISK OPT_BUF(BV_ISK)
-# define PV_KMAP OPT_BUF(BV_KMAP)
-#define PV_KP OPT_BOTH(OPT_BUF(BV_KP))
-# define PV_LISP OPT_BUF(BV_LISP)
-# define PV_LW OPT_BOTH(OPT_BUF(BV_LW))
-#define PV_MA OPT_BUF(BV_MA)
-#define PV_ML OPT_BUF(BV_ML)
-#define PV_MOD OPT_BUF(BV_MOD)
-#define PV_MPS OPT_BUF(BV_MPS)
-#define PV_NF OPT_BUF(BV_NF)
-# define PV_OFU OPT_BUF(BV_OFU)
-#define PV_PATH OPT_BOTH(OPT_BUF(BV_PATH))
-#define PV_PI OPT_BUF(BV_PI)
-# define PV_QE OPT_BUF(BV_QE)
-#define PV_RO OPT_BUF(BV_RO)
-# define PV_SI OPT_BUF(BV_SI)
-# define PV_SMC OPT_BUF(BV_SMC)
-# define PV_SYN OPT_BUF(BV_SYN)
-# define PV_SPC OPT_BUF(BV_SPC)
-# define PV_SPF OPT_BUF(BV_SPF)
-# define PV_SPL OPT_BUF(BV_SPL)
-#define PV_STS OPT_BUF(BV_STS)
-# define PV_SUA OPT_BUF(BV_SUA)
-#define PV_SW OPT_BUF(BV_SW)
-#define PV_SWF OPT_BUF(BV_SWF)
-#define PV_TAGS OPT_BOTH(OPT_BUF(BV_TAGS))
-#define PV_TS OPT_BUF(BV_TS)
-#define PV_TW OPT_BUF(BV_TW)
-# define PV_UDF OPT_BUF(BV_UDF)
-#define PV_WM OPT_BUF(BV_WM)
-
-/*
- * Definition of the PV_ values for window-local options.
- * The WV_ values are defined in option_defs.h.
- */
-#define PV_LIST OPT_WIN(WV_LIST)
-# define PV_ARAB OPT_WIN(WV_ARAB)
-# define PV_BRI OPT_WIN(WV_BRI)
-# define PV_BRIOPT OPT_WIN(WV_BRIOPT)
-# define PV_DIFF OPT_WIN(WV_DIFF)
-# define PV_FDC OPT_WIN(WV_FDC)
-# define PV_FEN OPT_WIN(WV_FEN)
-# define PV_FDI OPT_WIN(WV_FDI)
-# define PV_FDL OPT_WIN(WV_FDL)
-# define PV_FDM OPT_WIN(WV_FDM)
-# define PV_FML OPT_WIN(WV_FML)
-# define PV_FDN OPT_WIN(WV_FDN)
-# define PV_FDE OPT_WIN(WV_FDE)
-# define PV_FDT OPT_WIN(WV_FDT)
-# define PV_FMR OPT_WIN(WV_FMR)
-# define PV_LBR OPT_WIN(WV_LBR)
-#define PV_NU OPT_WIN(WV_NU)
-#define PV_RNU OPT_WIN(WV_RNU)
-# define PV_NUW OPT_WIN(WV_NUW)
-# define PV_PVW OPT_WIN(WV_PVW)
-# define PV_RL OPT_WIN(WV_RL)
-# define PV_RLC OPT_WIN(WV_RLC)
-# define PV_SCBIND OPT_WIN(WV_SCBIND)
-#define PV_SCROLL OPT_WIN(WV_SCROLL)
-# define PV_SPELL OPT_WIN(WV_SPELL)
-# define PV_CUC OPT_WIN(WV_CUC)
-# define PV_CUL OPT_WIN(WV_CUL)
-# define PV_CC OPT_WIN(WV_CC)
-# define PV_STL OPT_BOTH(OPT_WIN(WV_STL))
-#define PV_UL OPT_BOTH(OPT_BUF(BV_UL))
-# define PV_WFH OPT_WIN(WV_WFH)
-# define PV_WFW OPT_WIN(WV_WFW)
-#define PV_WRAP OPT_WIN(WV_WRAP)
-# define PV_CRBIND OPT_WIN(WV_CRBIND)
-# define PV_COCU OPT_WIN(WV_COCU)
-# define PV_COLE OPT_WIN(WV_COLE)
/* WV_ and BV_ values get typecasted to this for the "indir" field */
typedef enum {
@@ -380,1303 +265,10 @@ typedef struct vimoption {
* The options with a NULL variable are 'hidden': a set command for them is
* ignored and they are not printed.
*/
-static vimoption_T
- options[] =
-{
- {"aleph", "al", P_NUM|P_VI_DEF|P_CURSWANT,
- (char_u *)&p_aleph, PV_NONE,
- {
- (char_u *)224L,
- (char_u *)0L
- } SCRIPTID_INIT},
- {"antialias", "anti", P_BOOL|P_VI_DEF|P_VIM|P_RCLR,
- (char_u *)NULL, PV_NONE,
- {(char_u *)FALSE, (char_u *)FALSE}
- SCRIPTID_INIT},
- {"arabic", "arab", P_BOOL|P_VI_DEF|P_VIM|P_CURSWANT,
- VAR_WIN, PV_ARAB,
- {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
- {"arabicshape", "arshape", P_BOOL|P_VI_DEF|P_VIM|P_RCLR,
- (char_u *)&p_arshape, PV_NONE,
- {(char_u *)TRUE, (char_u *)0L} SCRIPTID_INIT},
- {"allowrevins", "ari", P_BOOL|P_VI_DEF|P_VIM,
- (char_u *)&p_ari, PV_NONE,
- {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
- {"altkeymap", "akm", P_BOOL|P_VI_DEF,
- (char_u *)&p_altkeymap, PV_NONE,
- {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
- {"ambiwidth", "ambw", P_STRING|P_VI_DEF|P_RCLR,
- (char_u *)&p_ambw, PV_NONE,
- {(char_u *)"single", (char_u *)0L}
- SCRIPTID_INIT},
- {"autochdir", "acd", P_BOOL|P_VI_DEF,
- (char_u *)&p_acd, PV_NONE,
- {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
- {"autoindent", "ai", P_BOOL,
- (char_u *)&p_ai, PV_AI,
- {(char_u *)FALSE, (char_u *)TRUE} SCRIPTID_INIT},
- {"autoread", "ar", P_BOOL|P_VIM,
- (char_u *)&p_ar, PV_AR,
- {(char_u *)FALSE, (char_u *)TRUE} SCRIPTID_INIT},
- {"autowrite", "aw", P_BOOL|P_VI_DEF,
- (char_u *)&p_aw, PV_NONE,
- {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
- {"autowriteall","awa", P_BOOL|P_VI_DEF,
- (char_u *)&p_awa, PV_NONE,
- {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
- {"background", "bg", P_STRING|P_VI_DEF|P_RCLR,
- (char_u *)&p_bg, PV_NONE,
- {
- (char_u *)"light",
- (char_u *)0L
- } SCRIPTID_INIT},
- {"backspace", "bs", P_STRING|P_VIM|P_COMMA|P_NODUP,
- (char_u *)&p_bs, PV_NONE,
- {(char_u *)"", (char_u *)"indent,eol,start"} SCRIPTID_INIT},
- {"backup", "bk", P_BOOL|P_VI_DEF|P_VIM,
- (char_u *)&p_bk, PV_NONE,
- {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
- {"backupcopy", "bkc", P_STRING|P_VIM|P_COMMA|P_NODUP,
- (char_u *)&p_bkc, PV_BKC,
-#ifdef UNIX
- {(char_u *)"yes", (char_u *)"auto"}
-#else
- {(char_u *)"auto", (char_u *)"auto"}
-#endif
- SCRIPTID_INIT},
- {"backupdir", "bdir", P_STRING|P_EXPAND|P_VI_DEF|P_COMMA|P_NODUP|P_SECURE,
- (char_u *)&p_bdir, PV_NONE,
- {(char_u *)DFLT_BDIR, (char_u *)0L} SCRIPTID_INIT},
- {"backupext", "bex", P_STRING|P_VI_DEF|P_NFNAME,
- (char_u *)&p_bex, PV_NONE,
- {
- (char_u *)"~",
- (char_u *)0L
- } SCRIPTID_INIT},
- {"backupskip", "bsk", P_STRING|P_VI_DEF|P_COMMA,
- (char_u *)&p_bsk, PV_NONE,
- {(char_u *)"", (char_u *)0L}
- SCRIPTID_INIT},
- {"binary", "bin", P_BOOL|P_VI_DEF|P_RSTAT,
- (char_u *)&p_bin, PV_BIN,
- {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
- {"bomb", NULL, P_BOOL|P_NO_MKRC|P_VI_DEF|P_RSTAT,
- (char_u *)&p_bomb, PV_BOMB,
- {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
- {"breakat", "brk", P_STRING|P_VI_DEF|P_RALL|P_FLAGLIST,
- (char_u *)&p_breakat, PV_NONE,
- {(char_u *)" \t!@*-+;:,./?", (char_u *)0L}
- SCRIPTID_INIT},
- {"breakindent", "bri", P_BOOL|P_VI_DEF|P_VIM|P_RWIN,
- VAR_WIN, PV_BRI,
- {(char_u *)FALSE, (char_u *)0L}
- SCRIPTID_INIT},
- {"breakindentopt", "briopt", P_STRING|P_ALLOCED|P_VI_DEF|P_RBUF|P_COMMA|P_NODUP,
- VAR_WIN, PV_BRIOPT,
- {(char_u *)"", (char_u *)NULL}
- SCRIPTID_INIT},
- {"browsedir", "bsdir",P_STRING|P_VI_DEF,
- (char_u *)NULL, PV_NONE,
- {(char_u *)0L, (char_u *)0L}
- SCRIPTID_INIT},
- {"bufhidden", "bh", P_STRING|P_ALLOCED|P_VI_DEF|P_NOGLOB,
- (char_u *)&p_bh, PV_BH,
- {(char_u *)"", (char_u *)0L}
- SCRIPTID_INIT},
- {"buflisted", "bl", P_BOOL|P_VI_DEF|P_NOGLOB,
- (char_u *)&p_bl, PV_BL,
- {(char_u *)1L, (char_u *)0L}
- SCRIPTID_INIT},
- {"buftype", "bt", P_STRING|P_ALLOCED|P_VI_DEF|P_NOGLOB,
- (char_u *)&p_bt, PV_BT,
- {(char_u *)"", (char_u *)0L}
- SCRIPTID_INIT},
- {"casemap", "cmp", P_STRING|P_VI_DEF|P_COMMA|P_NODUP,
- (char_u *)&p_cmp, PV_NONE,
- {(char_u *)"internal,keepascii", (char_u *)0L}
- SCRIPTID_INIT},
- {"cdpath", "cd", P_STRING|P_EXPAND|P_VI_DEF|P_COMMA|P_NODUP,
- (char_u *)&p_cdpath, PV_NONE,
- {(char_u *)",,", (char_u *)0L}
- SCRIPTID_INIT},
- {"cedit", NULL, P_STRING,
- (char_u *)&p_cedit, PV_NONE,
- {(char_u *)"", (char_u *)CTRL_F_STR}
- SCRIPTID_INIT},
- {"charconvert", "ccv", P_STRING|P_VI_DEF|P_SECURE,
- (char_u *)&p_ccv, PV_NONE,
- {(char_u *)"", (char_u *)0L}
- SCRIPTID_INIT},
- {"cindent", "cin", P_BOOL|P_VI_DEF|P_VIM,
- (char_u *)&p_cin, PV_CIN,
- {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
- {"cinkeys", "cink", P_STRING|P_ALLOCED|P_VI_DEF|P_COMMA|P_NODUP,
- (char_u *)&p_cink, PV_CINK,
- {(char_u *)"0{,0},0),:,0#,!^F,o,O,e", (char_u *)0L}
- SCRIPTID_INIT},
- {"cinoptions", "cino", P_STRING|P_ALLOCED|P_VI_DEF|P_COMMA|P_NODUP,
- (char_u *)&p_cino, PV_CINO,
- {(char_u *)"", (char_u *)0L} SCRIPTID_INIT},
- {"cinwords", "cinw", P_STRING|P_ALLOCED|P_VI_DEF|P_COMMA|P_NODUP,
- (char_u *)&p_cinw, PV_CINW,
- {(char_u *)"if,else,while,do,for,switch",
- (char_u *)0L}
- SCRIPTID_INIT},
- {"clipboard", "cb", P_STRING|P_VI_DEF|P_COMMA|P_NODUP,
- (char_u *)&p_cb, PV_NONE,
- {(char_u *)"", (char_u *)0L}
- SCRIPTID_INIT},
- {"cmdheight", "ch", P_NUM|P_VI_DEF|P_RALL,
- (char_u *)&p_ch, PV_NONE,
- {(char_u *)1L, (char_u *)0L} SCRIPTID_INIT},
- {"cmdwinheight", "cwh", P_NUM|P_VI_DEF,
- (char_u *)&p_cwh, PV_NONE,
- {(char_u *)7L, (char_u *)0L} SCRIPTID_INIT},
- {"colorcolumn", "cc", P_STRING|P_VI_DEF|P_COMMA|P_NODUP|P_RWIN,
- VAR_WIN, PV_CC,
- {(char_u *)"", (char_u *)0L} SCRIPTID_INIT},
- {"columns", "co", P_NUM|P_NODEFAULT|P_NO_MKRC|P_VI_DEF|P_RCLR,
- (char_u *)&Columns, PV_NONE,
- {(char_u *)80L, (char_u *)0L} SCRIPTID_INIT},
- {"comments", "com", P_STRING|P_ALLOCED|P_VI_DEF|P_COMMA|P_NODUP|
- P_CURSWANT,
- (char_u *)&p_com, PV_COM,
- {(char_u *)"s1:/*,mb:*,ex:*/,://,b:#,:%,:XCOMM,n:>,fb:-",
- (char_u *)0L}
- SCRIPTID_INIT},
- {"commentstring", "cms", P_STRING|P_ALLOCED|P_VI_DEF|P_CURSWANT,
- (char_u *)&p_cms, PV_CMS,
- {(char_u *)"/*%s*/", (char_u *)0L}
- SCRIPTID_INIT},
- /* P_PRI_MKRC isn't needed here, optval_default()
- * always returns TRUE for 'compatible' */
- {"compatible", "cp", P_BOOL|P_RALL,
- (char_u *)&p_force_off, PV_NONE,
- {(char_u *)TRUE, (char_u *)FALSE} SCRIPTID_INIT},
- {"complete", "cpt", P_STRING|P_ALLOCED|P_COMMA|P_NODUP,
- (char_u *)&p_cpt, PV_CPT,
- {(char_u *)".,w,b,u,t,i", (char_u *)".,w,b,u,t"}
- SCRIPTID_INIT},
- {"concealcursor","cocu", P_STRING|P_ALLOCED|P_RWIN|P_VI_DEF,
- VAR_WIN, PV_COCU,
- {(char_u *)"", (char_u *)NULL}
- SCRIPTID_INIT},
- {"conceallevel","cole", P_NUM|P_RWIN|P_VI_DEF,
- VAR_WIN, PV_COLE,
- {(char_u *)0L, (char_u *)0L}
- SCRIPTID_INIT},
- {"completefunc", "cfu", P_STRING|P_ALLOCED|P_VI_DEF|P_SECURE,
- (char_u *)&p_cfu, PV_CFU,
- {(char_u *)"", (char_u *)0L}
- SCRIPTID_INIT},
- {"completeopt", "cot", P_STRING|P_VI_DEF|P_COMMA|P_NODUP,
- (char_u *)&p_cot, PV_NONE,
- {(char_u *)"menu,preview", (char_u *)0L}
- SCRIPTID_INIT},
- {"confirm", "cf", P_BOOL|P_VI_DEF,
- (char_u *)&p_confirm, PV_NONE,
- {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
- {"copyindent", "ci", P_BOOL|P_VI_DEF|P_VIM,
- (char_u *)&p_ci, PV_CI,
- {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
- {"cpoptions", "cpo", P_STRING|P_VIM|P_RALL|P_FLAGLIST,
- (char_u *)&p_cpo, PV_NONE,
- {(char_u *)CPO_VI, (char_u *)CPO_VIM}
- SCRIPTID_INIT},
- {"cscopepathcomp", "cspc", P_NUM|P_VI_DEF|P_VIM,
- (char_u *)&p_cspc, PV_NONE,
- {(char_u *)0L, (char_u *)0L} SCRIPTID_INIT},
- {"cscopeprg", "csprg", P_STRING|P_EXPAND|P_VI_DEF|P_SECURE,
- (char_u *)&p_csprg, PV_NONE,
- {(char_u *)"cscope", (char_u *)0L}
- SCRIPTID_INIT},
- {"cscopequickfix", "csqf", P_STRING|P_VI_DEF|P_COMMA|P_NODUP,
- (char_u *)&p_csqf, PV_NONE,
- {(char_u *)"", (char_u *)0L}
- SCRIPTID_INIT},
- {"cscoperelative", "csre", P_BOOL|P_VI_DEF|P_VIM,
- (char_u *)&p_csre, PV_NONE,
- {(char_u *)0L, (char_u *)0L} SCRIPTID_INIT},
- {"cscopetag", "cst", P_BOOL|P_VI_DEF|P_VIM,
- (char_u *)&p_cst, PV_NONE,
- {(char_u *)0L, (char_u *)0L} SCRIPTID_INIT},
- {"cscopetagorder", "csto", P_NUM|P_VI_DEF|P_VIM,
- (char_u *)&p_csto, PV_NONE,
- {(char_u *)0L, (char_u *)0L} SCRIPTID_INIT},
- {"cscopeverbose", "csverb", P_BOOL|P_VI_DEF|P_VIM,
- (char_u *)&p_csverbose, PV_NONE,
- {(char_u *)0L, (char_u *)0L} SCRIPTID_INIT},
- {"cursorbind", "crb", P_BOOL|P_VI_DEF,
- VAR_WIN, PV_CRBIND,
- {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
- {"cursorcolumn", "cuc", P_BOOL|P_VI_DEF|P_RWIN,
- VAR_WIN, PV_CUC,
- {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
- {"cursorline", "cul", P_BOOL|P_VI_DEF|P_RWIN,
- VAR_WIN, PV_CUL,
- {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
- {"debug", NULL, P_STRING|P_VI_DEF,
- (char_u *)&p_debug, PV_NONE,
- {(char_u *)"", (char_u *)0L} SCRIPTID_INIT},
- {"define", "def", P_STRING|P_ALLOCED|P_VI_DEF|P_CURSWANT,
- (char_u *)&p_def, PV_DEF,
- {(char_u *)"^\\s*#\\s*define", (char_u *)0L}
- SCRIPTID_INIT},
- {"delcombine", "deco", P_BOOL|P_VI_DEF|P_VIM,
- (char_u *)&p_deco, PV_NONE,
- {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
- {"dictionary", "dict", P_STRING|P_EXPAND|P_VI_DEF|P_COMMA|P_NODUP,
- (char_u *)&p_dict, PV_DICT,
- {(char_u *)"", (char_u *)0L} SCRIPTID_INIT},
- {"diff", NULL, P_BOOL|P_VI_DEF|P_RWIN|P_NOGLOB,
- VAR_WIN, PV_DIFF,
- {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
- {"diffexpr", "dex", P_STRING|P_VI_DEF|P_SECURE|P_CURSWANT,
- (char_u *)&p_dex, PV_NONE,
- {(char_u *)"", (char_u *)0L}
- SCRIPTID_INIT},
- {"diffopt", "dip", P_STRING|P_ALLOCED|P_VI_DEF|P_RWIN|P_COMMA|P_NODUP,
- (char_u *)&p_dip, PV_NONE,
- {(char_u *)"filler", (char_u *)NULL}
- SCRIPTID_INIT},
- {"digraph", "dg", P_BOOL|P_VI_DEF|P_VIM,
- (char_u *)&p_dg, PV_NONE,
- {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
- {"directory", "dir", P_STRING|P_EXPAND|P_VI_DEF|P_COMMA|P_NODUP|P_SECURE,
- (char_u *)&p_dir, PV_NONE,
- {(char_u *)DFLT_DIR, (char_u *)0L} SCRIPTID_INIT},
- {"display", "dy", P_STRING|P_VIM|P_COMMA|P_RALL|P_NODUP,
- (char_u *)&p_dy, PV_NONE,
- {(char_u *)"", (char_u *)"lastline"} SCRIPTID_INIT},
- {"eadirection", "ead", P_STRING|P_VI_DEF,
- (char_u *)&p_ead, PV_NONE,
- {(char_u *)"both", (char_u *)0L}
- SCRIPTID_INIT},
- {"edcompatible","ed", P_BOOL|P_VI_DEF,
- (char_u *)&p_force_off, PV_NONE,
- {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
- {"encoding", "enc", P_STRING|P_VI_DEF|P_RCLR|P_NO_ML,
- (char_u *)&p_enc, PV_NONE,
- {(char_u *)ENC_DFLT, (char_u *)0L}
- SCRIPTID_INIT},
- {"endofline", "eol", P_BOOL|P_NO_MKRC|P_VI_DEF|P_RSTAT,
- (char_u *)&p_eol, PV_EOL,
- {(char_u *)TRUE, (char_u *)0L} SCRIPTID_INIT},
- {"equalalways", "ea", P_BOOL|P_VI_DEF|P_RALL,
- (char_u *)&p_ea, PV_NONE,
- {(char_u *)TRUE, (char_u *)0L} SCRIPTID_INIT},
- {"equalprg", "ep", P_STRING|P_EXPAND|P_VI_DEF|P_SECURE,
- (char_u *)&p_ep, PV_EP,
- {(char_u *)"", (char_u *)0L} SCRIPTID_INIT},
- {"errorbells", "eb", P_BOOL|P_VI_DEF,
- (char_u *)&p_eb, PV_NONE,
- {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
- {"errorfile", "ef", P_STRING|P_EXPAND|P_VI_DEF|P_SECURE,
- (char_u *)&p_ef, PV_NONE,
- {(char_u *)DFLT_ERRORFILE, (char_u *)0L}
- SCRIPTID_INIT},
- {"errorformat", "efm", P_STRING|P_VI_DEF|P_COMMA|P_NODUP,
- (char_u *)&p_efm, PV_EFM,
- {(char_u *)DFLT_EFM, (char_u *)0L}
- SCRIPTID_INIT},
- {"esckeys", "ek", P_BOOL|P_VIM,
- (char_u *)&p_ek, PV_NONE,
- {(char_u *)FALSE, (char_u *)TRUE} SCRIPTID_INIT},
- {"eventignore", "ei", P_STRING|P_VI_DEF|P_COMMA|P_NODUP,
- (char_u *)&p_ei, PV_NONE,
- {(char_u *)"", (char_u *)0L} SCRIPTID_INIT},
- {"expandtab", "et", P_BOOL|P_VI_DEF|P_VIM,
- (char_u *)&p_et, PV_ET,
- {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
- {"exrc", "ex", P_BOOL|P_VI_DEF|P_SECURE,
- (char_u *)&p_exrc, PV_NONE,
- {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
- {"fileencoding","fenc", P_STRING|P_ALLOCED|P_VI_DEF|P_RSTAT|P_RBUF|P_NO_MKRC,
- (char_u *)&p_fenc, PV_FENC,
- {(char_u *)"", (char_u *)0L}
- SCRIPTID_INIT},
- {"fileencodings","fencs", P_STRING|P_VI_DEF|P_COMMA,
- (char_u *)&p_fencs, PV_NONE,
- {(char_u *)"ucs-bom", (char_u *)0L}
- SCRIPTID_INIT},
- {"fileformat", "ff", P_STRING|P_ALLOCED|P_VI_DEF|P_RSTAT|P_NO_MKRC|
- P_CURSWANT,
- (char_u *)&p_ff, PV_FF,
- {(char_u *)DFLT_FF, (char_u *)0L} SCRIPTID_INIT},
- {"fileformats", "ffs", P_STRING|P_VIM|P_COMMA|P_NODUP,
- (char_u *)&p_ffs, PV_NONE,
- {(char_u *)DFLT_FFS_VI, (char_u *)DFLT_FFS_VIM}
- SCRIPTID_INIT},
- {"fileignorecase", "fic", P_BOOL|P_VI_DEF,
- (char_u *)&p_fic, PV_NONE,
- {
-#ifdef CASE_INSENSITIVE_FILENAME
- (char_u *)TRUE,
-#else
- (char_u *)FALSE,
-#endif
- (char_u *)0L
- } SCRIPTID_INIT},
- {"filetype", "ft", P_STRING|P_ALLOCED|P_VI_DEF|P_NOGLOB|P_NFNAME,
- (char_u *)&p_ft, PV_FT,
- {(char_u *)"", (char_u *)0L}
- SCRIPTID_INIT},
- {"fillchars", "fcs", P_STRING|P_VI_DEF|P_RALL|P_COMMA|P_NODUP,
- (char_u *)&p_fcs, PV_NONE,
- {(char_u *)"vert:|,fold:-", (char_u *)0L}
- SCRIPTID_INIT},
- {"fkmap", "fk", P_BOOL|P_VI_DEF,
- (char_u *)&p_fkmap, PV_NONE,
- {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
- {"foldclose", "fcl", P_STRING|P_VI_DEF|P_COMMA|P_NODUP|P_RWIN,
- (char_u *)&p_fcl, PV_NONE,
- {(char_u *)"", (char_u *)0L} SCRIPTID_INIT},
- {"foldcolumn", "fdc", P_NUM|P_VI_DEF|P_RWIN,
- VAR_WIN, PV_FDC,
- {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
- {"foldenable", "fen", P_BOOL|P_VI_DEF|P_RWIN,
- VAR_WIN, PV_FEN,
- {(char_u *)TRUE, (char_u *)0L} SCRIPTID_INIT},
- {"foldexpr", "fde", P_STRING|P_ALLOCED|P_VIM|P_VI_DEF|P_RWIN,
- VAR_WIN, PV_FDE,
- {(char_u *)"0", (char_u *)NULL}
- SCRIPTID_INIT},
- {"foldignore", "fdi", P_STRING|P_ALLOCED|P_VIM|P_VI_DEF|P_RWIN,
- VAR_WIN, PV_FDI,
- {(char_u *)"#", (char_u *)NULL} SCRIPTID_INIT},
- {"foldlevel", "fdl", P_NUM|P_VI_DEF|P_RWIN,
- VAR_WIN, PV_FDL,
- {(char_u *)0L, (char_u *)0L} SCRIPTID_INIT},
- {"foldlevelstart","fdls", P_NUM|P_VI_DEF|P_CURSWANT,
- (char_u *)&p_fdls, PV_NONE,
- {(char_u *)-1L, (char_u *)0L} SCRIPTID_INIT},
- {"foldmarker", "fmr", P_STRING|P_ALLOCED|P_VIM|P_VI_DEF|
- P_RWIN|P_COMMA|P_NODUP,
- VAR_WIN, PV_FMR,
- {(char_u *)"{{{,}}}", (char_u *)NULL}
- SCRIPTID_INIT},
- {"foldmethod", "fdm", P_STRING|P_ALLOCED|P_VIM|P_VI_DEF|P_RWIN,
- VAR_WIN, PV_FDM,
- {(char_u *)"manual", (char_u *)NULL} SCRIPTID_INIT},
- {"foldminlines","fml", P_NUM|P_VI_DEF|P_RWIN,
- VAR_WIN, PV_FML,
- {(char_u *)1L, (char_u *)0L} SCRIPTID_INIT},
- {"foldnestmax", "fdn", P_NUM|P_VI_DEF|P_RWIN,
- VAR_WIN, PV_FDN,
- {(char_u *)20L, (char_u *)0L} SCRIPTID_INIT},
- {"foldopen", "fdo", P_STRING|P_VI_DEF|P_COMMA|P_NODUP|P_CURSWANT,
- (char_u *)&p_fdo, PV_NONE,
- {(char_u *)"block,hor,mark,percent,quickfix,search,tag,undo",
- (char_u *)0L} SCRIPTID_INIT},
- {"foldtext", "fdt", P_STRING|P_ALLOCED|P_VIM|P_VI_DEF|P_RWIN,
- VAR_WIN, PV_FDT,
- {(char_u *)"foldtext()", (char_u *)NULL}
- SCRIPTID_INIT},
- {"formatexpr", "fex", P_STRING|P_ALLOCED|P_VI_DEF|P_VIM,
- (char_u *)&p_fex, PV_FEX,
- {(char_u *)"", (char_u *)0L}
- SCRIPTID_INIT},
- {"formatoptions","fo", P_STRING|P_ALLOCED|P_VIM|P_FLAGLIST,
- (char_u *)&p_fo, PV_FO,
- {(char_u *)DFLT_FO_VI, (char_u *)DFLT_FO_VIM}
- SCRIPTID_INIT},
- {"formatlistpat","flp", P_STRING|P_ALLOCED|P_VI_DEF,
- (char_u *)&p_flp, PV_FLP,
- {(char_u *)"^\\s*\\d\\+[\\]:.)}\\t ]\\s*",
- (char_u *)0L} SCRIPTID_INIT},
- {"formatprg", "fp", P_STRING|P_EXPAND|P_VI_DEF|P_SECURE,
- (char_u *)&p_fp, PV_NONE,
- {(char_u *)"", (char_u *)0L} SCRIPTID_INIT},
- {"fsync", "fs", P_BOOL|P_SECURE|P_VI_DEF,
-#ifdef HAVE_FSYNC
- (char_u *)&p_fs, PV_NONE,
- {(char_u *)TRUE, (char_u *)0L}
-#else
- (char_u *)NULL, PV_NONE,
- {(char_u *)FALSE, (char_u *)0L}
-#endif
- SCRIPTID_INIT},
- {"gdefault", "gd", P_BOOL|P_VI_DEF|P_VIM,
- (char_u *)&p_gd, PV_NONE,
- {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
- {"grepformat", "gfm", P_STRING|P_VI_DEF|P_COMMA|P_NODUP,
- (char_u *)&p_gefm, PV_NONE,
- {(char_u *)DFLT_GREPFORMAT, (char_u *)0L}
- SCRIPTID_INIT},
- {"grepprg", "gp", P_STRING|P_EXPAND|P_VI_DEF|P_SECURE,
- (char_u *)&p_gp, PV_GP,
- {
-# ifdef UNIX
- /* Add an extra file name so that grep will always
- * insert a file name in the match line. */
- (char_u *)"grep -n $* /dev/null",
-# else
- (char_u *)"grep -n ",
-# endif
- (char_u *)0L
- }
- SCRIPTID_INIT},
- {"guicursor", "gcr", P_STRING|P_VI_DEF|P_COMMA|P_NODUP,
- (char_u *)&p_guicursor, PV_NONE,
- {
- (char_u *)"n-v-c:block,o:hor50,i-ci:hor15,r-cr:hor30,sm:block",
- (char_u *)0L
- }
- SCRIPTID_INIT},
- {"guifont", "gfn", P_STRING|P_VI_DEF|P_RCLR|P_COMMA|P_NODUP,
- (char_u *)NULL, PV_NONE,
- {(char_u *)NULL, (char_u *)0L}
- SCRIPTID_INIT},
- {"guifontset", "gfs", P_STRING|P_VI_DEF|P_RCLR|P_COMMA,
- (char_u *)NULL, PV_NONE,
- {(char_u *)NULL, (char_u *)0L}
- SCRIPTID_INIT},
- {"guifontwide", "gfw", P_STRING|P_VI_DEF|P_RCLR|P_COMMA|P_NODUP,
- (char_u *)NULL, PV_NONE,
- {(char_u *)NULL, (char_u *)0L}
- SCRIPTID_INIT},
- {"guiheadroom", "ghr", P_NUM|P_VI_DEF,
- (char_u *)NULL, PV_NONE,
- {(char_u *)50L, (char_u *)0L} SCRIPTID_INIT},
- {"guioptions", "go", P_STRING|P_VI_DEF|P_RALL|P_FLAGLIST,
- (char_u *)NULL, PV_NONE,
- {(char_u *)NULL, (char_u *)0L}
- SCRIPTID_INIT},
- {"guitablabel", "gtl", P_STRING|P_VI_DEF|P_RWIN,
- (char_u *)NULL, PV_NONE,
- {(char_u *)NULL, (char_u *)0L}
- SCRIPTID_INIT},
- {"guitabtooltip", "gtt", P_STRING|P_VI_DEF|P_RWIN,
- (char_u *)NULL, PV_NONE,
- {(char_u *)NULL, (char_u *)0L}
- SCRIPTID_INIT},
- {"helpfile", "hf", P_STRING|P_EXPAND|P_VI_DEF|P_SECURE,
- (char_u *)&p_hf, PV_NONE,
- {(char_u *)DFLT_HELPFILE, (char_u *)0L}
- SCRIPTID_INIT},
- {"helpheight", "hh", P_NUM|P_VI_DEF,
- (char_u *)&p_hh, PV_NONE,
- {(char_u *)20L, (char_u *)0L} SCRIPTID_INIT},
- {"helplang", "hlg", P_STRING|P_VI_DEF|P_COMMA,
- (char_u *)&p_hlg, PV_NONE,
- {(char_u *)"", (char_u *)0L}
- SCRIPTID_INIT},
- {"hidden", "hid", P_BOOL|P_VI_DEF,
- (char_u *)&p_hid, PV_NONE,
- {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
- {"highlight", "hl", P_STRING|P_VI_DEF|P_RCLR|P_COMMA|P_NODUP,
- (char_u *)&p_hl, PV_NONE,
- {(char_u *)HIGHLIGHT_INIT, (char_u *)0L}
- SCRIPTID_INIT},
- {"history", "hi", P_NUM|P_VIM,
- (char_u *)&p_hi, PV_NONE,
- {(char_u *)0L, (char_u *)50L} SCRIPTID_INIT},
- {"hkmap", "hk", P_BOOL|P_VI_DEF|P_VIM,
- (char_u *)&p_hkmap, PV_NONE,
- {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
- {"hkmapp", "hkp", P_BOOL|P_VI_DEF|P_VIM,
- (char_u *)&p_hkmapp, PV_NONE,
- {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
- {"hlsearch", "hls", P_BOOL|P_VIM|P_RALL,
- (char_u *)&p_hls, PV_NONE,
- {(char_u *)FALSE, (char_u *)TRUE} SCRIPTID_INIT},
- {"icon", NULL, P_BOOL|P_VI_DEF,
- (char_u *)&p_icon, PV_NONE,
- {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
- {"iconstring", NULL, P_STRING|P_VI_DEF,
- (char_u *)&p_iconstring, PV_NONE,
- {(char_u *)"", (char_u *)0L} SCRIPTID_INIT},
- {"ignorecase", "ic", P_BOOL|P_VI_DEF,
- (char_u *)&p_ic, PV_NONE,
- {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
- {"imactivatefunc","imaf",P_STRING|P_VI_DEF|P_SECURE,
- (char_u *)NULL, PV_NONE,
- {(char_u *)NULL, (char_u *)0L}
- SCRIPTID_INIT},
- {"imactivatekey","imak",P_STRING|P_VI_DEF,
- (char_u *)NULL, PV_NONE,
- {(char_u *)"", (char_u *)0L} SCRIPTID_INIT},
- {"imcmdline", "imc", P_BOOL|P_VI_DEF,
- (char_u *)NULL, PV_NONE,
- {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
- {"imdisable", "imd", P_BOOL|P_VI_DEF,
- (char_u *)NULL, PV_NONE,
- {(char_u *)FALSE, (char_u *)0L}
- SCRIPTID_INIT},
- {"iminsert", "imi", P_NUM|P_VI_DEF,
- (char_u *)&p_iminsert, PV_IMI,
-#ifdef B_IMODE_IM
- {(char_u *)B_IMODE_IM, (char_u *)0L}
-#else
- {(char_u *)B_IMODE_NONE, (char_u *)0L}
-#endif
- SCRIPTID_INIT},
- {"imsearch", "ims", P_NUM|P_VI_DEF,
- (char_u *)&p_imsearch, PV_IMS,
-#ifdef B_IMODE_IM
- {(char_u *)B_IMODE_IM, (char_u *)0L}
-#else
- {(char_u *)B_IMODE_NONE, (char_u *)0L}
-#endif
- SCRIPTID_INIT},
- {"imstatusfunc","imsf",P_STRING|P_VI_DEF|P_SECURE,
- (char_u *)NULL, PV_NONE,
- {(char_u *)NULL, (char_u *)0L}
- SCRIPTID_INIT},
- {"include", "inc", P_STRING|P_ALLOCED|P_VI_DEF,
- (char_u *)&p_inc, PV_INC,
- {(char_u *)"^\\s*#\\s*include", (char_u *)0L}
- SCRIPTID_INIT},
- {"includeexpr", "inex", P_STRING|P_ALLOCED|P_VI_DEF,
- (char_u *)&p_inex, PV_INEX,
- {(char_u *)"", (char_u *)0L}
- SCRIPTID_INIT},
- {"incsearch", "is", P_BOOL|P_VIM,
- (char_u *)&p_is, PV_NONE,
- {(char_u *)FALSE, (char_u *)TRUE} SCRIPTID_INIT},
- {"indentexpr", "inde", P_STRING|P_ALLOCED|P_VI_DEF|P_VIM,
- (char_u *)&p_inde, PV_INDE,
- {(char_u *)"", (char_u *)0L}
- SCRIPTID_INIT},
- {"indentkeys", "indk", P_STRING|P_ALLOCED|P_VI_DEF|P_COMMA|P_NODUP,
- (char_u *)&p_indk, PV_INDK,
- {(char_u *)"0{,0},:,0#,!^F,o,O,e", (char_u *)0L}
- SCRIPTID_INIT},
- {"infercase", "inf", P_BOOL|P_VI_DEF,
- (char_u *)&p_inf, PV_INF,
- {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
- {"insertmode", "im", P_BOOL|P_VI_DEF|P_VIM,
- (char_u *)&p_im, PV_NONE,
- {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
- {"isfname", "isf", P_STRING|P_VI_DEF|P_COMMA|P_NODUP,
- (char_u *)&p_isf, PV_NONE,
- {
-#ifdef BACKSLASH_IN_FILENAME
- /* Excluded are: & and ^ are special in cmd.exe
- * ( and ) are used in text separating fnames */
- (char_u *)"@,48-57,/,\\,.,-,_,+,,,#,$,%,{,},[,],:,@-@,!,~,=",
-#else
- (char_u *)"@,48-57,/,.,-,_,+,,,#,$,%,~,=",
-#endif
- (char_u *)0L
- } SCRIPTID_INIT},
- {"isident", "isi", P_STRING|P_VI_DEF|P_COMMA|P_NODUP,
- (char_u *)&p_isi, PV_NONE,
- {
- (char_u *)"@,48-57,_,192-255",
- (char_u *)0L
- } SCRIPTID_INIT},
- {"iskeyword", "isk", P_STRING|P_ALLOCED|P_VIM|P_COMMA|P_NODUP,
- (char_u *)&p_isk, PV_ISK,
- {
- (char_u *)"@,48-57,_",
- ISK_LATIN1
- } SCRIPTID_INIT},
- {"isprint", "isp", P_STRING|P_VI_DEF|P_RALL|P_COMMA|P_NODUP,
- (char_u *)&p_isp, PV_NONE,
- {
-#if defined(MSWIN)
- (char_u *)"@,~-255",
-#else
- ISP_LATIN1,
-#endif
- (char_u *)0L
- } SCRIPTID_INIT},
- {"joinspaces", "js", P_BOOL|P_VI_DEF|P_VIM,
- (char_u *)&p_js, PV_NONE,
- {(char_u *)TRUE, (char_u *)0L} SCRIPTID_INIT},
- {"keymap", "kmp", P_STRING|P_ALLOCED|P_VI_DEF|P_RBUF|P_RSTAT|P_NFNAME|
- P_PRI_MKRC,
- (char_u *)&p_keymap, PV_KMAP,
- {(char_u *)"", (char_u *)0L}
- SCRIPTID_INIT},
- {"keymodel", "km", P_STRING|P_VI_DEF|P_COMMA|P_NODUP,
- (char_u *)&p_km, PV_NONE,
- {(char_u *)"", (char_u *)0L} SCRIPTID_INIT},
- {"keywordprg", "kp", P_STRING|P_EXPAND|P_VI_DEF|P_SECURE,
- (char_u *)&p_kp, PV_KP,
- {
-# ifdef USEMAN_S
- (char_u *)"man -s",
-# else
- (char_u *)"man",
-# endif
- (char_u *)0L
- } SCRIPTID_INIT},
- {"langmap", "lmap", P_STRING|P_VI_DEF|P_COMMA|P_NODUP|P_SECURE,
- (char_u *)&p_langmap, PV_NONE,
- {(char_u *)"", /* unmatched } */
- (char_u *)0L} SCRIPTID_INIT},
- {"langmenu", "lm", P_STRING|P_VI_DEF|P_NFNAME,
- (char_u *)&p_lm, PV_NONE,
- {(char_u *)"", (char_u *)0L} SCRIPTID_INIT},
- {"langnoremap", "lnr", P_BOOL,
- (char_u *)&p_lnr, PV_NONE,
- {(char_u *)FALSE, (char_u *)TRUE} SCRIPTID_INIT},
- {"laststatus", "ls", P_NUM|P_VI_DEF|P_RALL,
- (char_u *)&p_ls, PV_NONE,
- {(char_u *)1L, (char_u *)0L} SCRIPTID_INIT},
- {"lazyredraw", "lz", P_BOOL|P_VI_DEF,
- (char_u *)&p_lz, PV_NONE,
- {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
- {"linebreak", "lbr", P_BOOL|P_VI_DEF|P_RWIN,
- VAR_WIN, PV_LBR,
- {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
- {"lines", NULL, P_NUM|P_NODEFAULT|P_NO_MKRC|P_VI_DEF|P_RCLR,
- (char_u *)&Rows, PV_NONE,
- {
- (char_u *)24L,
- (char_u *)0L
- } SCRIPTID_INIT},
- {"linespace", "lsp", P_NUM|P_VI_DEF|P_RCLR,
- (char_u *)NULL, PV_NONE,
- {(char_u *)0L, (char_u *)0L}
- SCRIPTID_INIT},
- {"lisp", NULL, P_BOOL|P_VI_DEF,
- (char_u *)&p_lisp, PV_LISP,
- {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
- {"lispwords", "lw", P_STRING|P_VI_DEF|P_COMMA|P_NODUP,
- (char_u *)&p_lispwords, PV_LW,
- {(char_u *)LISPWORD_VALUE, (char_u *)0L}
- SCRIPTID_INIT},
- {"list", NULL, P_BOOL|P_VI_DEF|P_RWIN,
- VAR_WIN, PV_LIST,
- {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
- {"listchars", "lcs", P_STRING|P_VI_DEF|P_RALL|P_COMMA|P_NODUP,
- (char_u *)&p_lcs, PV_NONE,
- {(char_u *)"eol:$", (char_u *)0L} SCRIPTID_INIT},
- {"loadplugins", "lpl", P_BOOL|P_VI_DEF,
- (char_u *)&p_lpl, PV_NONE,
- {(char_u *)TRUE, (char_u *)0L} SCRIPTID_INIT},
- {"magic", NULL, P_BOOL|P_VI_DEF,
- (char_u *)&p_magic, PV_NONE,
- {(char_u *)TRUE, (char_u *)0L} SCRIPTID_INIT},
- {"makeef", "mef", P_STRING|P_EXPAND|P_VI_DEF|P_SECURE,
- (char_u *)&p_mef, PV_NONE,
- {(char_u *)"", (char_u *)0L}
- SCRIPTID_INIT},
- {"makeprg", "mp", P_STRING|P_EXPAND|P_VI_DEF|P_SECURE,
- (char_u *)&p_mp, PV_MP,
- {(char_u *)"make", (char_u *)0L}
- SCRIPTID_INIT},
- {"matchpairs", "mps", P_STRING|P_ALLOCED|P_VI_DEF|P_COMMA|P_NODUP,
- (char_u *)&p_mps, PV_MPS,
- {(char_u *)"(:),{:},[:]", (char_u *)0L}
- SCRIPTID_INIT},
- {"matchtime", "mat", P_NUM|P_VI_DEF,
- (char_u *)&p_mat, PV_NONE,
- {(char_u *)5L, (char_u *)0L} SCRIPTID_INIT},
- {"maxcombine", "mco", P_NUM|P_VI_DEF|P_CURSWANT,
- (char_u *)&p_mco, PV_NONE,
- {(char_u *)2, (char_u *)0L} SCRIPTID_INIT},
- {"maxfuncdepth", "mfd", P_NUM|P_VI_DEF,
- (char_u *)&p_mfd, PV_NONE,
- {(char_u *)100L, (char_u *)0L} SCRIPTID_INIT},
- {"maxmapdepth", "mmd", P_NUM|P_VI_DEF,
- (char_u *)&p_mmd, PV_NONE,
- {(char_u *)1000L, (char_u *)0L} SCRIPTID_INIT},
- {"maxmem", "mm", P_NUM|P_VI_DEF,
- (char_u *)&p_mm, PV_NONE,
- {(char_u *)DFLT_MAXMEM, (char_u *)0L}
- SCRIPTID_INIT},
- {"maxmempattern","mmp", P_NUM|P_VI_DEF,
- (char_u *)&p_mmp, PV_NONE,
- {(char_u *)1000L, (char_u *)0L} SCRIPTID_INIT},
- {"maxmemtot", "mmt", P_NUM|P_VI_DEF,
- (char_u *)&p_mmt, PV_NONE,
- {(char_u *)DFLT_MAXMEMTOT, (char_u *)0L}
- SCRIPTID_INIT},
- {"menuitems", "mis", P_NUM|P_VI_DEF,
- (char_u *)&p_mis, PV_NONE,
- {(char_u *)25L, (char_u *)0L} SCRIPTID_INIT},
- {"mkspellmem", "msm", P_STRING|P_VI_DEF|P_EXPAND|P_SECURE,
- (char_u *)&p_msm, PV_NONE,
- {(char_u *)"460000,2000,500", (char_u *)0L}
- SCRIPTID_INIT},
- {"modeline", "ml", P_BOOL|P_VIM,
- (char_u *)&p_ml, PV_ML,
- {(char_u *)FALSE, (char_u *)TRUE} SCRIPTID_INIT},
- {"modelines", "mls", P_NUM|P_VI_DEF,
- (char_u *)&p_mls, PV_NONE,
- {(char_u *)5L, (char_u *)0L} SCRIPTID_INIT},
- {"modifiable", "ma", P_BOOL|P_VI_DEF|P_NOGLOB,
- (char_u *)&p_ma, PV_MA,
- {(char_u *)TRUE, (char_u *)0L} SCRIPTID_INIT},
- {"modified", "mod", P_BOOL|P_NO_MKRC|P_VI_DEF|P_RSTAT,
- (char_u *)&p_mod, PV_MOD,
- {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
- {"more", NULL, P_BOOL|P_VIM,
- (char_u *)&p_more, PV_NONE,
- {(char_u *)FALSE, (char_u *)TRUE} SCRIPTID_INIT},
- {"mouse", NULL, P_STRING|P_FLAGLIST,
- (char_u *)&p_mouse, PV_NONE,
- {
- (char_u *)"",
- (char_u *)"a"
- } SCRIPTID_INIT},
- {"mousefocus", "mousef", P_BOOL|P_VI_DEF,
- (char_u *)NULL, PV_NONE,
- {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
- {"mousehide", "mh", P_BOOL|P_VI_DEF,
- (char_u *)NULL, PV_NONE,
- {(char_u *)TRUE, (char_u *)0L} SCRIPTID_INIT},
- {"mousemodel", "mousem", P_STRING|P_VI_DEF,
- (char_u *)&p_mousem, PV_NONE,
- {
- (char_u *)"extend",
- (char_u *)0L
- } SCRIPTID_INIT},
- {"mouseshape", "mouses", P_STRING|P_VI_DEF|P_COMMA|P_NODUP,
- (char_u *)NULL, PV_NONE,
- {(char_u *)NULL, (char_u *)0L}
- SCRIPTID_INIT},
- {"mousetime", "mouset", P_NUM|P_VI_DEF,
- (char_u *)&p_mouset, PV_NONE,
- {(char_u *)500L, (char_u *)0L} SCRIPTID_INIT},
- {"nrformats", "nf", P_STRING|P_ALLOCED|P_VIM|P_COMMA|P_NODUP,
- (char_u *)&p_nf, PV_NF,
- {(char_u *)"octal,hex", (char_u *)"hex"}
- SCRIPTID_INIT},
- {"number", "nu", P_BOOL|P_VI_DEF|P_RWIN,
- VAR_WIN, PV_NU,
- {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
- {"numberwidth", "nuw", P_NUM|P_RWIN|P_VIM,
- VAR_WIN, PV_NUW,
- {(char_u *)8L, (char_u *)4L} SCRIPTID_INIT},
- {"omnifunc", "ofu", P_STRING|P_ALLOCED|P_VI_DEF|P_SECURE,
- (char_u *)&p_ofu, PV_OFU,
- {(char_u *)"", (char_u *)0L}
- SCRIPTID_INIT},
- {"opendevice", "odev", P_BOOL|P_VI_DEF,
- (char_u *)NULL, PV_NONE,
- {(char_u *)FALSE, (char_u *)FALSE}
- SCRIPTID_INIT},
- {"operatorfunc", "opfunc", P_STRING|P_VI_DEF|P_SECURE,
- (char_u *)&p_opfunc, PV_NONE,
- {(char_u *)"", (char_u *)0L} SCRIPTID_INIT},
- {"paragraphs", "para", P_STRING|P_VI_DEF,
- (char_u *)&p_para, PV_NONE,
- {(char_u *)"IPLPPPQPP TPHPLIPpLpItpplpipbp",
- (char_u *)0L} SCRIPTID_INIT},
- {"paste", NULL, P_BOOL|P_VI_DEF|P_PRI_MKRC,
- (char_u *)&p_paste, PV_NONE,
- {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
- {"pastetoggle", "pt", P_STRING|P_VI_DEF,
- (char_u *)&p_pt, PV_NONE,
- {(char_u *)"", (char_u *)0L} SCRIPTID_INIT},
- {"patchexpr", "pex", P_STRING|P_VI_DEF|P_SECURE,
- (char_u *)&p_pex, PV_NONE,
- {(char_u *)"", (char_u *)0L}
- SCRIPTID_INIT},
- {"patchmode", "pm", P_STRING|P_VI_DEF|P_NFNAME,
- (char_u *)&p_pm, PV_NONE,
- {(char_u *)"", (char_u *)0L} SCRIPTID_INIT},
- {"path", "pa", P_STRING|P_EXPAND|P_VI_DEF|P_COMMA|P_NODUP,
- (char_u *)&p_path, PV_PATH,
- {
- (char_u *)".,/usr/include,,",
- (char_u *)0L
- } SCRIPTID_INIT},
- {"preserveindent", "pi", P_BOOL|P_VI_DEF|P_VIM,
- (char_u *)&p_pi, PV_PI,
- {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
- {"previewheight", "pvh", P_NUM|P_VI_DEF,
- (char_u *)&p_pvh, PV_NONE,
- {(char_u *)12L, (char_u *)0L} SCRIPTID_INIT},
- {"previewwindow", "pvw", P_BOOL|P_VI_DEF|P_RSTAT|P_NOGLOB,
- VAR_WIN, PV_PVW,
- {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
- {"printdevice", "pdev", P_STRING|P_VI_DEF|P_SECURE,
- (char_u *)&p_pdev, PV_NONE,
- {(char_u *)"", (char_u *)0L}
- SCRIPTID_INIT},
- {"printencoding", "penc", P_STRING|P_VI_DEF,
- (char_u *)&p_penc, PV_NONE,
- {(char_u *)"", (char_u *)0L}
- SCRIPTID_INIT},
- {"printexpr", "pexpr", P_STRING|P_VI_DEF,
- (char_u *)&p_pexpr, PV_NONE,
- {(char_u *)"", (char_u *)0L}
- SCRIPTID_INIT},
- {"printfont", "pfn", P_STRING|P_VI_DEF,
- (char_u *)&p_pfn, PV_NONE,
- {
- (char_u *)"courier",
- (char_u *)0L
- }
- SCRIPTID_INIT},
- {"printheader", "pheader", P_STRING|P_VI_DEF|P_GETTEXT,
- (char_u *)&p_header, PV_NONE,
- {(char_u *)N_("%<%f%h%m%=Page %N"), (char_u *)0L}
- SCRIPTID_INIT},
- {"printmbcharset", "pmbcs", P_STRING|P_VI_DEF,
- (char_u *)&p_pmcs, PV_NONE,
- {(char_u *)"", (char_u *)0L}
- SCRIPTID_INIT},
- {"printmbfont", "pmbfn", P_STRING|P_VI_DEF,
- (char_u *)&p_pmfn, PV_NONE,
- {(char_u *)"", (char_u *)0L}
- SCRIPTID_INIT},
- {"printoptions", "popt", P_STRING|P_VI_DEF|P_COMMA|P_NODUP,
- (char_u *)&p_popt, PV_NONE,
- {(char_u *)"", (char_u *)0L}
- SCRIPTID_INIT},
- {"prompt", NULL, P_BOOL|P_VI_DEF,
- (char_u *)&p_prompt, PV_NONE,
- {(char_u *)TRUE, (char_u *)0L} SCRIPTID_INIT},
- {"pumheight", "ph", P_NUM|P_VI_DEF,
- (char_u *)&p_ph, PV_NONE,
- {(char_u *)0L, (char_u *)0L} SCRIPTID_INIT},
- {"quoteescape", "qe", P_STRING|P_ALLOCED|P_VI_DEF,
- (char_u *)&p_qe, PV_QE,
- {(char_u *)"\\", (char_u *)0L}
- SCRIPTID_INIT},
- {"readonly", "ro", P_BOOL|P_VI_DEF|P_RSTAT|P_NOGLOB,
- (char_u *)&p_ro, PV_RO,
- {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
- {"redrawtime", "rdt", P_NUM|P_VI_DEF,
- (char_u *)&p_rdt, PV_NONE,
- {(char_u *)2000L, (char_u *)0L} SCRIPTID_INIT},
- {"regexpengine", "re", P_NUM|P_VI_DEF,
- (char_u *)&p_re, PV_NONE,
- {(char_u *)0L, (char_u *)0L} SCRIPTID_INIT},
- {"relativenumber", "rnu", P_BOOL|P_VI_DEF|P_RWIN,
- VAR_WIN, PV_RNU,
- {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
- {"remap", NULL, P_BOOL|P_VI_DEF,
- (char_u *)&p_remap, PV_NONE,
- {(char_u *)TRUE, (char_u *)0L} SCRIPTID_INIT},
- {"report", NULL, P_NUM|P_VI_DEF,
- (char_u *)&p_report, PV_NONE,
- {(char_u *)2L, (char_u *)0L} SCRIPTID_INIT},
- {"restorescreen", "rs", P_BOOL|P_VI_DEF,
- (char_u *)NULL, PV_NONE,
- {(char_u *)TRUE, (char_u *)0L} SCRIPTID_INIT},
- {"revins", "ri", P_BOOL|P_VI_DEF|P_VIM,
- (char_u *)&p_ri, PV_NONE,
- {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
- {"rightleft", "rl", P_BOOL|P_VI_DEF|P_RWIN,
- VAR_WIN, PV_RL,
- {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
- {"rightleftcmd", "rlc", P_STRING|P_ALLOCED|P_VI_DEF|P_RWIN,
- VAR_WIN, PV_RLC,
- {(char_u *)"search", (char_u *)NULL}
- SCRIPTID_INIT},
- {"ruler", "ru", P_BOOL|P_VI_DEF|P_VIM|P_RSTAT,
- (char_u *)&p_ru, PV_NONE,
- {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
- {"rulerformat", "ruf", P_STRING|P_VI_DEF|P_ALLOCED|P_RSTAT,
- (char_u *)&p_ruf, PV_NONE,
- {(char_u *)"", (char_u *)0L} SCRIPTID_INIT},
- {"runtimepath", "rtp", P_STRING|P_VI_DEF|P_EXPAND|P_COMMA|P_NODUP|P_SECURE,
- (char_u *)&p_rtp, PV_NONE,
- {(char_u *)DFLT_RUNTIMEPATH, (char_u *)0L}
- SCRIPTID_INIT},
- {"scroll", "scr", P_NUM|P_NO_MKRC|P_VI_DEF,
- VAR_WIN, PV_SCROLL,
- {(char_u *)12L, (char_u *)0L} SCRIPTID_INIT},
- {"scrollbind", "scb", P_BOOL|P_VI_DEF,
- VAR_WIN, PV_SCBIND,
- {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
- {"scrolljump", "sj", P_NUM|P_VI_DEF|P_VIM,
- (char_u *)&p_sj, PV_NONE,
- {(char_u *)1L, (char_u *)0L} SCRIPTID_INIT},
- {"scrolloff", "so", P_NUM|P_VI_DEF|P_VIM|P_RALL,
- (char_u *)&p_so, PV_NONE,
- {(char_u *)0L, (char_u *)0L} SCRIPTID_INIT},
- {"scrollopt", "sbo", P_STRING|P_VI_DEF|P_COMMA|P_NODUP,
- (char_u *)&p_sbo, PV_NONE,
- {(char_u *)"ver,jump", (char_u *)0L}
- SCRIPTID_INIT},
- {"sections", "sect", P_STRING|P_VI_DEF,
- (char_u *)&p_sections, PV_NONE,
- {(char_u *)"SHNHH HUnhsh", (char_u *)0L}
- SCRIPTID_INIT},
- {"secure", NULL, P_BOOL|P_VI_DEF|P_SECURE,
- (char_u *)&p_secure, PV_NONE,
- {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
- {"selection", "sel", P_STRING|P_VI_DEF,
- (char_u *)&p_sel, PV_NONE,
- {(char_u *)"inclusive", (char_u *)0L}
- SCRIPTID_INIT},
- {"selectmode", "slm", P_STRING|P_VI_DEF|P_COMMA|P_NODUP,
- (char_u *)&p_slm, PV_NONE,
- {(char_u *)"", (char_u *)0L} SCRIPTID_INIT},
- {"sessionoptions", "ssop", P_STRING|P_VIM|P_COMMA|P_NODUP,
- (char_u *)&p_ssop, PV_NONE,
- {(char_u *)"blank,buffers,curdir,folds,help,options,tabpages,winsize",
- (char_u *)"blank,buffers,curdir,folds,help,tabpages,winsize"}
- SCRIPTID_INIT},
- {"shell", "sh", P_STRING|P_EXPAND|P_VI_DEF|P_SECURE,
- (char_u *)&p_sh, PV_NONE,
- {
- (char_u *)"sh",
- (char_u *)0L
- } SCRIPTID_INIT},
- {"shellcmdflag","shcf", P_STRING|P_VI_DEF|P_SECURE,
- (char_u *)&p_shcf, PV_NONE,
- {
- (char_u *)"-c",
- (char_u *)0L
- } SCRIPTID_INIT},
- {"shellpipe", "sp", P_STRING|P_VI_DEF|P_SECURE,
- (char_u *)&p_sp, PV_NONE,
- {
-#if defined(UNIX)
- (char_u *)"| tee",
-#else
- (char_u *)">",
-#endif
- (char_u *)0L
- }
- SCRIPTID_INIT},
- {"shellquote", "shq", P_STRING|P_VI_DEF|P_SECURE,
- (char_u *)&p_shq, PV_NONE,
- {(char_u *)"", (char_u *)0L} SCRIPTID_INIT},
- {"shellredir", "srr", P_STRING|P_VI_DEF|P_SECURE,
- (char_u *)&p_srr, PV_NONE,
- {(char_u *)">", (char_u *)0L} SCRIPTID_INIT},
- {"shellslash", "ssl", P_BOOL|P_VI_DEF,
-#ifdef BACKSLASH_IN_FILENAME
- (char_u *)&p_ssl, PV_NONE,
-#else
- (char_u *)NULL, PV_NONE,
-#endif
- {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
- {"shelltemp", "stmp", P_BOOL,
- (char_u *)&p_stmp, PV_NONE,
- {(char_u *)FALSE, (char_u *)TRUE} SCRIPTID_INIT},
- {"shellxquote", "sxq", P_STRING|P_VI_DEF|P_SECURE,
- (char_u *)&p_sxq, PV_NONE,
- {
- (char_u *)"",
- (char_u *)0L
- } SCRIPTID_INIT},
- {"shellxescape", "sxe", P_STRING|P_VI_DEF|P_SECURE,
- (char_u *)&p_sxe, PV_NONE,
- {
- (char_u *)"",
- (char_u *)0L
- } SCRIPTID_INIT},
- {"shiftround", "sr", P_BOOL|P_VI_DEF|P_VIM,
- (char_u *)&p_sr, PV_NONE,
- {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
- {"shiftwidth", "sw", P_NUM|P_VI_DEF,
- (char_u *)&p_sw, PV_SW,
- {(char_u *)8L, (char_u *)0L} SCRIPTID_INIT},
- {"shortmess", "shm", P_STRING|P_VIM|P_FLAGLIST,
- (char_u *)&p_shm, PV_NONE,
- {(char_u *)"", (char_u *)"filnxtToO"}
- SCRIPTID_INIT},
- {"showbreak", "sbr", P_STRING|P_VI_DEF|P_RALL,
- (char_u *)&p_sbr, PV_NONE,
- {(char_u *)"", (char_u *)0L} SCRIPTID_INIT},
- {"showcmd", "sc", P_BOOL|P_VIM,
- (char_u *)&p_sc, PV_NONE,
- {(char_u *)FALSE,
-#ifdef UNIX
- (char_u *)FALSE
-#else
- (char_u *) TRUE
-#endif
- } SCRIPTID_INIT},
- {"showfulltag", "sft", P_BOOL|P_VI_DEF,
- (char_u *)&p_sft, PV_NONE,
- {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
- {"showmatch", "sm", P_BOOL|P_VI_DEF,
- (char_u *)&p_sm, PV_NONE,
- {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
- {"showmode", "smd", P_BOOL|P_VIM,
- (char_u *)&p_smd, PV_NONE,
- {(char_u *)FALSE, (char_u *)TRUE} SCRIPTID_INIT},
- {"showtabline", "stal", P_NUM|P_VI_DEF|P_RALL,
- (char_u *)&p_stal, PV_NONE,
- {(char_u *)1L, (char_u *)0L} SCRIPTID_INIT},
- {"sidescroll", "ss", P_NUM|P_VI_DEF,
- (char_u *)&p_ss, PV_NONE,
- {(char_u *)0L, (char_u *)0L} SCRIPTID_INIT},
- {"sidescrolloff", "siso", P_NUM|P_VI_DEF|P_VIM|P_RBUF,
- (char_u *)&p_siso, PV_NONE,
- {(char_u *)0L, (char_u *)0L} SCRIPTID_INIT},
- {"smartcase", "scs", P_BOOL|P_VI_DEF|P_VIM,
- (char_u *)&p_scs, PV_NONE,
- {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
- {"smartindent", "si", P_BOOL|P_VI_DEF|P_VIM,
- (char_u *)&p_si, PV_SI,
- {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
- {"smarttab", "sta", P_BOOL|P_VIM,
- (char_u *)&p_sta, PV_NONE,
- {(char_u *)FALSE, (char_u *)TRUE} SCRIPTID_INIT},
- {"softtabstop", "sts", P_NUM|P_VI_DEF|P_VIM,
- (char_u *)&p_sts, PV_STS,
- {(char_u *)0L, (char_u *)0L} SCRIPTID_INIT},
- {"spell", NULL, P_BOOL|P_VI_DEF|P_RWIN,
- VAR_WIN, PV_SPELL,
- {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
- {"spellcapcheck", "spc", P_STRING|P_ALLOCED|P_VI_DEF|P_RBUF,
- (char_u *)&p_spc, PV_SPC,
- {(char_u *)"[.?!]\\_[\\])'\" ]\\+", (char_u *)0L}
- SCRIPTID_INIT},
- {"spellfile", "spf", P_STRING|P_EXPAND|P_ALLOCED|P_VI_DEF|P_SECURE|P_COMMA,
- (char_u *)&p_spf, PV_SPF,
- {(char_u *)"", (char_u *)0L}
- SCRIPTID_INIT},
- {"spelllang", "spl", P_STRING|P_ALLOCED|P_VI_DEF|P_COMMA|P_RBUF|P_EXPAND,
- (char_u *)&p_spl, PV_SPL,
- {(char_u *)"en", (char_u *)0L}
- SCRIPTID_INIT},
- {"spellsuggest", "sps", P_STRING|P_VI_DEF|P_EXPAND|P_SECURE|P_COMMA,
- (char_u *)&p_sps, PV_NONE,
- {(char_u *)"best", (char_u *)0L}
- SCRIPTID_INIT},
- {"splitbelow", "sb", P_BOOL|P_VI_DEF,
- (char_u *)&p_sb, PV_NONE,
- {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
- {"splitright", "spr", P_BOOL|P_VI_DEF,
- (char_u *)&p_spr, PV_NONE,
- {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
- {"startofline", "sol", P_BOOL|P_VI_DEF|P_VIM,
- (char_u *)&p_sol, PV_NONE,
- {(char_u *)TRUE, (char_u *)0L} SCRIPTID_INIT},
- {"statusline","stl", P_STRING|P_VI_DEF|P_ALLOCED|P_RSTAT,
- (char_u *)&p_stl, PV_STL,
- {(char_u *)"", (char_u *)0L} SCRIPTID_INIT},
- {"suffixes", "su", P_STRING|P_VI_DEF|P_COMMA|P_NODUP,
- (char_u *)&p_su, PV_NONE,
- {(char_u *)".bak,~,.o,.h,.info,.swp,.obj",
- (char_u *)0L} SCRIPTID_INIT},
- {"suffixesadd", "sua", P_STRING|P_VI_DEF|P_ALLOCED|P_COMMA|P_NODUP,
- (char_u *)&p_sua, PV_SUA,
- {(char_u *)"", (char_u *)0L}
- SCRIPTID_INIT},
- {"swapfile", "swf", P_BOOL|P_VI_DEF|P_RSTAT,
- (char_u *)&p_swf, PV_SWF,
- {(char_u *)TRUE, (char_u *)0L} SCRIPTID_INIT},
- {"swapsync", "sws", P_STRING|P_VI_DEF,
- (char_u *)&p_sws, PV_NONE,
- {(char_u *)"fsync", (char_u *)0L} SCRIPTID_INIT},
- {"switchbuf", "swb", P_STRING|P_VI_DEF|P_COMMA|P_NODUP,
- (char_u *)&p_swb, PV_NONE,
- {(char_u *)"", (char_u *)0L} SCRIPTID_INIT},
- {"synmaxcol", "smc", P_NUM|P_VI_DEF|P_RBUF,
- (char_u *)&p_smc, PV_SMC,
- {(char_u *)3000L, (char_u *)0L}
- SCRIPTID_INIT},
- {"syntax", "syn", P_STRING|P_ALLOCED|P_VI_DEF|P_NOGLOB|P_NFNAME,
- (char_u *)&p_syn, PV_SYN,
- {(char_u *)"", (char_u *)0L}
- SCRIPTID_INIT},
- {"tabline", "tal", P_STRING|P_VI_DEF|P_RALL,
- (char_u *)&p_tal, PV_NONE,
- {(char_u *)"", (char_u *)0L} SCRIPTID_INIT},
- {"tabpagemax", "tpm", P_NUM|P_VIM,
- (char_u *)&p_tpm, PV_NONE,
- {(char_u *)10L, (char_u *)50L} SCRIPTID_INIT},
- {"tabstop", "ts", P_NUM|P_VI_DEF|P_RBUF,
- (char_u *)&p_ts, PV_TS,
- {(char_u *)8L, (char_u *)0L} SCRIPTID_INIT},
- {"tagbsearch", "tbs", P_BOOL|P_VI_DEF,
- (char_u *)&p_tbs, PV_NONE,
- {(char_u *)TRUE, (char_u *)0L}
- SCRIPTID_INIT},
- {"taglength", "tl", P_NUM|P_VI_DEF,
- (char_u *)&p_tl, PV_NONE,
- {(char_u *)0L, (char_u *)0L} SCRIPTID_INIT},
- {"tagrelative", "tr", P_BOOL|P_VIM,
- (char_u *)&p_tr, PV_NONE,
- {(char_u *)FALSE, (char_u *)TRUE} SCRIPTID_INIT},
- {"tags", "tag", P_STRING|P_EXPAND|P_VI_DEF|P_COMMA|P_NODUP,
- (char_u *)&p_tags, PV_TAGS,
- {
- (char_u *)"./tags;,tags",
- (char_u *)0L
- } SCRIPTID_INIT},
- {"tagstack", "tgst", P_BOOL|P_VI_DEF,
- (char_u *)&p_tgst, PV_NONE,
- {(char_u *)TRUE, (char_u *)0L} SCRIPTID_INIT},
- {"termbidi", "tbidi", P_BOOL|P_VI_DEF,
- (char_u *)&p_tbidi, PV_NONE,
- {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
- {"termencoding", "tenc", P_STRING|P_VI_DEF|P_RCLR,
- (char_u *)NULL, PV_NONE,
- {(char_u *)"", (char_u *)0L}
- SCRIPTID_INIT},
- {"terse", NULL, P_BOOL|P_VI_DEF,
- (char_u *)&p_terse, PV_NONE,
- {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
- {"textwidth", "tw", P_NUM|P_VI_DEF|P_VIM|P_RBUF,
- (char_u *)&p_tw, PV_TW,
- {(char_u *)0L, (char_u *)0L} SCRIPTID_INIT},
- {"thesaurus", "tsr", P_STRING|P_EXPAND|P_VI_DEF|P_COMMA|P_NODUP,
- (char_u *)&p_tsr, PV_TSR,
- {(char_u *)"", (char_u *)0L} SCRIPTID_INIT},
- {"tildeop", "top", P_BOOL|P_VI_DEF|P_VIM,
- (char_u *)&p_to, PV_NONE,
- {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
- {"timeout", "to", P_BOOL|P_VI_DEF,
- (char_u *)&p_timeout, PV_NONE,
- {(char_u *)TRUE, (char_u *)0L} SCRIPTID_INIT},
- {"timeoutlen", "tm", P_NUM|P_VI_DEF,
- (char_u *)&p_tm, PV_NONE,
- {(char_u *)1000L, (char_u *)0L} SCRIPTID_INIT},
- {"title", NULL, P_BOOL|P_VI_DEF,
- (char_u *)&p_title, PV_NONE,
- {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
- {"titlelen", NULL, P_NUM|P_VI_DEF,
- (char_u *)&p_titlelen, PV_NONE,
- {(char_u *)85L, (char_u *)0L} SCRIPTID_INIT},
- {"titleold", NULL, P_STRING|P_VI_DEF|P_GETTEXT|P_SECURE|P_NO_MKRC,
- (char_u *)&p_titleold, PV_NONE,
- {(char_u *)N_("Thanks for flying Vim"),
- (char_u *)0L}
- SCRIPTID_INIT},
- {"titlestring", NULL, P_STRING|P_VI_DEF,
- (char_u *)&p_titlestring, PV_NONE,
- {(char_u *)"", (char_u *)0L} SCRIPTID_INIT},
- {"ttimeout", NULL, P_BOOL|P_VI_DEF|P_VIM,
- (char_u *)&p_ttimeout, PV_NONE,
- {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
- {"ttimeoutlen", "ttm", P_NUM|P_VI_DEF,
- (char_u *)&p_ttm, PV_NONE,
- {(char_u *)-1L, (char_u *)0L} SCRIPTID_INIT},
- {"ttyfast", "tf", P_BOOL|P_NO_MKRC|P_VI_DEF,
- (char_u *)&p_force_on, PV_NONE,
- {(char_u *)TRUE, (char_u *)0L} SCRIPTID_INIT},
- {"undodir", "udir", P_STRING|P_EXPAND|P_COMMA|P_NODUP|P_SECURE|P_VI_DEF,
- (char_u *)&p_udir, PV_NONE,
- {(char_u *)".", (char_u *)0L}
- SCRIPTID_INIT},
- {"undofile", "udf", P_BOOL|P_VI_DEF|P_VIM,
- (char_u *)&p_udf, PV_UDF,
- {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
- {"undolevels", "ul", P_NUM|P_VI_DEF,
- (char_u *)&p_ul, PV_UL,
- {
-#if defined(UNIX) || defined(WIN3264)
- (char_u *)1000L,
-#else
- (char_u *)100L,
+
+#ifdef INCLUDE_GENERATED_DECLARATIONS
+# include "options.generated.h"
#endif
- (char_u *)0L
- } SCRIPTID_INIT},
- {"undoreload", "ur", P_NUM|P_VI_DEF,
- (char_u *)&p_ur, PV_NONE,
- { (char_u *)10000L, (char_u *)0L} SCRIPTID_INIT},
- {"updatecount", "uc", P_NUM|P_VI_DEF,
- (char_u *)&p_uc, PV_NONE,
- {(char_u *)200L, (char_u *)0L} SCRIPTID_INIT},
- {"updatetime", "ut", P_NUM|P_VI_DEF,
- (char_u *)&p_ut, PV_NONE,
- {(char_u *)4000L, (char_u *)0L} SCRIPTID_INIT},
- {"verbose", "vbs", P_NUM|P_VI_DEF,
- (char_u *)&p_verbose, PV_NONE,
- {(char_u *)0L, (char_u *)0L} SCRIPTID_INIT},
- {"verbosefile", "vfile", P_STRING|P_EXPAND|P_VI_DEF|P_SECURE,
- (char_u *)&p_vfile, PV_NONE,
- {(char_u *)"", (char_u *)0L} SCRIPTID_INIT},
- {"viewdir", "vdir", P_STRING|P_EXPAND|P_VI_DEF|P_SECURE,
- (char_u *)&p_vdir, PV_NONE,
- {(char_u *)DFLT_VDIR, (char_u *)0L}
- SCRIPTID_INIT},
- {"viewoptions", "vop", P_STRING|P_VI_DEF|P_COMMA|P_NODUP,
- (char_u *)&p_vop, PV_NONE,
- {(char_u *)"folds,options,cursor", (char_u *)0L}
- SCRIPTID_INIT},
- {"viminfo", "vi", P_STRING|P_COMMA|P_NODUP|P_SECURE,
- (char_u *)&p_viminfo, PV_NONE,
- {(char_u *)"", (char_u *)"!,'100,<50,s10,h"}
- SCRIPTID_INIT},
- {"virtualedit", "ve", P_STRING|P_COMMA|P_NODUP|P_VI_DEF|P_VIM|P_CURSWANT,
- (char_u *)&p_ve, PV_NONE,
- {(char_u *)"", (char_u *)""}
- SCRIPTID_INIT},
- {"visualbell", "vb", P_BOOL|P_VI_DEF,
- (char_u *)&p_vb, PV_NONE,
- {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
- {"warn", NULL, P_BOOL|P_VI_DEF,
- (char_u *)&p_warn, PV_NONE,
- {(char_u *)TRUE, (char_u *)0L} SCRIPTID_INIT},
- {"whichwrap", "ww", P_STRING|P_VIM|P_COMMA|P_FLAGLIST,
- (char_u *)&p_ww, PV_NONE,
- {(char_u *)"", (char_u *)"b,s"} SCRIPTID_INIT},
- {"wildchar", "wc", P_NUM|P_VIM,
- (char_u *)&p_wc, PV_NONE,
- {(char_u *)(long)Ctrl_E, (char_u *)(long)TAB}
- SCRIPTID_INIT},
- {"wildcharm", "wcm", P_NUM|P_VI_DEF,
- (char_u *)&p_wcm, PV_NONE,
- {(char_u *)0L, (char_u *)0L} SCRIPTID_INIT},
- {"wildignore", "wig", P_STRING|P_VI_DEF|P_COMMA|P_NODUP,
- (char_u *)&p_wig, PV_NONE,
- {(char_u *)"", (char_u *)0L} SCRIPTID_INIT},
- {"wildignorecase", "wic", P_BOOL|P_VI_DEF,
- (char_u *)&p_wic, PV_NONE,
- {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
- {"wildmenu", "wmnu", P_BOOL|P_VIM,
- (char_u *)&p_wmnu, PV_NONE,
- {(char_u *)FALSE, (char_u *)TRUE} SCRIPTID_INIT},
- {"wildmode", "wim", P_STRING|P_VIM|P_COMMA|P_NODUP,
- (char_u *)&p_wim, PV_NONE,
- {(char_u *)"", (char_u *)"list:longest,full"} SCRIPTID_INIT},
- {"wildoptions", "wop", P_STRING|P_VI_DEF,
- (char_u *)&p_wop, PV_NONE,
- {(char_u *)"", (char_u *)0L}
- SCRIPTID_INIT},
- {"winaltkeys", "wak", P_STRING|P_VI_DEF,
- (char_u *)&p_wak, PV_NONE,
- {(char_u *)"menu", (char_u *)0L}
- SCRIPTID_INIT},
- {"window", "wi", P_NUM|P_VI_DEF,
- (char_u *)&p_window, PV_NONE,
- {(char_u *)0L, (char_u *)0L} SCRIPTID_INIT},
- {"winheight", "wh", P_NUM|P_VI_DEF,
- (char_u *)&p_wh, PV_NONE,
- {(char_u *)1L, (char_u *)0L} SCRIPTID_INIT},
- {"winfixheight", "wfh", P_BOOL|P_VI_DEF|P_RSTAT,
- VAR_WIN, PV_WFH,
- {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
- {"winfixwidth", "wfw", P_BOOL|P_VI_DEF|P_RSTAT,
- VAR_WIN, PV_WFW,
- {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
- {"winminheight", "wmh", P_NUM|P_VI_DEF,
- (char_u *)&p_wmh, PV_NONE,
- {(char_u *)1L, (char_u *)0L} SCRIPTID_INIT},
- {"winminwidth", "wmw", P_NUM|P_VI_DEF,
- (char_u *)&p_wmw, PV_NONE,
- {(char_u *)1L, (char_u *)0L} SCRIPTID_INIT},
- {"winwidth", "wiw", P_NUM|P_VI_DEF,
- (char_u *)&p_wiw, PV_NONE,
- {(char_u *)20L, (char_u *)0L} SCRIPTID_INIT},
- {"wrap", NULL, P_BOOL|P_VI_DEF|P_RWIN,
- VAR_WIN, PV_WRAP,
- {(char_u *)TRUE, (char_u *)0L} SCRIPTID_INIT},
- {"wrapmargin", "wm", P_NUM|P_VI_DEF,
- (char_u *)&p_wm, PV_WM,
- {(char_u *)0L, (char_u *)0L} SCRIPTID_INIT},
- {"wrapscan", "ws", P_BOOL|P_VI_DEF,
- (char_u *)&p_ws, PV_NONE,
- {(char_u *)TRUE, (char_u *)0L} SCRIPTID_INIT},
- {"write", NULL, P_BOOL|P_VI_DEF,
- (char_u *)&p_write, PV_NONE,
- {(char_u *)TRUE, (char_u *)0L} SCRIPTID_INIT},
- {"writeany", "wa", P_BOOL|P_VI_DEF,
- (char_u *)&p_wa, PV_NONE,
- {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
- {"writebackup", "wb", P_BOOL|P_VI_DEF|P_VIM,
- (char_u *)&p_wb, PV_NONE,
- {
- (char_u *)TRUE,
- (char_u *)0L
- } SCRIPTID_INIT},
- {"writedelay", "wd", P_NUM|P_VI_DEF,
- (char_u *)&p_wd, PV_NONE,
- {(char_u *)0L, (char_u *)0L} SCRIPTID_INIT},
-
- /* end marker */
- {
- NULL, NULL, 0, NULL, PV_NONE, {NULL, NULL} SCRIPTID_INIT
- }
-};
#define PARAM_COUNT ARRAY_SIZE(options)
@@ -1724,12 +316,6 @@ void set_init_1(void)
/* Be nocompatible */
p_cp = FALSE;
- /* Use POSIX compatibility when $VIM_POSIX is set. */
- if (os_env_exists("VIM_POSIX")) {
- set_string_default("cpo", (char_u *)CPO_ALL);
- set_string_default("shm", (char_u *)"A");
- }
-
/*
* Find default value for 'shell' option.
* Don't use it if it is empty.
@@ -4226,7 +2812,7 @@ did_set_string_option (
if (varp == &p_shm)
p = (char_u *)SHM_ALL;
else if (varp == &(p_cpo))
- p = (char_u *)CPO_ALL;
+ p = (char_u *)CPO_VI;
else if (varp == &(curbuf->b_p_fo))
p = (char_u *)FO_ALL;
else if (varp == &curwin->w_p_cocu)
diff --git a/src/nvim/option_defs.h b/src/nvim/option_defs.h
index d1fe91f49c..e35f8bc55b 100644
--- a/src/nvim/option_defs.h
+++ b/src/nvim/option_defs.h
@@ -128,21 +128,11 @@
#define CPO_PLUS '+' /* ":write file" resets 'modified' */
#define CPO_SPECI '<' /* don't recognize <> in mappings */
#define CPO_REGAPPEND '>' /* insert NL when appending to a register */
-/* POSIX flags */
-#define CPO_HASH '#' /* "D", "o" and "O" do not use a count */
-#define CPO_PARA '{' /* "{" is also a paragraph boundary */
-#define CPO_TSIZE '|' /* $LINES and $COLUMNS overrule term size */
-#define CPO_PRESERVE '&' /* keep swap file after :preserve */
-#define CPO_SUBPERCENT '/' /* % in :s string uses previous one */
-#define CPO_BACKSL '\\' /* \ is not special in [] */
-#define CPO_CHDIR '.' /* don't chdir if buffer is modified */
#define CPO_SCOLON ';' /* using "," and ";" will skip over char if
* cursor would not move */
-/* default values for Vim, Vi and POSIX */
+/* default values for Vim and Vi */
#define CPO_VIM "aABceFs"
#define CPO_VI "aAbBcCdDeEfFiIJkKlLmMnoOpPqrRsStuvWxXyZ$!%+<>;"
-#define CPO_ALL \
- "aAbBcCdDeEfFiIJkKlLmMnoOpPqrRsStuvWxXyZ$!%+<>#{|&/\\.;"
/* characters for p_ww option: */
#define WW_ALL "bshl<>[],~"
diff --git a/src/nvim/options.lua b/src/nvim/options.lua
new file mode 100644
index 0000000000..b269bfdc98
--- /dev/null
+++ b/src/nvim/options.lua
@@ -0,0 +1,2777 @@
+-- {
+-- {
+-- full_name='aleph', abbreviation='al',
+-- varname='p_aleph', pv_name=nil,
+-- type='number', list=nil, scope={'global'},
+-- deny_duplicates=nil,
+-- enable_if=nil,
+-- defaults={condition=nil, if_true={vi=224, vim=0}, if_false=nil},
+-- secure=nil, gettext=nil, noglob=nil, normal_fname_chars=nil,
+-- pri_mkrc=nil, deny_in_modelines=nil,
+-- expand=nil, nodefault=nil, no_mkrc=nil, vi_def=true, vim=true,
+-- alloced=nil,
+-- save_pv_indir=nil,
+-- redraw={'curswant'},
+-- }
+-- }
+-- types: bool, number, string
+-- lists: (nil), comma, flags, flagscomma
+-- scopes: global, buffer, window
+-- redraw options: statuslines, current_window, current_buffer, all_windows,
+-- everything, curswant
+-- default: {vi=…[, vim=…]}
+-- defaults: {condition=#if condition, if_true=default, if_false=default}
+-- #if condition:
+-- string: #ifdef string
+-- !string: #ifndef string
+-- {string, string}: #if defined(string) && defined(string)
+-- {!string, !string}: #if !defined(string) && !defined(string)
+local cstr = function(s)
+ return '"' .. s:gsub('["\\]', '\\%0'):gsub('\t', '\\t') .. '"'
+end
+local macros=function(s)
+ return function()
+ return s
+ end
+end
+local N_=function(s)
+ return function()
+ return 'N_(' .. cstr(s) .. ')'
+ end
+end
+return {
+ cstr=cstr,
+ options={
+ {
+ full_name='aleph', abbreviation='al',
+ type='number', scope={'global'},
+ vi_def=true,
+ redraw={'curswant'},
+ varname='p_aleph',
+ defaults={if_true={vi=224}}
+ },
+ {
+ full_name='antialias', abbreviation='anti',
+ type='bool', scope={'global'},
+ vi_def=true,
+ vim=true,
+ redraw={'everything'},
+ enable_if=false,
+ defaults={if_true={vi=false, vim=false}}
+ },
+ {
+ full_name='arabic', abbreviation='arab',
+ type='bool', scope={'window'},
+ vi_def=true,
+ vim=true,
+ redraw={'curswant'},
+ defaults={if_true={vi=false}}
+ },
+ {
+ full_name='arabicshape', abbreviation='arshape',
+ type='bool', scope={'global'},
+ vi_def=true,
+ vim=true,
+ redraw={'everything'},
+ varname='p_arshape',
+ defaults={if_true={vi=true}}
+ },
+ {
+ full_name='allowrevins', abbreviation='ari',
+ type='bool', scope={'global'},
+ vi_def=true,
+ vim=true,
+ varname='p_ari',
+ defaults={if_true={vi=false}}
+ },
+ {
+ full_name='altkeymap', abbreviation='akm',
+ type='bool', scope={'global'},
+ vi_def=true,
+ varname='p_altkeymap',
+ defaults={if_true={vi=false}}
+ },
+ {
+ full_name='ambiwidth', abbreviation='ambw',
+ type='string', scope={'global'},
+ vi_def=true,
+ redraw={'everything'},
+ varname='p_ambw',
+ defaults={if_true={vi="single"}}
+ },
+ {
+ full_name='autochdir', abbreviation='acd',
+ type='bool', scope={'global'},
+ vi_def=true,
+ varname='p_acd',
+ defaults={if_true={vi=false}}
+ },
+ {
+ full_name='autoindent', abbreviation='ai',
+ type='bool', scope={'buffer'},
+ varname='p_ai',
+ defaults={if_true={vi=false, vim=true}}
+ },
+ {
+ full_name='autoread', abbreviation='ar',
+ type='bool', scope={'global', 'buffer'},
+ varname='p_ar',
+ defaults={if_true={vi=false, vim=true}}
+ },
+ {
+ full_name='autowrite', abbreviation='aw',
+ type='bool', scope={'global'},
+ vi_def=true,
+ varname='p_aw',
+ defaults={if_true={vi=false}}
+ },
+ {
+ full_name='autowriteall', abbreviation='awa',
+ type='bool', scope={'global'},
+ vi_def=true,
+ varname='p_awa',
+ defaults={if_true={vi=false}}
+ },
+ {
+ full_name='background', abbreviation='bg',
+ type='string', scope={'global'},
+ vi_def=true,
+ redraw={'everything'},
+ varname='p_bg',
+ defaults={if_true={vi="light"}}
+ },
+ {
+ full_name='backspace', abbreviation='bs',
+ type='string', list='comma', scope={'global'},
+ deny_duplicates=true,
+ vim=true,
+ varname='p_bs',
+ defaults={if_true={vi="", vim="indent,eol,start"}}
+ },
+ {
+ full_name='backup', abbreviation='bk',
+ type='bool', scope={'global'},
+ vi_def=true,
+ vim=true,
+ varname='p_bk',
+ defaults={if_true={vi=false}}
+ },
+ {
+ full_name='backupcopy', abbreviation='bkc',
+ type='string', list='comma', scope={'global', 'buffer'},
+ deny_duplicates=true,
+ vim=true,
+ varname='p_bkc',
+ defaults={
+ condition='UNIX',
+ if_true={vi="yes", vim="auto"},
+ if_false={vi="auto", vim="auto"}
+ },
+ },
+ {
+ full_name='backupdir', abbreviation='bdir',
+ type='string', list='comma', scope={'global'},
+ deny_duplicates=true,
+ secure=true,
+ vi_def=true,
+ expand=true,
+ varname='p_bdir',
+ defaults={if_true={vi=macros('DFLT_BDIR')}}
+ },
+ {
+ full_name='backupext', abbreviation='bex',
+ type='string', scope={'global'},
+ normal_fname_chars=true,
+ vi_def=true,
+ varname='p_bex',
+ defaults={if_true={vi="~"}}
+ },
+ {
+ full_name='backupskip', abbreviation='bsk',
+ type='string', list='comma', scope={'global'},
+ vi_def=true,
+ varname='p_bsk',
+ defaults={if_true={vi=""}}
+ },
+ {
+ full_name='binary', abbreviation='bin',
+ type='bool', scope={'buffer'},
+ vi_def=true,
+ redraw={'statuslines'},
+ varname='p_bin',
+ defaults={if_true={vi=false}}
+ },
+ {
+ full_name='bomb',
+ type='bool', scope={'buffer'},
+ no_mkrc=true,
+ vi_def=true,
+ redraw={'statuslines'},
+ varname='p_bomb',
+ defaults={if_true={vi=false}}
+ },
+ {
+ full_name='breakat', abbreviation='brk',
+ type='string', list='flags', scope={'global'},
+ vi_def=true,
+ redraw={'all_windows'},
+ varname='p_breakat',
+ defaults={if_true={vi=" \t!@*-+;:,./?"}}
+ },
+ {
+ full_name='breakindent', abbreviation='bri',
+ type='bool', scope={'window'},
+ vi_def=true,
+ vim=true,
+ redraw={'current_window'},
+ defaults={if_true={vi=false}}
+ },
+ {
+ full_name='breakindentopt', abbreviation='briopt',
+ type='string', list='comma', scope={'window'},
+ deny_duplicates=true,
+ vi_def=true,
+ alloced=true,
+ redraw={'current_buffer'},
+ defaults={if_true={vi=""}},
+ },
+ {
+ full_name='browsedir', abbreviation='bsdir',
+ type='string', scope={'global'},
+ vi_def=true,
+ enable_if=false,
+ },
+ {
+ full_name='bufhidden', abbreviation='bh',
+ type='string', scope={'buffer'},
+ noglob=true,
+ vi_def=true,
+ alloced=true,
+ varname='p_bh',
+ defaults={if_true={vi=""}}
+ },
+ {
+ full_name='buflisted', abbreviation='bl',
+ type='bool', scope={'buffer'},
+ noglob=true,
+ vi_def=true,
+ varname='p_bl',
+ defaults={if_true={vi=1}}
+ },
+ {
+ full_name='buftype', abbreviation='bt',
+ type='string', scope={'buffer'},
+ noglob=true,
+ vi_def=true,
+ alloced=true,
+ varname='p_bt',
+ defaults={if_true={vi=""}}
+ },
+ {
+ full_name='casemap', abbreviation='cmp',
+ type='string', list='comma', scope={'global'},
+ deny_duplicates=true,
+ vi_def=true,
+ varname='p_cmp',
+ defaults={if_true={vi="internal,keepascii"}}
+ },
+ {
+ full_name='cdpath', abbreviation='cd',
+ type='string', list='comma', scope={'global'},
+ deny_duplicates=true,
+ vi_def=true,
+ expand=true,
+ varname='p_cdpath',
+ defaults={if_true={vi=",,"}}
+ },
+ {
+ full_name='cedit',
+ type='string', scope={'global'},
+ varname='p_cedit',
+ defaults={if_true={vi="", vim=macros('CTRL_F_STR')}}
+ },
+ {
+ full_name='charconvert', abbreviation='ccv',
+ type='string', scope={'global'},
+ secure=true,
+ vi_def=true,
+ varname='p_ccv',
+ defaults={if_true={vi=""}}
+ },
+ {
+ full_name='cindent', abbreviation='cin',
+ type='bool', scope={'buffer'},
+ vi_def=true,
+ vim=true,
+ varname='p_cin',
+ defaults={if_true={vi=false}}
+ },
+ {
+ full_name='cinkeys', abbreviation='cink',
+ type='string', list='comma', scope={'buffer'},
+ deny_duplicates=true,
+ vi_def=true,
+ alloced=true,
+ varname='p_cink',
+ defaults={if_true={vi="0{,0},0),:,0#,!^F,o,O,e"}}
+ },
+ {
+ full_name='cinoptions', abbreviation='cino',
+ type='string', list='comma', scope={'buffer'},
+ deny_duplicates=true,
+ vi_def=true,
+ alloced=true,
+ varname='p_cino',
+ defaults={if_true={vi=""}}
+ },
+ {
+ full_name='cinwords', abbreviation='cinw',
+ type='string', list='comma', scope={'buffer'},
+ deny_duplicates=true,
+ vi_def=true,
+ alloced=true,
+ varname='p_cinw',
+ defaults={if_true={vi="if,else,while,do,for,switch"}}
+ },
+ {
+ full_name='clipboard', abbreviation='cb',
+ type='string', list='comma', scope={'global'},
+ deny_duplicates=true,
+ vi_def=true,
+ varname='p_cb',
+ defaults={if_true={vi=""}}
+ },
+ {
+ full_name='cmdheight', abbreviation='ch',
+ type='number', scope={'global'},
+ vi_def=true,
+ redraw={'all_windows'},
+ varname='p_ch',
+ defaults={if_true={vi=1}}
+ },
+ {
+ full_name='cmdwinheight', abbreviation='cwh',
+ type='number', scope={'global'},
+ vi_def=true,
+ varname='p_cwh',
+ defaults={if_true={vi=7}}
+ },
+ {
+ full_name='colorcolumn', abbreviation='cc',
+ type='string', list='comma', scope={'window'},
+ deny_duplicates=true,
+ vi_def=true,
+ redraw={'current_window'},
+ defaults={if_true={vi=""}}
+ },
+ {
+ full_name='columns', abbreviation='co',
+ type='number', scope={'global'},
+ no_mkrc=true,
+ nodefault=true,
+ vi_def=true,
+ redraw={'everything'},
+ varname='Columns',
+ defaults={if_true={vi=macros('DFLT_COLS')}}
+ },
+ {
+ full_name='comments', abbreviation='com',
+ type='string', list='comma', scope={'buffer'},
+ deny_duplicates=true,
+ vi_def=true,
+ alloced=true,
+ redraw={'curswant'},
+ varname='p_com',
+ defaults={if_true={vi="s1:/*,mb:*,ex:*/,://,b:#,:%,:XCOMM,n:>,fb:-"}}
+ },
+ {
+ full_name='commentstring', abbreviation='cms',
+ type='string', scope={'buffer'},
+ vi_def=true,
+ alloced=true,
+ redraw={'curswant'},
+ varname='p_cms',
+ defaults={if_true={vi="/*%s*/"}}
+ },
+ {
+ full_name='compatible', abbreviation='cp',
+ type='bool', scope={'global'},
+ redraw={'all_windows'},
+ varname='p_force_off',
+ -- pri_mkrc isn't needed here, optval_default()
+ -- always returns TRUE for 'compatible'
+ defaults={if_true={vi=true, vim=false}}
+ },
+ {
+ full_name='complete', abbreviation='cpt',
+ type='string', list='comma', scope={'buffer'},
+ deny_duplicates=true,
+ alloced=true,
+ varname='p_cpt',
+ defaults={if_true={vi=".,w,b,u,t,i", vim=".,w,b,u,t"}}
+ },
+ {
+ full_name='concealcursor', abbreviation='cocu',
+ type='string', scope={'window'},
+ vi_def=true,
+ alloced=true,
+ redraw={'current_window'},
+ defaults={if_true={vi=""}}
+ },
+ {
+ full_name='conceallevel', abbreviation='cole',
+ type='number', scope={'window'},
+ vi_def=true,
+ redraw={'current_window'},
+ defaults={if_true={vi=0}}
+ },
+ {
+ full_name='completefunc', abbreviation='cfu',
+ type='string', scope={'buffer'},
+ secure=true,
+ vi_def=true,
+ alloced=true,
+ varname='p_cfu',
+ defaults={if_true={vi=""}}
+ },
+ {
+ full_name='completeopt', abbreviation='cot',
+ type='string', list='comma', scope={'global'},
+ deny_duplicates=true,
+ vi_def=true,
+ varname='p_cot',
+ defaults={if_true={vi="menu,preview"}}
+ },
+ {
+ full_name='confirm', abbreviation='cf',
+ type='bool', scope={'global'},
+ vi_def=true,
+ varname='p_confirm',
+ defaults={if_true={vi=false}}
+ },
+ {
+ full_name='copyindent', abbreviation='ci',
+ type='bool', scope={'buffer'},
+ vi_def=true,
+ vim=true,
+ varname='p_ci',
+ defaults={if_true={vi=false}}
+ },
+ {
+ full_name='cpoptions', abbreviation='cpo',
+ type='string', list='flags', scope={'global'},
+ vim=true,
+ redraw={'all_windows'},
+ varname='p_cpo',
+ defaults={if_true={vi=macros('CPO_VI'), vim=macros('CPO_VIM')}}
+ },
+ {
+ full_name='cscopepathcomp', abbreviation='cspc',
+ type='number', scope={'global'},
+ vi_def=true,
+ vim=true,
+ varname='p_cspc',
+ defaults={if_true={vi=0}}
+ },
+ {
+ full_name='cscopeprg', abbreviation='csprg',
+ type='string', scope={'global'},
+ secure=true,
+ vi_def=true,
+ expand=true,
+ varname='p_csprg',
+ defaults={if_true={vi="cscope"}}
+ },
+ {
+ full_name='cscopequickfix', abbreviation='csqf',
+ type='string', list='comma', scope={'global'},
+ deny_duplicates=true,
+ vi_def=true,
+ varname='p_csqf',
+ defaults={if_true={vi=""}}
+ },
+ {
+ full_name='cscoperelative', abbreviation='csre',
+ type='bool', scope={'global'},
+ vi_def=true,
+ vim=true,
+ varname='p_csre',
+ defaults={if_true={vi=0}}
+ },
+ {
+ full_name='cscopetag', abbreviation='cst',
+ type='bool', scope={'global'},
+ vi_def=true,
+ vim=true,
+ varname='p_cst',
+ defaults={if_true={vi=0}}
+ },
+ {
+ full_name='cscopetagorder', abbreviation='csto',
+ type='number', scope={'global'},
+ vi_def=true,
+ vim=true,
+ varname='p_csto',
+ defaults={if_true={vi=0}}
+ },
+ {
+ full_name='cscopeverbose', abbreviation='csverb',
+ type='bool', scope={'global'},
+ vi_def=true,
+ vim=true,
+ varname='p_csverbose',
+ defaults={if_true={vi=0}}
+ },
+ {
+ full_name='cursorbind', abbreviation='crb',
+ type='bool', scope={'window'},
+ vi_def=true,
+ pv_name='p_crbind',
+ defaults={if_true={vi=false}}
+ },
+ {
+ full_name='cursorcolumn', abbreviation='cuc',
+ type='bool', scope={'window'},
+ vi_def=true,
+ redraw={'current_window'},
+ defaults={if_true={vi=false}}
+ },
+ {
+ full_name='cursorline', abbreviation='cul',
+ type='bool', scope={'window'},
+ vi_def=true,
+ redraw={'current_window'},
+ defaults={if_true={vi=false}}
+ },
+ {
+ full_name='debug',
+ type='string', scope={'global'},
+ vi_def=true,
+ varname='p_debug',
+ defaults={if_true={vi=""}}
+ },
+ {
+ full_name='define', abbreviation='def',
+ type='string', scope={'global', 'buffer'},
+ vi_def=true,
+ alloced=true,
+ redraw={'curswant'},
+ varname='p_def',
+ defaults={if_true={vi="^\\s*#\\s*define"}}
+ },
+ {
+ full_name='delcombine', abbreviation='deco',
+ type='bool', scope={'global'},
+ vi_def=true,
+ vim=true,
+ varname='p_deco',
+ defaults={if_true={vi=false}}
+ },
+ {
+ full_name='dictionary', abbreviation='dict',
+ type='string', list='comma', scope={'global', 'buffer'},
+ deny_duplicates=true,
+ vi_def=true,
+ expand=true,
+ varname='p_dict',
+ defaults={if_true={vi=""}}
+ },
+ {
+ full_name='diff',
+ type='bool', scope={'window'},
+ noglob=true,
+ vi_def=true,
+ redraw={'current_window'},
+ defaults={if_true={vi=false}}
+ },
+ {
+ full_name='diffexpr', abbreviation='dex',
+ type='string', scope={'global'},
+ secure=true,
+ vi_def=true,
+ redraw={'curswant'},
+ varname='p_dex',
+ defaults={if_true={vi=""}}
+ },
+ {
+ full_name='diffopt', abbreviation='dip',
+ type='string', list='comma', scope={'global'},
+ deny_duplicates=true,
+ vi_def=true,
+ alloced=true,
+ redraw={'current_window'},
+ varname='p_dip',
+ defaults={if_true={vi="filler"}}
+ },
+ {
+ full_name='digraph', abbreviation='dg',
+ type='bool', scope={'global'},
+ vi_def=true,
+ vim=true,
+ varname='p_dg',
+ defaults={if_true={vi=false}}
+ },
+ {
+ full_name='directory', abbreviation='dir',
+ type='string', list='comma', scope={'global'},
+ deny_duplicates=true,
+ secure=true,
+ vi_def=true,
+ expand=true,
+ varname='p_dir',
+ defaults={if_true={vi=macros('DFLT_DIR')}}
+ },
+ {
+ full_name='display', abbreviation='dy',
+ type='string', list='comma', scope={'global'},
+ deny_duplicates=true,
+ vim=true,
+ redraw={'all_windows'},
+ varname='p_dy',
+ defaults={if_true={vi="", vim="lastline"}}
+ },
+ {
+ full_name='eadirection', abbreviation='ead',
+ type='string', scope={'global'},
+ vi_def=true,
+ varname='p_ead',
+ defaults={if_true={vi="both"}}
+ },
+ {
+ full_name='edcompatible', abbreviation='ed',
+ type='bool', scope={'global'},
+ vi_def=true,
+ varname='p_force_off',
+ defaults={if_true={vi=false}}
+ },
+ {
+ full_name='encoding', abbreviation='enc',
+ type='string', scope={'global'},
+ deny_in_modelines=true,
+ vi_def=true,
+ redraw={'everything'},
+ varname='p_enc',
+ defaults={if_true={vi=macros('ENC_DFLT')}}
+ },
+ {
+ full_name='endofline', abbreviation='eol',
+ type='bool', scope={'buffer'},
+ no_mkrc=true,
+ vi_def=true,
+ redraw={'statuslines'},
+ varname='p_eol',
+ defaults={if_true={vi=true}}
+ },
+ {
+ full_name='equalalways', abbreviation='ea',
+ type='bool', scope={'global'},
+ vi_def=true,
+ redraw={'all_windows'},
+ varname='p_ea',
+ defaults={if_true={vi=true}}
+ },
+ {
+ full_name='equalprg', abbreviation='ep',
+ type='string', scope={'global', 'buffer'},
+ secure=true,
+ vi_def=true,
+ expand=true,
+ varname='p_ep',
+ defaults={if_true={vi=""}}
+ },
+ {
+ full_name='errorbells', abbreviation='eb',
+ type='bool', scope={'global'},
+ vi_def=true,
+ varname='p_eb',
+ defaults={if_true={vi=false}}
+ },
+ {
+ full_name='errorfile', abbreviation='ef',
+ type='string', scope={'global'},
+ secure=true,
+ vi_def=true,
+ expand=true,
+ varname='p_ef',
+ defaults={if_true={vi=macros('DFLT_ERRORFILE')}}
+ },
+ {
+ full_name='errorformat', abbreviation='efm',
+ type='string', list='comma', scope={'global', 'buffer'},
+ deny_duplicates=true,
+ vi_def=true,
+ varname='p_efm',
+ defaults={if_true={vi=macros('DFLT_EFM')}}
+ },
+ {
+ full_name='esckeys', abbreviation='ek',
+ type='bool', scope={'global'},
+ vim=true,
+ varname='p_ek',
+ defaults={if_true={vi=false, vim=true}}
+ },
+ {
+ full_name='eventignore', abbreviation='ei',
+ type='string', list='comma', scope={'global'},
+ deny_duplicates=true,
+ vi_def=true,
+ varname='p_ei',
+ defaults={if_true={vi=""}}
+ },
+ {
+ full_name='expandtab', abbreviation='et',
+ type='bool', scope={'buffer'},
+ vi_def=true,
+ vim=true,
+ varname='p_et',
+ defaults={if_true={vi=false}}
+ },
+ {
+ full_name='exrc', abbreviation='ex',
+ type='bool', scope={'global'},
+ secure=true,
+ vi_def=true,
+ varname='p_exrc',
+ defaults={if_true={vi=false}}
+ },
+ {
+ full_name='fileencoding', abbreviation='fenc',
+ type='string', scope={'buffer'},
+ no_mkrc=true,
+ vi_def=true,
+ alloced=true,
+ redraw={'statuslines', 'current_buffer'},
+ varname='p_fenc',
+ defaults={if_true={vi=""}}
+ },
+ {
+ full_name='fileencodings', abbreviation='fencs',
+ type='string', list='comma', scope={'global'},
+ vi_def=true,
+ varname='p_fencs',
+ defaults={if_true={vi="ucs-bom"}}
+ },
+ {
+ full_name='fileformat', abbreviation='ff',
+ type='string', scope={'buffer'},
+ no_mkrc=true,
+ vi_def=true,
+ alloced=true,
+ redraw={'curswant', 'statuslines'},
+ varname='p_ff',
+ defaults={if_true={vi=macros('DFLT_FF')}}
+ },
+ {
+ full_name='fileformats', abbreviation='ffs',
+ type='string', list='comma', scope={'global'},
+ deny_duplicates=true,
+ vim=true,
+ varname='p_ffs',
+ defaults={if_true={vi=macros('DFLT_FFS_VI'), vim=macros('DFLT_FFS_VIM')}}
+ },
+ {
+ full_name='fileignorecase', abbreviation='fic',
+ type='bool', scope={'global'},
+ vi_def=true,
+ varname='p_fic',
+ defaults={
+ condition='CASE_INSENSITIVE_FILENAME',
+ if_true={vi=true},
+ if_false={vi=false},
+ }
+ },
+ {
+ full_name='filetype', abbreviation='ft',
+ type='string', scope={'buffer'},
+ noglob=true,
+ normal_fname_chars=true,
+ vi_def=true,
+ alloced=true,
+ varname='p_ft',
+ defaults={if_true={vi=""}}
+ },
+ {
+ full_name='fillchars', abbreviation='fcs',
+ type='string', list='comma', scope={'global'},
+ deny_duplicates=true,
+ vi_def=true,
+ redraw={'all_windows'},
+ varname='p_fcs',
+ defaults={if_true={vi="vert:|,fold:-"}}
+ },
+ {
+ full_name='fkmap', abbreviation='fk',
+ type='bool', scope={'global'},
+ vi_def=true,
+ varname='p_fkmap',
+ defaults={if_true={vi=false}}
+ },
+ {
+ full_name='foldclose', abbreviation='fcl',
+ type='string', list='comma', scope={'global'},
+ deny_duplicates=true,
+ vi_def=true,
+ redraw={'current_window'},
+ varname='p_fcl',
+ defaults={if_true={vi=""}}
+ },
+ {
+ full_name='foldcolumn', abbreviation='fdc',
+ type='number', scope={'window'},
+ vi_def=true,
+ redraw={'current_window'},
+ defaults={if_true={vi=false}}
+ },
+ {
+ full_name='foldenable', abbreviation='fen',
+ type='bool', scope={'window'},
+ vi_def=true,
+ redraw={'current_window'},
+ defaults={if_true={vi=true}}
+ },
+ {
+ full_name='foldexpr', abbreviation='fde',
+ type='string', scope={'window'},
+ vi_def=true,
+ vim=true,
+ alloced=true,
+ redraw={'current_window'},
+ defaults={if_true={vi="0"}}
+ },
+ {
+ full_name='foldignore', abbreviation='fdi',
+ type='string', scope={'window'},
+ vi_def=true,
+ vim=true,
+ alloced=true,
+ redraw={'current_window'},
+ defaults={if_true={vi="#"}}
+ },
+ {
+ full_name='foldlevel', abbreviation='fdl',
+ type='number', scope={'window'},
+ vi_def=true,
+ redraw={'current_window'},
+ defaults={if_true={vi=0}}
+ },
+ {
+ full_name='foldlevelstart', abbreviation='fdls',
+ type='number', scope={'global'},
+ vi_def=true,
+ redraw={'curswant'},
+ varname='p_fdls',
+ defaults={if_true={vi=-1}}
+ },
+ {
+ full_name='foldmarker', abbreviation='fmr',
+ type='string', list='comma', scope={'window'},
+ deny_duplicates=true,
+ vi_def=true,
+ vim=true,
+ alloced=true,
+ redraw={'current_window'},
+ defaults={if_true={vi="{{{,}}}"}}
+ },
+ {
+ full_name='foldmethod', abbreviation='fdm',
+ type='string', scope={'window'},
+ vi_def=true,
+ vim=true,
+ alloced=true,
+ redraw={'current_window'},
+ defaults={if_true={vi="manual"}}
+ },
+ {
+ full_name='foldminlines', abbreviation='fml',
+ type='number', scope={'window'},
+ vi_def=true,
+ redraw={'current_window'},
+ defaults={if_true={vi=1}}
+ },
+ {
+ full_name='foldnestmax', abbreviation='fdn',
+ type='number', scope={'window'},
+ vi_def=true,
+ redraw={'current_window'},
+ defaults={if_true={vi=20}}
+ },
+ {
+ full_name='foldopen', abbreviation='fdo',
+ type='string', list='comma', scope={'global'},
+ deny_duplicates=true,
+ vi_def=true,
+ redraw={'curswant'},
+ varname='p_fdo',
+ defaults={if_true={vi="block,hor,mark,percent,quickfix,search,tag,undo"}}
+ },
+ {
+ full_name='foldtext', abbreviation='fdt',
+ type='string', scope={'window'},
+ vi_def=true,
+ vim=true,
+ alloced=true,
+ redraw={'current_window'},
+ defaults={if_true={vi="foldtext()"}}
+ },
+ {
+ full_name='formatexpr', abbreviation='fex',
+ type='string', scope={'buffer'},
+ vi_def=true,
+ vim=true,
+ alloced=true,
+ varname='p_fex',
+ defaults={if_true={vi=""}}
+ },
+ {
+ full_name='formatoptions', abbreviation='fo',
+ type='string', list='flags', scope={'buffer'},
+ vim=true,
+ alloced=true,
+ varname='p_fo',
+ defaults={if_true={vi=macros('DFLT_FO_VI'), vim=macros('DFLT_FO_VIM')}}
+ },
+ {
+ full_name='formatlistpat', abbreviation='flp',
+ type='string', scope={'buffer'},
+ vi_def=true,
+ alloced=true,
+ varname='p_flp',
+ defaults={if_true={vi="^\\s*\\d\\+[\\]:.)}\\t ]\\s*"}}
+ },
+ {
+ full_name='formatprg', abbreviation='fp',
+ type='string', scope={'global'},
+ secure=true,
+ vi_def=true,
+ expand=true,
+ varname='p_fp',
+ defaults={if_true={vi=""}}
+ },
+ {
+ full_name='fsync', abbreviation='fs',
+ type='bool', scope={'global'},
+ secure=true,
+ vi_def=true,
+ enable_if='HAVE_FSYNC',
+ varname='p_fs',
+ defaults={if_true={vi=true}}
+ },
+ {
+ full_name='gdefault', abbreviation='gd',
+ type='bool', scope={'global'},
+ vi_def=true,
+ vim=true,
+ varname='p_gd',
+ defaults={if_true={vi=false}}
+ },
+ {
+ full_name='grepformat', abbreviation='gfm',
+ type='string', list='comma', scope={'global'},
+ deny_duplicates=true,
+ vi_def=true,
+ varname='p_gefm',
+ defaults={if_true={vi=macros('DFLT_GREPFORMAT')}}
+ },
+ {
+ full_name='grepprg', abbreviation='gp',
+ type='string', scope={'global', 'buffer'},
+ secure=true,
+ vi_def=true,
+ expand=true,
+ varname='p_gp',
+ defaults={
+ condition='UNIX',
+ -- Add an extra file name so that grep will always
+ -- insert a file name in the match line. */
+ if_true={vi="grep -n $* /dev/null"},
+ if_false={vi="grep -n "},
+ }
+ },
+ {
+ full_name='guicursor', abbreviation='gcr',
+ type='string', list='comma', scope={'global'},
+ deny_duplicates=true,
+ vi_def=true,
+ varname='p_guicursor',
+ defaults={if_true={vi="n-v-c:block,o:hor50,i-ci:hor15,r-cr:hor30,sm:block"}}
+ },
+ {
+ full_name='guifont', abbreviation='gfn',
+ type='string', list='comma', scope={'global'},
+ deny_duplicates=true,
+ vi_def=true,
+ redraw={'everything'},
+ enable_if=false,
+ },
+ {
+ full_name='guifontset', abbreviation='gfs',
+ type='string', list='comma', scope={'global'},
+ vi_def=true,
+ redraw={'everything'},
+ enable_if=false,
+ },
+ {
+ full_name='guifontwide', abbreviation='gfw',
+ type='string', list='comma', scope={'global'},
+ deny_duplicates=true,
+ vi_def=true,
+ redraw={'everything'},
+ enable_if=false,
+ },
+ {
+ full_name='guiheadroom', abbreviation='ghr',
+ type='number', scope={'global'},
+ vi_def=true,
+ enable_if=false,
+ defaults={if_true={vi=50}}
+ },
+ {
+ full_name='guioptions', abbreviation='go',
+ type='string', list='flags', scope={'global'},
+ vi_def=true,
+ redraw={'all_windows'},
+ enable_if=false,
+ },
+ {
+ full_name='guitablabel', abbreviation='gtl',
+ type='string', scope={'global'},
+ vi_def=true,
+ redraw={'current_window'},
+ enable_if=false,
+ },
+ {
+ full_name='guitabtooltip', abbreviation='gtt',
+ type='string', scope={'global'},
+ vi_def=true,
+ redraw={'current_window'},
+ enable_if=false,
+ },
+ {
+ full_name='helpfile', abbreviation='hf',
+ type='string', scope={'global'},
+ secure=true,
+ vi_def=true,
+ expand=true,
+ varname='p_hf',
+ defaults={if_true={vi=macros('DFLT_HELPFILE')}}
+ },
+ {
+ full_name='helpheight', abbreviation='hh',
+ type='number', scope={'global'},
+ vi_def=true,
+ varname='p_hh',
+ defaults={if_true={vi=20}}
+ },
+ {
+ full_name='helplang', abbreviation='hlg',
+ type='string', list='comma', scope={'global'},
+ vi_def=true,
+ varname='p_hlg',
+ defaults={if_true={vi=""}}
+ },
+ {
+ full_name='hidden', abbreviation='hid',
+ type='bool', scope={'global'},
+ vi_def=true,
+ varname='p_hid',
+ defaults={if_true={vi=false}}
+ },
+ {
+ full_name='highlight', abbreviation='hl',
+ type='string', list='comma', scope={'global'},
+ deny_duplicates=true,
+ vi_def=true,
+ redraw={'everything'},
+ varname='p_hl',
+ defaults={if_true={vi=macros('HIGHLIGHT_INIT')}}
+ },
+ {
+ full_name='history', abbreviation='hi',
+ type='number', scope={'global'},
+ vim=true,
+ varname='p_hi',
+ defaults={if_true={vi=0, vim=10000}}
+ },
+ {
+ full_name='hkmap', abbreviation='hk',
+ type='bool', scope={'global'},
+ vi_def=true,
+ vim=true,
+ varname='p_hkmap',
+ defaults={if_true={vi=false}}
+ },
+ {
+ full_name='hkmapp', abbreviation='hkp',
+ type='bool', scope={'global'},
+ vi_def=true,
+ vim=true,
+ varname='p_hkmapp',
+ defaults={if_true={vi=false}}
+ },
+ {
+ full_name='hlsearch', abbreviation='hls',
+ type='bool', scope={'global'},
+ vim=true,
+ redraw={'all_windows'},
+ varname='p_hls',
+ defaults={if_true={vi=false, vim=true}}
+ },
+ {
+ full_name='icon',
+ type='bool', scope={'global'},
+ vi_def=true,
+ varname='p_icon',
+ defaults={if_true={vi=false}}
+ },
+ {
+ full_name='iconstring',
+ type='string', scope={'global'},
+ vi_def=true,
+ varname='p_iconstring',
+ defaults={if_true={vi=""}}
+ },
+ {
+ full_name='ignorecase', abbreviation='ic',
+ type='bool', scope={'global'},
+ vi_def=true,
+ varname='p_ic',
+ defaults={if_true={vi=false}}
+ },
+ {
+ full_name='imactivatefunc', abbreviation='imaf',
+ type='string', scope={'global'},
+ secure=true,
+ vi_def=true,
+ enable_if=false,
+ },
+ {
+ full_name='imactivatekey', abbreviation='imak',
+ type='string', scope={'global'},
+ vi_def=true,
+ enable_if=false,
+ defaults={if_true={vi=""}}
+ },
+ {
+ full_name='imcmdline', abbreviation='imc',
+ type='bool', scope={'global'},
+ vi_def=true,
+ enable_if=false,
+ defaults={if_true={vi=false}}
+ },
+ {
+ full_name='imdisable', abbreviation='imd',
+ type='bool', scope={'global'},
+ vi_def=true,
+ enable_if=false,
+ defaults={if_true={vi=false}}
+ },
+ {
+ full_name='iminsert', abbreviation='imi',
+ type='number', scope={'buffer'},
+ vi_def=true,
+ varname='p_iminsert', pv_name='p_imi',
+ defaults={
+ condition='B_IMODE_IM',
+ if_true={vi=macros('B_IMODE_IM')},
+ if_false={vi=macros('B_IMODE_NONE')},
+ }
+ },
+ {
+ full_name='imsearch', abbreviation='ims',
+ type='number', scope={'buffer'},
+ vi_def=true,
+ varname='p_imsearch', pv_name='p_ims',
+ defaults={
+ condition='B_IMODE_IM',
+ if_true={vi=macros('B_IMODE_IM')},
+ if_false={vi=macros('B_IMODE_NONE')},
+ }
+ },
+ {
+ full_name='imstatusfunc', abbreviation='imsf',
+ type='string', scope={'global'},
+ secure=true,
+ vi_def=true,
+ enable_if=false,
+ },
+ {
+ full_name='include', abbreviation='inc',
+ type='string', scope={'global', 'buffer'},
+ vi_def=true,
+ alloced=true,
+ varname='p_inc',
+ defaults={if_true={vi="^\\s*#\\s*include"}}
+ },
+ {
+ full_name='includeexpr', abbreviation='inex',
+ type='string', scope={'buffer'},
+ vi_def=true,
+ alloced=true,
+ varname='p_inex',
+ defaults={if_true={vi=""}}
+ },
+ {
+ full_name='incsearch', abbreviation='is',
+ type='bool', scope={'global'},
+ vim=true,
+ varname='p_is',
+ defaults={if_true={vi=false, vim=true}}
+ },
+ {
+ full_name='indentexpr', abbreviation='inde',
+ type='string', scope={'buffer'},
+ vi_def=true,
+ vim=true,
+ alloced=true,
+ varname='p_inde',
+ defaults={if_true={vi=""}}
+ },
+ {
+ full_name='indentkeys', abbreviation='indk',
+ type='string', list='comma', scope={'buffer'},
+ deny_duplicates=true,
+ vi_def=true,
+ alloced=true,
+ varname='p_indk',
+ defaults={if_true={vi="0{,0},:,0#,!^F,o,O,e"}}
+ },
+ {
+ full_name='infercase', abbreviation='inf',
+ type='bool', scope={'buffer'},
+ vi_def=true,
+ varname='p_inf',
+ defaults={if_true={vi=false}}
+ },
+ {
+ full_name='insertmode', abbreviation='im',
+ type='bool', scope={'global'},
+ vi_def=true,
+ vim=true,
+ varname='p_im',
+ defaults={if_true={vi=false}}
+ },
+ {
+ full_name='isfname', abbreviation='isf',
+ type='string', list='comma', scope={'global'},
+ deny_duplicates=true,
+ vi_def=true,
+ varname='p_isf',
+ defaults={
+ condition='BACKSLASH_IN_FILENAME',
+ -- Excluded are: & and ^ are special in cmd.exe
+ -- ( and ) are used in text separating fnames */
+ if_true={vi="@,48-57,/,\\,.,-,_,+,,,#,$,%,{,},[,],:,@-@,!,~,="},
+ if_false={vi="@,48-57,/,.,-,_,+,,,#,$,%,~,="}
+ }
+ },
+ {
+ full_name='isident', abbreviation='isi',
+ type='string', list='comma', scope={'global'},
+ deny_duplicates=true,
+ vi_def=true,
+ varname='p_isi',
+ defaults={if_true={vi="@,48-57,_,192-255"}}
+ },
+ {
+ full_name='iskeyword', abbreviation='isk',
+ type='string', list='comma', scope={'buffer'},
+ deny_duplicates=true,
+ vim=true,
+ alloced=true,
+ varname='p_isk',
+ defaults={if_true={vi="@,48-57,_", vim=macros('ISK_LATIN1')}}
+ },
+ {
+ full_name='isprint', abbreviation='isp',
+ type='string', list='comma', scope={'global'},
+ deny_duplicates=true,
+ vi_def=true,
+ redraw={'all_windows'},
+ varname='p_isp',
+ defaults={
+ condition='MSWIN',
+ if_true={vi="@,~-255"},
+ if_false={vi=macros("ISP_LATIN1")}
+ }
+ },
+ {
+ full_name='joinspaces', abbreviation='js',
+ type='bool', scope={'global'},
+ vi_def=true,
+ vim=true,
+ varname='p_js',
+ defaults={if_true={vi=true}}
+ },
+ {
+ full_name='keymap', abbreviation='kmp',
+ type='string', scope={'buffer'},
+ normal_fname_chars=true,
+ pri_mkrc=true,
+ vi_def=true,
+ alloced=true,
+ redraw={'statuslines', 'current_buffer'},
+ varname='p_keymap', pv_name='p_kmap',
+ defaults={if_true={vi=""}}
+ },
+ {
+ full_name='keymodel', abbreviation='km',
+ type='string', list='comma', scope={'global'},
+ deny_duplicates=true,
+ vi_def=true,
+ varname='p_km',
+ defaults={if_true={vi=""}}
+ },
+ {
+ full_name='keywordprg', abbreviation='kp',
+ type='string', scope={'global', 'buffer'},
+ secure=true,
+ vi_def=true,
+ expand=true,
+ varname='p_kp',
+ defaults={
+ condition='USEMAN_S',
+ if_true={vi="man -s"},
+ if_false={vi="man"},
+ }
+ },
+ {
+ full_name='langmap', abbreviation='lmap',
+ type='string', list='comma', scope={'global'},
+ deny_duplicates=true,
+ secure=true,
+ vi_def=true,
+ varname='p_langmap',
+ defaults={if_true={vi=""}}
+ },
+ {
+ full_name='langmenu', abbreviation='lm',
+ type='string', scope={'global'},
+ normal_fname_chars=true,
+ vi_def=true,
+ varname='p_lm',
+ defaults={if_true={vi=""}}
+ },
+ {
+ full_name='langnoremap', abbreviation='lnr',
+ type='bool', scope={'global'},
+ varname='p_lnr',
+ defaults={if_true={vi=false, vim=true}}
+ },
+ {
+ full_name='laststatus', abbreviation='ls',
+ type='number', scope={'global'},
+ vi_def=true,
+ redraw={'all_windows'},
+ varname='p_ls',
+ defaults={if_true={vi=1}}
+ },
+ {
+ full_name='lazyredraw', abbreviation='lz',
+ type='bool', scope={'global'},
+ vi_def=true,
+ varname='p_lz',
+ defaults={if_true={vi=false}}
+ },
+ {
+ full_name='linebreak', abbreviation='lbr',
+ type='bool', scope={'window'},
+ vi_def=true,
+ redraw={'current_window'},
+ defaults={if_true={vi=false}}
+ },
+ {
+ full_name='lines',
+ type='number', scope={'global'},
+ no_mkrc=true,
+ nodefault=true,
+ vi_def=true,
+ redraw={'everything'},
+ varname='Rows',
+ defaults={if_true={vi=macros('DFLT_ROWS')}}
+ },
+ {
+ full_name='linespace', abbreviation='lsp',
+ type='number', scope={'global'},
+ vi_def=true,
+ redraw={'everything'},
+ enable_if=false,
+ },
+ {
+ full_name='lisp',
+ type='bool', scope={'buffer'},
+ vi_def=true,
+ varname='p_lisp',
+ defaults={if_true={vi=false}}
+ },
+ {
+ full_name='lispwords', abbreviation='lw',
+ type='string', list='comma', scope={'global', 'buffer'},
+ deny_duplicates=true,
+ vi_def=true,
+ varname='p_lispwords', pv_name='p_lw',
+ defaults={if_true={vi=macros('LISPWORD_VALUE')}}
+ },
+ {
+ full_name='list',
+ type='bool', scope={'window'},
+ vi_def=true,
+ redraw={'current_window'},
+ defaults={if_true={vi=false}}
+ },
+ {
+ full_name='listchars', abbreviation='lcs',
+ type='string', list='comma', scope={'global'},
+ deny_duplicates=true,
+ vi_def=true,
+ redraw={'all_windows'},
+ varname='p_lcs',
+ defaults={if_true={vi="eol:$"}}
+ },
+ {
+ full_name='loadplugins', abbreviation='lpl',
+ type='bool', scope={'global'},
+ vi_def=true,
+ varname='p_lpl',
+ defaults={if_true={vi=true}}
+ },
+ {
+ full_name='magic',
+ type='bool', scope={'global'},
+ vi_def=true,
+ varname='p_magic',
+ defaults={if_true={vi=true}}
+ },
+ {
+ full_name='makeef', abbreviation='mef',
+ type='string', scope={'global'},
+ secure=true,
+ vi_def=true,
+ expand=true,
+ varname='p_mef',
+ defaults={if_true={vi=""}}
+ },
+ {
+ full_name='makeprg', abbreviation='mp',
+ type='string', scope={'global', 'buffer'},
+ secure=true,
+ vi_def=true,
+ expand=true,
+ varname='p_mp',
+ defaults={if_true={vi="make"}}
+ },
+ {
+ full_name='matchpairs', abbreviation='mps',
+ type='string', list='comma', scope={'buffer'},
+ deny_duplicates=true,
+ vi_def=true,
+ alloced=true,
+ varname='p_mps',
+ defaults={if_true={vi="(:),{:},[:]"}}
+ },
+ {
+ full_name='matchtime', abbreviation='mat',
+ type='number', scope={'global'},
+ vi_def=true,
+ varname='p_mat',
+ defaults={if_true={vi=5}}
+ },
+ {
+ full_name='maxcombine', abbreviation='mco',
+ type='number', scope={'global'},
+ vi_def=true,
+ redraw={'curswant'},
+ varname='p_mco',
+ defaults={if_true={vi=2}}
+ },
+ {
+ full_name='maxfuncdepth', abbreviation='mfd',
+ type='number', scope={'global'},
+ vi_def=true,
+ varname='p_mfd',
+ defaults={if_true={vi=100}}
+ },
+ {
+ full_name='maxmapdepth', abbreviation='mmd',
+ type='number', scope={'global'},
+ vi_def=true,
+ varname='p_mmd',
+ defaults={if_true={vi=1000}}
+ },
+ {
+ full_name='maxmem', abbreviation='mm',
+ type='number', scope={'global'},
+ vi_def=true,
+ varname='p_mm',
+ defaults={if_true={vi=macros('DFLT_MAXMEM')}}
+ },
+ {
+ full_name='maxmempattern', abbreviation='mmp',
+ type='number', scope={'global'},
+ vi_def=true,
+ varname='p_mmp',
+ defaults={if_true={vi=1000}}
+ },
+ {
+ full_name='maxmemtot', abbreviation='mmt',
+ type='number', scope={'global'},
+ vi_def=true,
+ varname='p_mmt',
+ defaults={if_true={vi=macros('DFLT_MAXMEMTOT')}}
+ },
+ {
+ full_name='menuitems', abbreviation='mis',
+ type='number', scope={'global'},
+ vi_def=true,
+ varname='p_mis',
+ defaults={if_true={vi=25}}
+ },
+ {
+ full_name='mkspellmem', abbreviation='msm',
+ type='string', scope={'global'},
+ secure=true,
+ vi_def=true,
+ expand=true,
+ varname='p_msm',
+ defaults={if_true={vi="460000,2000,500"}}
+ },
+ {
+ full_name='modeline', abbreviation='ml',
+ type='bool', scope={'buffer'},
+ vim=true,
+ varname='p_ml',
+ defaults={if_true={vi=false, vim=true}}
+ },
+ {
+ full_name='modelines', abbreviation='mls',
+ type='number', scope={'global'},
+ vi_def=true,
+ varname='p_mls',
+ defaults={if_true={vi=5}}
+ },
+ {
+ full_name='modifiable', abbreviation='ma',
+ type='bool', scope={'buffer'},
+ noglob=true,
+ vi_def=true,
+ varname='p_ma',
+ defaults={if_true={vi=true}}
+ },
+ {
+ full_name='modified', abbreviation='mod',
+ type='bool', scope={'buffer'},
+ no_mkrc=true,
+ vi_def=true,
+ redraw={'statuslines'},
+ varname='p_mod',
+ defaults={if_true={vi=false}}
+ },
+ {
+ full_name='more',
+ type='bool', scope={'global'},
+ vim=true,
+ varname='p_more',
+ defaults={if_true={vi=false, vim=true}}
+ },
+ {
+ full_name='mouse',
+ type='string', list='flags', scope={'global'},
+ varname='p_mouse',
+ defaults={if_true={vi="", vim="a"}}
+ },
+ {
+ full_name='mousefocus', abbreviation='mousef',
+ type='bool', scope={'global'},
+ vi_def=true,
+ enable_if=false,
+ defaults={if_true={vi=false}}
+ },
+ {
+ full_name='mousehide', abbreviation='mh',
+ type='bool', scope={'global'},
+ vi_def=true,
+ enable_if=false,
+ defaults={if_true={vi=true}}
+ },
+ {
+ full_name='mousemodel', abbreviation='mousem',
+ type='string', scope={'global'},
+ vi_def=true,
+ varname='p_mousem',
+ defaults={if_true={vi="extend"}}
+ },
+ {
+ full_name='mouseshape', abbreviation='mouses',
+ type='string', list='comma', scope={'global'},
+ deny_duplicates=true,
+ vi_def=true,
+ enable_if=false,
+ },
+ {
+ full_name='mousetime', abbreviation='mouset',
+ type='number', scope={'global'},
+ vi_def=true,
+ varname='p_mouset',
+ defaults={if_true={vi=500}}
+ },
+ {
+ full_name='nrformats', abbreviation='nf',
+ type='string', list='comma', scope={'buffer'},
+ deny_duplicates=true,
+ alloced=true,
+ varname='p_nf',
+ defaults={if_true={vi="octal,hex", vim="hex"}}
+ },
+ {
+ full_name='number', abbreviation='nu',
+ type='bool', scope={'window'},
+ vi_def=true,
+ redraw={'current_window'},
+ defaults={if_true={vi=false}}
+ },
+ {
+ full_name='numberwidth', abbreviation='nuw',
+ type='number', scope={'window'},
+ vim=true,
+ redraw={'current_window'},
+ defaults={if_true={vi=8, vim=4}}
+ },
+ {
+ full_name='omnifunc', abbreviation='ofu',
+ type='string', scope={'buffer'},
+ secure=true,
+ vi_def=true,
+ alloced=true,
+ varname='p_ofu',
+ defaults={if_true={vi=""}}
+ },
+ {
+ full_name='opendevice', abbreviation='odev',
+ type='bool', scope={'global'},
+ vi_def=true,
+ enable_if=false,
+ defaults={if_true={vi=false, vim=false}}
+ },
+ {
+ full_name='operatorfunc', abbreviation='opfunc',
+ type='string', scope={'global'},
+ secure=true,
+ vi_def=true,
+ varname='p_opfunc',
+ defaults={if_true={vi=""}}
+ },
+ {
+ full_name='paragraphs', abbreviation='para',
+ type='string', scope={'global'},
+ vi_def=true,
+ varname='p_para',
+ defaults={if_true={vi="IPLPPPQPP TPHPLIPpLpItpplpipbp"}}
+ },
+ {
+ full_name='paste',
+ type='bool', scope={'global'},
+ pri_mkrc=true,
+ vi_def=true,
+ varname='p_paste',
+ defaults={if_true={vi=false}}
+ },
+ {
+ full_name='pastetoggle', abbreviation='pt',
+ type='string', scope={'global'},
+ vi_def=true,
+ varname='p_pt',
+ defaults={if_true={vi=""}}
+ },
+ {
+ full_name='patchexpr', abbreviation='pex',
+ type='string', scope={'global'},
+ secure=true,
+ vi_def=true,
+ varname='p_pex',
+ defaults={if_true={vi=""}}
+ },
+ {
+ full_name='patchmode', abbreviation='pm',
+ type='string', scope={'global'},
+ normal_fname_chars=true,
+ vi_def=true,
+ varname='p_pm',
+ defaults={if_true={vi=""}}
+ },
+ {
+ full_name='path', abbreviation='pa',
+ type='string', list='comma', scope={'global', 'buffer'},
+ deny_duplicates=true,
+ vi_def=true,
+ expand=true,
+ varname='p_path',
+ defaults={if_true={vi=".,/usr/include,,"}}
+ },
+ {
+ full_name='preserveindent', abbreviation='pi',
+ type='bool', scope={'buffer'},
+ vi_def=true,
+ vim=true,
+ varname='p_pi',
+ defaults={if_true={vi=false}}
+ },
+ {
+ full_name='previewheight', abbreviation='pvh',
+ type='number', scope={'global'},
+ vi_def=true,
+ varname='p_pvh',
+ defaults={if_true={vi=12}}
+ },
+ {
+ full_name='previewwindow', abbreviation='pvw',
+ type='bool', scope={'window'},
+ noglob=true,
+ vi_def=true,
+ redraw={'statuslines'},
+ defaults={if_true={vi=false}}
+ },
+ {
+ full_name='printdevice', abbreviation='pdev',
+ type='string', scope={'global'},
+ secure=true,
+ vi_def=true,
+ varname='p_pdev',
+ defaults={if_true={vi=""}}
+ },
+ {
+ full_name='printencoding', abbreviation='penc',
+ type='string', scope={'global'},
+ vi_def=true,
+ varname='p_penc',
+ defaults={if_true={vi=""}}
+ },
+ {
+ full_name='printexpr', abbreviation='pexpr',
+ type='string', scope={'global'},
+ vi_def=true,
+ varname='p_pexpr',
+ defaults={if_true={vi=""}}
+ },
+ {
+ full_name='printfont', abbreviation='pfn',
+ type='string', scope={'global'},
+ vi_def=true,
+ varname='p_pfn',
+ defaults={if_true={vi="courier"}}
+ },
+ {
+ full_name='printheader', abbreviation='pheader',
+ type='string', scope={'global'},
+ gettext=true,
+ vi_def=true,
+ varname='p_header',
+ defaults={if_true={vi=N_("%<%f%h%m%=Page %N")}}
+ },
+ {
+ full_name='printmbcharset', abbreviation='pmbcs',
+ type='string', scope={'global'},
+ vi_def=true,
+ varname='p_pmcs',
+ defaults={if_true={vi=""}}
+ },
+ {
+ full_name='printmbfont', abbreviation='pmbfn',
+ type='string', scope={'global'},
+ vi_def=true,
+ varname='p_pmfn',
+ defaults={if_true={vi=""}}
+ },
+ {
+ full_name='printoptions', abbreviation='popt',
+ type='string', list='comma', scope={'global'},
+ deny_duplicates=true,
+ vi_def=true,
+ varname='p_popt',
+ defaults={if_true={vi=""}}
+ },
+ {
+ full_name='prompt',
+ type='bool', scope={'global'},
+ vi_def=true,
+ varname='p_prompt',
+ defaults={if_true={vi=true}}
+ },
+ {
+ full_name='pumheight', abbreviation='ph',
+ type='number', scope={'global'},
+ vi_def=true,
+ varname='p_ph',
+ defaults={if_true={vi=0}}
+ },
+ {
+ full_name='quoteescape', abbreviation='qe',
+ type='string', scope={'buffer'},
+ vi_def=true,
+ alloced=true,
+ varname='p_qe',
+ defaults={if_true={vi="\\"}}
+ },
+ {
+ full_name='readonly', abbreviation='ro',
+ type='bool', scope={'buffer'},
+ noglob=true,
+ vi_def=true,
+ redraw={'statuslines'},
+ varname='p_ro',
+ defaults={if_true={vi=false}}
+ },
+ {
+ full_name='redrawtime', abbreviation='rdt',
+ type='number', scope={'global'},
+ vi_def=true,
+ varname='p_rdt',
+ defaults={if_true={vi=2000}}
+ },
+ {
+ full_name='regexpengine', abbreviation='re',
+ type='number', scope={'global'},
+ vi_def=true,
+ varname='p_re',
+ defaults={if_true={vi=0}}
+ },
+ {
+ full_name='relativenumber', abbreviation='rnu',
+ type='bool', scope={'window'},
+ vi_def=true,
+ redraw={'current_window'},
+ defaults={if_true={vi=false}}
+ },
+ {
+ full_name='remap',
+ type='bool', scope={'global'},
+ vi_def=true,
+ varname='p_remap',
+ defaults={if_true={vi=true}}
+ },
+ {
+ full_name='report',
+ type='number', scope={'global'},
+ vi_def=true,
+ varname='p_report',
+ defaults={if_true={vi=2}}
+ },
+ {
+ full_name='restorescreen', abbreviation='rs',
+ type='bool', scope={'global'},
+ vi_def=true,
+ enable_if=false,
+ defaults={if_true={vi=true}}
+ },
+ {
+ full_name='revins', abbreviation='ri',
+ type='bool', scope={'global'},
+ vi_def=true,
+ vim=true,
+ varname='p_ri',
+ defaults={if_true={vi=false}}
+ },
+ {
+ full_name='rightleft', abbreviation='rl',
+ type='bool', scope={'window'},
+ vi_def=true,
+ redraw={'current_window'},
+ defaults={if_true={vi=false}}
+ },
+ {
+ full_name='rightleftcmd', abbreviation='rlc',
+ type='string', scope={'window'},
+ vi_def=true,
+ alloced=true,
+ redraw={'current_window'},
+ defaults={if_true={vi="search"}}
+ },
+ {
+ full_name='ruler', abbreviation='ru',
+ type='bool', scope={'global'},
+ vi_def=true,
+ vim=true,
+ redraw={'statuslines'},
+ varname='p_ru',
+ defaults={if_true={vi=false}}
+ },
+ {
+ full_name='rulerformat', abbreviation='ruf',
+ type='string', scope={'global'},
+ vi_def=true,
+ alloced=true,
+ redraw={'statuslines'},
+ varname='p_ruf',
+ defaults={if_true={vi=""}}
+ },
+ {
+ full_name='runtimepath', abbreviation='rtp',
+ type='string', list='comma', scope={'global'},
+ deny_duplicates=true,
+ secure=true,
+ vi_def=true,
+ expand=true,
+ varname='p_rtp',
+ defaults={if_true={vi=macros('DFLT_RUNTIMEPATH')}}
+ },
+ {
+ full_name='scroll', abbreviation='scr',
+ type='number', scope={'window'},
+ no_mkrc=true,
+ vi_def=true,
+ pv_name='p_scroll',
+ defaults={if_true={vi=12}}
+ },
+ {
+ full_name='scrollbind', abbreviation='scb',
+ type='bool', scope={'window'},
+ vi_def=true,
+ pv_name='p_scbind',
+ defaults={if_true={vi=false}}
+ },
+ {
+ full_name='scrolljump', abbreviation='sj',
+ type='number', scope={'global'},
+ vi_def=true,
+ vim=true,
+ varname='p_sj',
+ defaults={if_true={vi=1}}
+ },
+ {
+ full_name='scrolloff', abbreviation='so',
+ type='number', scope={'global'},
+ vi_def=true,
+ vim=true,
+ redraw={'all_windows'},
+ varname='p_so',
+ defaults={if_true={vi=0}}
+ },
+ {
+ full_name='scrollopt', abbreviation='sbo',
+ type='string', list='comma', scope={'global'},
+ deny_duplicates=true,
+ vi_def=true,
+ varname='p_sbo',
+ defaults={if_true={vi="ver,jump"}}
+ },
+ {
+ full_name='sections', abbreviation='sect',
+ type='string', scope={'global'},
+ vi_def=true,
+ varname='p_sections',
+ defaults={if_true={vi="SHNHH HUnhsh"}}
+ },
+ {
+ full_name='secure',
+ type='bool', scope={'global'},
+ secure=true,
+ vi_def=true,
+ varname='p_secure',
+ defaults={if_true={vi=false}}
+ },
+ {
+ full_name='selection', abbreviation='sel',
+ type='string', scope={'global'},
+ vi_def=true,
+ varname='p_sel',
+ defaults={if_true={vi="inclusive"}}
+ },
+ {
+ full_name='selectmode', abbreviation='slm',
+ type='string', list='comma', scope={'global'},
+ deny_duplicates=true,
+ vi_def=true,
+ varname='p_slm',
+ defaults={if_true={vi=""}}
+ },
+ {
+ full_name='sessionoptions', abbreviation='ssop',
+ type='string', list='comma', scope={'global'},
+ deny_duplicates=true,
+ vim=true,
+ varname='p_ssop',
+ defaults={if_true={
+ vi="blank,buffers,curdir,folds,help,options,tabpages,winsize",
+ vim="blank,buffers,curdir,folds,help,tabpages,winsize"
+ }}
+ },
+ {
+ full_name='shell', abbreviation='sh',
+ type='string', scope={'global'},
+ secure=true,
+ vi_def=true,
+ expand=true,
+ varname='p_sh',
+ defaults={if_true={vi="sh"}}
+ },
+ {
+ full_name='shellcmdflag', abbreviation='shcf',
+ type='string', scope={'global'},
+ secure=true,
+ vi_def=true,
+ varname='p_shcf',
+ defaults={if_true={vi="-c"}}
+ },
+ {
+ full_name='shellpipe', abbreviation='sp',
+ type='string', scope={'global'},
+ secure=true,
+ vi_def=true,
+ varname='p_sp',
+ defaults={
+ condition='UNIX',
+ if_true={vi="| tee"},
+ if_false={vi=">"},
+ }
+ },
+ {
+ full_name='shellquote', abbreviation='shq',
+ type='string', scope={'global'},
+ secure=true,
+ vi_def=true,
+ varname='p_shq',
+ defaults={if_true={vi=""}}
+ },
+ {
+ full_name='shellredir', abbreviation='srr',
+ type='string', scope={'global'},
+ secure=true,
+ vi_def=true,
+ varname='p_srr',
+ defaults={if_true={vi=">"}}
+ },
+ {
+ full_name='shellslash', abbreviation='ssl',
+ type='bool', scope={'global'},
+ vi_def=true,
+ varname='p_ssl',
+ enable_if='BACKSLASH_IN_FILENAME',
+ defaults={if_true={vi=false}}
+ },
+ {
+ full_name='shelltemp', abbreviation='stmp',
+ type='bool', scope={'global'},
+ varname='p_stmp',
+ defaults={if_true={vi=false, vim=true}}
+ },
+ {
+ full_name='shellxquote', abbreviation='sxq',
+ type='string', scope={'global'},
+ secure=true,
+ vi_def=true,
+ varname='p_sxq',
+ defaults={if_true={vi=""}}
+ },
+ {
+ full_name='shellxescape', abbreviation='sxe',
+ type='string', scope={'global'},
+ secure=true,
+ vi_def=true,
+ varname='p_sxe',
+ defaults={if_true={vi=""}}
+ },
+ {
+ full_name='shiftround', abbreviation='sr',
+ type='bool', scope={'global'},
+ vi_def=true,
+ vim=true,
+ varname='p_sr',
+ defaults={if_true={vi=false}}
+ },
+ {
+ full_name='shiftwidth', abbreviation='sw',
+ type='number', scope={'buffer'},
+ vi_def=true,
+ varname='p_sw',
+ defaults={if_true={vi=8}}
+ },
+ {
+ full_name='shortmess', abbreviation='shm',
+ type='string', list='flags', scope={'global'},
+ vim=true,
+ varname='p_shm',
+ defaults={if_true={vi="", vim="filnxtToO"}}
+ },
+ {
+ full_name='showbreak', abbreviation='sbr',
+ type='string', scope={'global'},
+ vi_def=true,
+ redraw={'all_windows'},
+ varname='p_sbr',
+ defaults={if_true={vi=""}}
+ },
+ {
+ full_name='showcmd', abbreviation='sc',
+ type='bool', scope={'global'},
+ vim=true,
+ varname='p_sc',
+ defaults={
+ condition='UNIX',
+ if_true={vi=false, vim=false},
+ if_false={vi=false, vim=true},
+ }
+ },
+ {
+ full_name='showfulltag', abbreviation='sft',
+ type='bool', scope={'global'},
+ vi_def=true,
+ varname='p_sft',
+ defaults={if_true={vi=false}}
+ },
+ {
+ full_name='showmatch', abbreviation='sm',
+ type='bool', scope={'global'},
+ vi_def=true,
+ varname='p_sm',
+ defaults={if_true={vi=false}}
+ },
+ {
+ full_name='showmode', abbreviation='smd',
+ type='bool', scope={'global'},
+ vim=true,
+ varname='p_smd',
+ defaults={if_true={vi=false, vim=true}}
+ },
+ {
+ full_name='showtabline', abbreviation='stal',
+ type='number', scope={'global'},
+ vi_def=true,
+ redraw={'all_windows'},
+ varname='p_stal',
+ defaults={if_true={vi=1}}
+ },
+ {
+ full_name='sidescroll', abbreviation='ss',
+ type='number', scope={'global'},
+ vi_def=true,
+ varname='p_ss',
+ defaults={if_true={vi=0}}
+ },
+ {
+ full_name='sidescrolloff', abbreviation='siso',
+ type='number', scope={'global'},
+ vi_def=true,
+ vim=true,
+ redraw={'current_buffer'},
+ varname='p_siso',
+ defaults={if_true={vi=0}}
+ },
+ {
+ full_name='smartcase', abbreviation='scs',
+ type='bool', scope={'global'},
+ vi_def=true,
+ vim=true,
+ varname='p_scs',
+ defaults={if_true={vi=false}}
+ },
+ {
+ full_name='smartindent', abbreviation='si',
+ type='bool', scope={'buffer'},
+ vi_def=true,
+ vim=true,
+ varname='p_si',
+ defaults={if_true={vi=false}}
+ },
+ {
+ full_name='smarttab', abbreviation='sta',
+ type='bool', scope={'global'},
+ vim=true,
+ varname='p_sta',
+ defaults={if_true={vi=false, vim=true}}
+ },
+ {
+ full_name='softtabstop', abbreviation='sts',
+ type='number', scope={'buffer'},
+ vi_def=true,
+ vim=true,
+ varname='p_sts',
+ defaults={if_true={vi=0}}
+ },
+ {
+ full_name='spell',
+ type='bool', scope={'window'},
+ vi_def=true,
+ redraw={'current_window'},
+ defaults={if_true={vi=false}}
+ },
+ {
+ full_name='spellcapcheck', abbreviation='spc',
+ type='string', scope={'buffer'},
+ vi_def=true,
+ alloced=true,
+ redraw={'current_buffer'},
+ varname='p_spc',
+ defaults={if_true={vi="[.?!]\\_[\\])'\" ]\\+"}}
+ },
+ {
+ full_name='spellfile', abbreviation='spf',
+ type='string', list='comma', scope={'buffer'},
+ secure=true,
+ vi_def=true,
+ alloced=true,
+ expand=true,
+ varname='p_spf',
+ defaults={if_true={vi=""}}
+ },
+ {
+ full_name='spelllang', abbreviation='spl',
+ type='string', list='comma', scope={'buffer'},
+ vi_def=true,
+ alloced=true,
+ expand=true,
+ redraw={'current_buffer'},
+ varname='p_spl',
+ defaults={if_true={vi="en"}}
+ },
+ {
+ full_name='spellsuggest', abbreviation='sps',
+ type='string', list='comma', scope={'global'},
+ secure=true,
+ vi_def=true,
+ expand=true,
+ varname='p_sps',
+ defaults={if_true={vi="best"}}
+ },
+ {
+ full_name='splitbelow', abbreviation='sb',
+ type='bool', scope={'global'},
+ vi_def=true,
+ varname='p_sb',
+ defaults={if_true={vi=false}}
+ },
+ {
+ full_name='splitright', abbreviation='spr',
+ type='bool', scope={'global'},
+ vi_def=true,
+ varname='p_spr',
+ defaults={if_true={vi=false}}
+ },
+ {
+ full_name='startofline', abbreviation='sol',
+ type='bool', scope={'global'},
+ vi_def=true,
+ vim=true,
+ varname='p_sol',
+ defaults={if_true={vi=true}}
+ },
+ {
+ full_name='statusline', abbreviation='stl',
+ type='string', scope={'global', 'window'},
+ vi_def=true,
+ alloced=true,
+ redraw={'statuslines'},
+ varname='p_stl',
+ defaults={if_true={vi=""}}
+ },
+ {
+ full_name='suffixes', abbreviation='su',
+ type='string', list='comma', scope={'global'},
+ deny_duplicates=true,
+ vi_def=true,
+ varname='p_su',
+ defaults={if_true={vi=".bak,~,.o,.h,.info,.swp,.obj"}}
+ },
+ {
+ full_name='suffixesadd', abbreviation='sua',
+ type='string', list='comma', scope={'buffer'},
+ deny_duplicates=true,
+ vi_def=true,
+ alloced=true,
+ varname='p_sua',
+ defaults={if_true={vi=""}}
+ },
+ {
+ full_name='swapfile', abbreviation='swf',
+ type='bool', scope={'buffer'},
+ vi_def=true,
+ redraw={'statuslines'},
+ varname='p_swf',
+ defaults={if_true={vi=true}}
+ },
+ {
+ full_name='swapsync', abbreviation='sws',
+ type='string', scope={'global'},
+ vi_def=true,
+ varname='p_sws',
+ defaults={if_true={vi="fsync"}}
+ },
+ {
+ full_name='switchbuf', abbreviation='swb',
+ type='string', list='comma', scope={'global'},
+ deny_duplicates=true,
+ vi_def=true,
+ varname='p_swb',
+ defaults={if_true={vi=""}}
+ },
+ {
+ full_name='synmaxcol', abbreviation='smc',
+ type='number', scope={'buffer'},
+ vi_def=true,
+ redraw={'current_buffer'},
+ varname='p_smc',
+ defaults={if_true={vi=3000}}
+ },
+ {
+ full_name='syntax', abbreviation='syn',
+ type='string', scope={'buffer'},
+ noglob=true,
+ normal_fname_chars=true,
+ vi_def=true,
+ alloced=true,
+ varname='p_syn',
+ defaults={if_true={vi=""}}
+ },
+ {
+ full_name='tabline', abbreviation='tal',
+ type='string', scope={'global'},
+ vi_def=true,
+ redraw={'all_windows'},
+ varname='p_tal',
+ defaults={if_true={vi=""}}
+ },
+ {
+ full_name='tabpagemax', abbreviation='tpm',
+ type='number', scope={'global'},
+ vim=true,
+ varname='p_tpm',
+ defaults={if_true={vi=10, vim=50}}
+ },
+ {
+ full_name='tabstop', abbreviation='ts',
+ type='number', scope={'buffer'},
+ vi_def=true,
+ redraw={'current_buffer'},
+ varname='p_ts',
+ defaults={if_true={vi=8}}
+ },
+ {
+ full_name='tagbsearch', abbreviation='tbs',
+ type='bool', scope={'global'},
+ vi_def=true,
+ varname='p_tbs',
+ defaults={if_true={vi=true}}
+ },
+ {
+ full_name='taglength', abbreviation='tl',
+ type='number', scope={'global'},
+ vi_def=true,
+ varname='p_tl',
+ defaults={if_true={vi=0}}
+ },
+ {
+ full_name='tagrelative', abbreviation='tr',
+ type='bool', scope={'global'},
+ vim=true,
+ varname='p_tr',
+ defaults={if_true={vi=false, vim=true}}
+ },
+ {
+ full_name='tags', abbreviation='tag',
+ type='string', list='comma', scope={'global', 'buffer'},
+ deny_duplicates=true,
+ vi_def=true,
+ expand=true,
+ varname='p_tags',
+ defaults={if_true={vi="./tags;,tags"}}
+ },
+ {
+ full_name='tagstack', abbreviation='tgst',
+ type='bool', scope={'global'},
+ vi_def=true,
+ varname='p_tgst',
+ defaults={if_true={vi=true}}
+ },
+ {
+ full_name='termbidi', abbreviation='tbidi',
+ type='bool', scope={'global'},
+ vi_def=true,
+ varname='p_tbidi',
+ defaults={if_true={vi=false}}
+ },
+ {
+ full_name='termencoding', abbreviation='tenc',
+ type='string', scope={'global'},
+ vi_def=true,
+ redraw={'everything'},
+ defaults={if_true={vi=""}}
+ },
+ {
+ full_name='terse',
+ type='bool', scope={'global'},
+ vi_def=true,
+ varname='p_terse',
+ defaults={if_true={vi=false}}
+ },
+ {
+ full_name='textwidth', abbreviation='tw',
+ type='number', scope={'buffer'},
+ vi_def=true,
+ vim=true,
+ redraw={'current_buffer'},
+ varname='p_tw',
+ defaults={if_true={vi=0}}
+ },
+ {
+ full_name='thesaurus', abbreviation='tsr',
+ type='string', list='comma', scope={'global', 'buffer'},
+ deny_duplicates=true,
+ vi_def=true,
+ expand=true,
+ varname='p_tsr',
+ defaults={if_true={vi=""}}
+ },
+ {
+ full_name='tildeop', abbreviation='top',
+ type='bool', scope={'global'},
+ vi_def=true,
+ vim=true,
+ varname='p_to',
+ defaults={if_true={vi=false}}
+ },
+ {
+ full_name='timeout', abbreviation='to',
+ type='bool', scope={'global'},
+ vi_def=true,
+ varname='p_timeout',
+ defaults={if_true={vi=true}}
+ },
+ {
+ full_name='timeoutlen', abbreviation='tm',
+ type='number', scope={'global'},
+ vi_def=true,
+ varname='p_tm',
+ defaults={if_true={vi=1000}}
+ },
+ {
+ full_name='title',
+ type='bool', scope={'global'},
+ vi_def=true,
+ varname='p_title',
+ defaults={if_true={vi=false}}
+ },
+ {
+ full_name='titlelen',
+ type='number', scope={'global'},
+ vi_def=true,
+ varname='p_titlelen',
+ defaults={if_true={vi=85}}
+ },
+ {
+ full_name='titleold',
+ type='string', scope={'global'},
+ secure=true,
+ gettext=true,
+ no_mkrc=true,
+ vi_def=true,
+ varname='p_titleold',
+ defaults={if_true={vi=N_("Thanks for flying Vim")}}
+ },
+ {
+ full_name='titlestring',
+ type='string', scope={'global'},
+ vi_def=true,
+ varname='p_titlestring',
+ defaults={if_true={vi=""}}
+ },
+ {
+ full_name='ttimeout',
+ type='bool', scope={'global'},
+ vi_def=true,
+ vim=true,
+ varname='p_ttimeout',
+ defaults={if_true={vi=false}}
+ },
+ {
+ full_name='ttimeoutlen', abbreviation='ttm',
+ type='number', scope={'global'},
+ vi_def=true,
+ varname='p_ttm',
+ defaults={if_true={vi=-1}}
+ },
+ {
+ full_name='ttyfast', abbreviation='tf',
+ type='bool', scope={'global'},
+ no_mkrc=true,
+ vi_def=true,
+ varname='p_force_on',
+ defaults={if_true={vi=true}}
+ },
+ {
+ full_name='undodir', abbreviation='udir',
+ type='string', list='comma', scope={'global'},
+ deny_duplicates=true,
+ secure=true,
+ vi_def=true,
+ expand=true,
+ varname='p_udir',
+ defaults={if_true={vi="."}}
+ },
+ {
+ full_name='undofile', abbreviation='udf',
+ type='bool', scope={'buffer'},
+ vi_def=true,
+ vim=true,
+ varname='p_udf',
+ defaults={if_true={vi=false}}
+ },
+ {
+ full_name='undolevels', abbreviation='ul',
+ type='number', scope={'global', 'buffer'},
+ vi_def=true,
+ varname='p_ul',
+ defaults={
+ condition={'!UNIX', '!WIN3264'},
+ if_true={vi=100},
+ if_false={vi=1000},
+ }
+ },
+ {
+ full_name='undoreload', abbreviation='ur',
+ type='number', scope={'global'},
+ vi_def=true,
+ varname='p_ur',
+ defaults={if_true={vi=10000}}
+ },
+ {
+ full_name='updatecount', abbreviation='uc',
+ type='number', scope={'global'},
+ vi_def=true,
+ varname='p_uc',
+ defaults={if_true={vi=200}}
+ },
+ {
+ full_name='updatetime', abbreviation='ut',
+ type='number', scope={'global'},
+ vi_def=true,
+ varname='p_ut',
+ defaults={if_true={vi=4000}}
+ },
+ {
+ full_name='verbose', abbreviation='vbs',
+ type='number', scope={'global'},
+ vi_def=true,
+ varname='p_verbose',
+ defaults={if_true={vi=0}}
+ },
+ {
+ full_name='verbosefile', abbreviation='vfile',
+ type='string', scope={'global'},
+ secure=true,
+ vi_def=true,
+ expand=true,
+ varname='p_vfile',
+ defaults={if_true={vi=""}}
+ },
+ {
+ full_name='viewdir', abbreviation='vdir',
+ type='string', scope={'global'},
+ secure=true,
+ vi_def=true,
+ expand=true,
+ varname='p_vdir',
+ defaults={if_true={vi=macros('DFLT_VDIR')}}
+ },
+ {
+ full_name='viewoptions', abbreviation='vop',
+ type='string', list='comma', scope={'global'},
+ deny_duplicates=true,
+ vi_def=true,
+ varname='p_vop',
+ defaults={if_true={vi="folds,options,cursor"}}
+ },
+ {
+ full_name='viminfo', abbreviation='vi',
+ type='string', list='comma', scope={'global'},
+ deny_duplicates=true,
+ secure=true,
+ varname='p_viminfo',
+ defaults={if_true={vi="", vim="!,'100,<50,s10,h"}}
+ },
+ {
+ full_name='virtualedit', abbreviation='ve',
+ type='string', list='comma', scope={'global'},
+ deny_duplicates=true,
+ vi_def=true,
+ vim=true,
+ redraw={'curswant'},
+ varname='p_ve',
+ defaults={if_true={vi="", vim=""}}
+ },
+ {
+ full_name='visualbell', abbreviation='vb',
+ type='bool', scope={'global'},
+ vi_def=true,
+ varname='p_vb',
+ defaults={if_true={vi=false}}
+ },
+ {
+ full_name='warn',
+ type='bool', scope={'global'},
+ vi_def=true,
+ varname='p_warn',
+ defaults={if_true={vi=true}}
+ },
+ {
+ full_name='whichwrap', abbreviation='ww',
+ type='string', list='flagscomma', scope={'global'},
+ vim=true,
+ varname='p_ww',
+ defaults={if_true={vi="", vim="b,s"}}
+ },
+ {
+ full_name='wildchar', abbreviation='wc',
+ type='number', scope={'global'},
+ vim=true,
+ varname='p_wc',
+ defaults={if_true={vi=macros('Ctrl_E'), vim=macros('TAB')}}
+ },
+ {
+ full_name='wildcharm', abbreviation='wcm',
+ type='number', scope={'global'},
+ vi_def=true,
+ varname='p_wcm',
+ defaults={if_true={vi=0}}
+ },
+ {
+ full_name='wildignore', abbreviation='wig',
+ type='string', list='comma', scope={'global'},
+ deny_duplicates=true,
+ vi_def=true,
+ varname='p_wig',
+ defaults={if_true={vi=""}}
+ },
+ {
+ full_name='wildignorecase', abbreviation='wic',
+ type='bool', scope={'global'},
+ vi_def=true,
+ varname='p_wic',
+ defaults={if_true={vi=false}}
+ },
+ {
+ full_name='wildmenu', abbreviation='wmnu',
+ type='bool', scope={'global'},
+ vim=true,
+ varname='p_wmnu',
+ defaults={if_true={vi=false, vim=true}}
+ },
+ {
+ full_name='wildmode', abbreviation='wim',
+ type='string', list='comma', scope={'global'},
+ deny_duplicates=true,
+ vim=true,
+ varname='p_wim',
+ defaults={if_true={vi="", vim="list:longest,full"}}
+ },
+ {
+ full_name='wildoptions', abbreviation='wop',
+ type='string', scope={'global'},
+ vi_def=true,
+ varname='p_wop',
+ defaults={if_true={vi=""}}
+ },
+ {
+ full_name='winaltkeys', abbreviation='wak',
+ type='string', scope={'global'},
+ vi_def=true,
+ varname='p_wak',
+ defaults={if_true={vi="menu"}}
+ },
+ {
+ full_name='window', abbreviation='wi',
+ type='number', scope={'global'},
+ vi_def=true,
+ varname='p_window',
+ defaults={if_true={vi=0}}
+ },
+ {
+ full_name='winheight', abbreviation='wh',
+ type='number', scope={'global'},
+ vi_def=true,
+ varname='p_wh',
+ defaults={if_true={vi=1}}
+ },
+ {
+ full_name='winfixheight', abbreviation='wfh',
+ type='bool', scope={'window'},
+ vi_def=true,
+ redraw={'statuslines'},
+ defaults={if_true={vi=false}}
+ },
+ {
+ full_name='winfixwidth', abbreviation='wfw',
+ type='bool', scope={'window'},
+ vi_def=true,
+ redraw={'statuslines'},
+ defaults={if_true={vi=false}}
+ },
+ {
+ full_name='winminheight', abbreviation='wmh',
+ type='number', scope={'global'},
+ vi_def=true,
+ varname='p_wmh',
+ defaults={if_true={vi=1}}
+ },
+ {
+ full_name='winminwidth', abbreviation='wmw',
+ type='number', scope={'global'},
+ vi_def=true,
+ varname='p_wmw',
+ defaults={if_true={vi=1}}
+ },
+ {
+ full_name='winwidth', abbreviation='wiw',
+ type='number', scope={'global'},
+ vi_def=true,
+ varname='p_wiw',
+ defaults={if_true={vi=20}}
+ },
+ {
+ full_name='wrap',
+ type='bool', scope={'window'},
+ vi_def=true,
+ redraw={'current_window'},
+ defaults={if_true={vi=true}}
+ },
+ {
+ full_name='wrapmargin', abbreviation='wm',
+ type='number', scope={'buffer'},
+ vi_def=true,
+ varname='p_wm',
+ defaults={if_true={vi=0}}
+ },
+ {
+ full_name='wrapscan', abbreviation='ws',
+ type='bool', scope={'global'},
+ vi_def=true,
+ varname='p_ws',
+ defaults={if_true={vi=true}}
+ },
+ {
+ full_name='write',
+ type='bool', scope={'global'},
+ vi_def=true,
+ varname='p_write',
+ defaults={if_true={vi=true}}
+ },
+ {
+ full_name='writeany', abbreviation='wa',
+ type='bool', scope={'global'},
+ vi_def=true,
+ varname='p_wa',
+ defaults={if_true={vi=false}}
+ },
+ {
+ full_name='writebackup', abbreviation='wb',
+ type='bool', scope={'global'},
+ vi_def=true,
+ vim=true,
+ varname='p_wb',
+ defaults={if_true={vi=true}}
+ },
+ {
+ full_name='writedelay', abbreviation='wd',
+ type='number', scope={'global'},
+ vi_def=true,
+ varname='p_wd',
+ defaults={if_true={vi=0}}
+ },
+ }
+}
diff --git a/src/nvim/os/fs.c b/src/nvim/os/fs.c
index 553dda5e88..5eeb275701 100644
--- a/src/nvim/os/fs.c
+++ b/src/nvim/os/fs.c
@@ -316,7 +316,7 @@ int os_rename(const char_u *path, const char_u *new_path)
/// Make a directory.
///
-/// @return `0` for success, non-zero for failure.
+/// @return `0` for success, -errno for failure.
int os_mkdir(const char *path, int32_t mode)
FUNC_ATTR_NONNULL_ALL
{
@@ -326,6 +326,54 @@ int os_mkdir(const char *path, int32_t mode)
return result;
}
+/// Make a directory, with higher levels when needed
+///
+/// @param[in] dir Directory to create.
+/// @param[in] mode Permissions for the newly-created directory.
+/// @param[out] failed_dir If it failed to create directory, then this
+/// argument is set to an allocated string containing
+/// the name of the directory which os_mkdir_recurse
+/// failed to create. I.e. it will contain dir or any
+/// of the higher level directories.
+///
+/// @return `0` for success, -errno for failure.
+int os_mkdir_recurse(const char *const dir, int32_t mode,
+ char **const failed_dir)
+ FUNC_ATTR_NONNULL_ALL FUNC_ATTR_WARN_UNUSED_RESULT
+{
+ // Get end of directory name in "dir".
+ // We're done when it's "/" or "c:/".
+ const size_t dirlen = strlen(dir);
+ char *const curdir = xmemdupz(dir, dirlen);
+ char *const past_head = (char *) get_past_head((char_u *) curdir);
+ char *e = curdir + dirlen;
+ const char *const real_end = e;
+ const char past_head_save = *past_head;
+ while (!os_isdir((char_u *) curdir)) {
+ e = (char *) path_tail_with_sep((char_u *) curdir);
+ if (e <= past_head) {
+ *past_head = NUL;
+ break;
+ }
+ *e = NUL;
+ }
+ while (e != real_end) {
+ if (e > past_head) {
+ *e = '/';
+ } else {
+ *past_head = past_head_save;
+ }
+ e += strlen(e);
+ int ret;
+ if ((ret = os_mkdir(curdir, mode)) != 0) {
+ *failed_dir = curdir;
+ return ret;
+ }
+ }
+ xfree(curdir);
+ return 0;
+}
+
/// Create a unique temporary directory.
///
/// @param[in] template Template of the path to the directory with XXXXXX
diff --git a/src/nvim/os/os_defs.h b/src/nvim/os/os_defs.h
index 0e7632a79d..1d16111066 100644
--- a/src/nvim/os/os_defs.h
+++ b/src/nvim/os/os_defs.h
@@ -135,4 +135,9 @@
// For dup(3).
#define HAVE_DUP
+/// Function to convert -errno error to char * error description
+///
+/// -errno errors are returned by a number of os functions.
+#define os_strerror uv_strerror
+
#endif // NVIM_OS_OS_DEFS_H
diff --git a/src/nvim/path.c b/src/nvim/path.c
index 152154e5f4..72980fcd0e 100644
--- a/src/nvim/path.c
+++ b/src/nvim/path.c
@@ -481,6 +481,21 @@ static size_t path_expand(garray_T *gap, const char_u *path, int flags)
return do_path_expand(gap, path, 0, flags, false);
}
+static const char *scandir_next_with_dots(Directory *dir)
+{
+ static int count = 0;
+ if (dir == NULL) { // initialize
+ count = 0;
+ return NULL;
+ }
+
+ count += 1;
+ if (count == 1 || count == 2) {
+ return (count == 1) ? "." : "..";
+ }
+ return os_scandir_next(dir);
+}
+
/// Implementation of path_expand().
///
/// Chars before `path + wildoff` do not get expanded.
@@ -597,11 +612,12 @@ static size_t do_path_expand(garray_T *gap, const char_u *path,
*s = NUL;
Directory dir;
- // open the directory for scanning
- if (os_scandir(&dir, *buf == NUL ? "." : (char *)buf)) {
+ if (os_scandir(&dir, *buf == NUL ? "." : (char *)buf)
+ || os_isdir(*buf == NUL ? (char_u *)"." : (char_u *)buf)) {
// Find all matching entries.
char_u *name;
- while((name = (char_u *) os_scandir_next(&dir))) {
+ scandir_next_with_dots(NULL /* initialize */);
+ while((name = (char_u *) scandir_next_with_dots(&dir)) && name != NULL) {
if ((name[0] != '.' || starts_with_dot)
&& ((regmatch.regprog != NULL && vim_regexec(&regmatch, name, 0))
|| ((flags & EW_NOTWILD)
diff --git a/src/nvim/regexp.c b/src/nvim/regexp.c
index 3ae3f46db3..4724a07895 100644
--- a/src/nvim/regexp.c
+++ b/src/nvim/regexp.c
@@ -1120,12 +1120,10 @@ static int get_coll_element(char_u **pp)
}
static int reg_cpo_lit; /* 'cpoptions' contains 'l' flag */
-static int reg_cpo_bsl; /* 'cpoptions' contains '\' flag */
static void get_cpo_flags(void)
{
reg_cpo_lit = vim_strchr(p_cpo, CPO_LITERAL) != NULL;
- reg_cpo_bsl = vim_strchr(p_cpo, CPO_BACKSL) != NULL;
}
/*
@@ -1149,7 +1147,6 @@ static char_u *skip_anyof(char_u *p)
if (*p != ']' && *p != NUL)
mb_ptr_adv(p);
} else if (*p == '\\'
- && !reg_cpo_bsl
&& (vim_strchr(REGEXP_INRANGE, p[1]) != NULL
|| (!reg_cpo_lit && vim_strchr(REGEXP_ABBR, p[1]) != NULL)))
p += 2;
@@ -2222,7 +2219,7 @@ collection:
}
/* Handle \o40, \x20 and \u20AC style sequences */
- if (endc == '\\' && !reg_cpo_lit && !reg_cpo_bsl)
+ if (endc == '\\' && !reg_cpo_lit)
endc = coll_get_char();
if (startc > endc)
@@ -2245,10 +2242,8 @@ collection:
* Only "\]", "\^", "\]" and "\\" are special in Vi. Vim
* accepts "\t", "\e", etc., but only when the 'l' flag in
* 'cpoptions' is not included.
- * Posix doesn't recognize backslash at all.
*/
else if (*regparse == '\\'
- && !reg_cpo_bsl
&& (vim_strchr(REGEXP_INRANGE, regparse[1]) != NULL
|| (!reg_cpo_lit
&& vim_strchr(REGEXP_ABBR,
diff --git a/src/nvim/regexp_nfa.c b/src/nvim/regexp_nfa.c
index d9dc09b623..227737e7ff 100644
--- a/src/nvim/regexp_nfa.c
+++ b/src/nvim/regexp_nfa.c
@@ -270,8 +270,10 @@ typedef struct {
/* When REG_MULTI is TRUE list.multi is used, otherwise list.line. */
union {
struct multipos {
- lpos_T start;
- lpos_T end;
+ linenr_T start_lnum;
+ linenr_T end_lnum;
+ colnr_T start_col;
+ colnr_T end_col;
} multi[NSUBEXP];
struct linepos {
char_u *start;
@@ -1391,7 +1393,7 @@ static int nfa_regatom(void)
* matched an unlimited number of times. NFA_NOPEN is
* added only once at a position, while NFA_SPLIT is
* added multiple times. This is more efficient than
- * not allowsing NFA_SPLIT multiple times, it is used
+ * not allowing NFA_SPLIT multiple times, it is used
* a lot. */
EMIT(NFA_NOPEN);
break;
@@ -1584,10 +1586,8 @@ collection:
* Only "\]", "\^", "\]" and "\\" are special in Vi. Vim
* accepts "\t", "\e", etc., but only when the 'l' flag in
* 'cpoptions' is not included.
- * Posix doesn't recognize backslash at all.
*/
if (*regparse == '\\'
- && !reg_cpo_bsl
&& regparse + 1 <= endp
&& (vim_strchr(REGEXP_INRANGE, regparse[1]) != NULL
|| (!reg_cpo_lit
@@ -3433,10 +3433,10 @@ static void log_subexpr(regsub_T *sub)
if (REG_MULTI)
fprintf(log_fd, "*** group %d, start: c=%d, l=%d, end: c=%d, l=%d\n",
j,
- sub->list.multi[j].start.col,
- (int)sub->list.multi[j].start.lnum,
- sub->list.multi[j].end.col,
- (int)sub->list.multi[j].end.lnum);
+ sub->list.multi[j].start_col,
+ (int)sub->list.multi[j].start_lnum,
+ sub->list.multi[j].end_col,
+ (int)sub->list.multi[j].end_lnum);
else {
char *s = (char *)sub->list.line[j].start;
char *e = (char *)sub->list.line[j].end;
@@ -3537,8 +3537,10 @@ static void copy_ze_off(regsub_T *to, regsub_T *from)
{
if (nfa_has_zend) {
if (REG_MULTI) {
- if (from->list.multi[0].end.lnum >= 0)
- to->list.multi[0].end = from->list.multi[0].end;
+ if (from->list.multi[0].end_lnum >= 0){
+ to->list.multi[0].end_lnum = from->list.multi[0].end_lnum;
+ to->list.multi[0].end_col = from->list.multi[0].end_col;
+ }
} else {
if (from->list.line[0].end != NULL)
to->list.line[0].end = from->list.line[0].end;
@@ -3561,27 +3563,27 @@ static int sub_equal(regsub_T *sub1, regsub_T *sub2)
if (REG_MULTI) {
for (i = 0; i < todo; ++i) {
if (i < sub1->in_use)
- s1 = sub1->list.multi[i].start.lnum;
+ s1 = sub1->list.multi[i].start_lnum;
else
s1 = -1;
if (i < sub2->in_use)
- s2 = sub2->list.multi[i].start.lnum;
+ s2 = sub2->list.multi[i].start_lnum;
else
s2 = -1;
if (s1 != s2)
return FALSE;
- if (s1 != -1 && sub1->list.multi[i].start.col
- != sub2->list.multi[i].start.col)
+ if (s1 != -1 && sub1->list.multi[i].start_col
+ != sub2->list.multi[i].start_col)
return FALSE;
if (nfa_has_backref) {
if (i < sub1->in_use) {
- s1 = sub1->list.multi[i].end.lnum;
+ s1 = sub1->list.multi[i].end_lnum;
} else {
s1 = -1;
}
if (i < sub2->in_use) {
- s2 = sub2->list.multi[i].end.lnum;
+ s2 = sub2->list.multi[i].end_lnum;
} else {
s2 = -1;
}
@@ -3589,7 +3591,7 @@ static int sub_equal(regsub_T *sub1, regsub_T *sub2)
return FALSE;
}
if (s1 != -1
- && sub1->list.multi[i].end.col != sub2->list.multi[i].end.col) {
+ && sub1->list.multi[i].end_col != sub2->list.multi[i].end_col) {
return FALSE;
}
}
@@ -3639,7 +3641,7 @@ static void report_state(char *action,
if (sub->in_use <= 0)
col = -1;
else if (REG_MULTI)
- col = sub->list.multi[0].start.col;
+ col = sub->list.multi[0].start_col;
else
col = (int)(sub->list.line[0].start - regline);
nfa_set_code(state->c);
@@ -4025,22 +4027,24 @@ skip_add:
* and restore it when it was in use. Otherwise fill any gap. */
if (REG_MULTI) {
if (subidx < sub->in_use) {
- save_lpos = sub->list.multi[subidx].start;
+ save_lpos.lnum = sub->list.multi[subidx].start_lnum;
+ save_lpos.col = sub->list.multi[subidx].start_col;
save_in_use = -1;
} else {
save_in_use = sub->in_use;
for (i = sub->in_use; i < subidx; ++i) {
- sub->list.multi[i].start.lnum = -1;
- sub->list.multi[i].end.lnum = -1;
+ sub->list.multi[i].start_lnum = -1;
+ sub->list.multi[i].end_lnum = -1;
}
sub->in_use = subidx + 1;
}
if (off == -1) {
- sub->list.multi[subidx].start.lnum = reglnum + 1;
- sub->list.multi[subidx].start.col = 0;
+ sub->list.multi[subidx].start_lnum = reglnum + 1;
+ sub->list.multi[subidx].start_col = 0;
} else {
- sub->list.multi[subidx].start.lnum = reglnum;
- sub->list.multi[subidx].start.col =
+
+ sub->list.multi[subidx].start_lnum = reglnum;
+ sub->list.multi[subidx].start_col =
(colnr_T)(reginput - regline + off);
}
} else {
@@ -4066,8 +4070,10 @@ skip_add:
sub = &subs->norm;
if (save_in_use == -1) {
- if (REG_MULTI)
- sub->list.multi[subidx].start = save_lpos;
+ if (REG_MULTI){
+ sub->list.multi[subidx].start_lnum = save_lpos.lnum;
+ sub->list.multi[subidx].start_col = save_lpos.col;
+ }
else
sub->list.line[subidx].start = save_ptr;
} else
@@ -4076,7 +4082,7 @@ skip_add:
case NFA_MCLOSE:
if (nfa_has_zend && (REG_MULTI
- ? subs->norm.list.multi[0].end.lnum >= 0
+ ? subs->norm.list.multi[0].end_lnum >= 0
: subs->norm.list.line[0].end != NULL)) {
/* Do not overwrite the position set by \ze. */
subs = addstate(l, state->out, subs, pim, off);
@@ -4119,13 +4125,14 @@ skip_add:
if (sub->in_use <= subidx)
sub->in_use = subidx + 1;
if (REG_MULTI) {
- save_lpos = sub->list.multi[subidx].end;
+ save_lpos.lnum = sub->list.multi[subidx].end_lnum;
+ save_lpos.col = sub->list.multi[subidx].end_col;
if (off == -1) {
- sub->list.multi[subidx].end.lnum = reglnum + 1;
- sub->list.multi[subidx].end.col = 0;
+ sub->list.multi[subidx].end_lnum = reglnum + 1;
+ sub->list.multi[subidx].end_col = 0;
} else {
- sub->list.multi[subidx].end.lnum = reglnum;
- sub->list.multi[subidx].end.col =
+ sub->list.multi[subidx].end_lnum = reglnum;
+ sub->list.multi[subidx].end_col =
(colnr_T)(reginput - regline + off);
}
/* avoid compiler warnings */
@@ -4145,8 +4152,10 @@ skip_add:
else
sub = &subs->norm;
- if (REG_MULTI)
- sub->list.multi[subidx].end = save_lpos;
+ if (REG_MULTI){
+ sub->list.multi[subidx].end_lnum = save_lpos.lnum;
+ sub->list.multi[subidx].end_col = save_lpos.col;
+ }
else
sub->list.line[subidx].end = save_ptr;
sub->in_use = save_in_use;
@@ -4321,24 +4330,24 @@ retempty:
}
if (REG_MULTI) {
- if (sub->list.multi[subidx].start.lnum < 0
- || sub->list.multi[subidx].end.lnum < 0)
+ if (sub->list.multi[subidx].start_lnum < 0
+ || sub->list.multi[subidx].end_lnum < 0)
goto retempty;
- if (sub->list.multi[subidx].start.lnum == reglnum
- && sub->list.multi[subidx].end.lnum == reglnum) {
- len = sub->list.multi[subidx].end.col
- - sub->list.multi[subidx].start.col;
- if (cstrncmp(regline + sub->list.multi[subidx].start.col,
+ if (sub->list.multi[subidx].start_lnum == reglnum
+ && sub->list.multi[subidx].end_lnum == reglnum) {
+ len = sub->list.multi[subidx].end_col
+ - sub->list.multi[subidx].start_col;
+ if (cstrncmp(regline + sub->list.multi[subidx].start_col,
reginput, &len) == 0) {
*bytelen = len;
return TRUE;
}
} else {
if (match_with_backref(
- sub->list.multi[subidx].start.lnum,
- sub->list.multi[subidx].start.col,
- sub->list.multi[subidx].end.lnum,
- sub->list.multi[subidx].end.col,
+ sub->list.multi[subidx].start_lnum,
+ sub->list.multi[subidx].start_col,
+ sub->list.multi[subidx].end_lnum,
+ sub->list.multi[subidx].end_col,
bytelen) == RA_MATCH)
return TRUE;
}
@@ -4875,8 +4884,8 @@ static int nfa_regmatch(nfa_regprog_T *prog, nfa_state_T *start, regsubs_T *subm
* it's the first MOPEN. */
if (toplevel) {
if (REG_MULTI) {
- m->norm.list.multi[0].start.lnum = reglnum;
- m->norm.list.multi[0].start.col = (colnr_T)(reginput - regline);
+ m->norm.list.multi[0].start_lnum = reglnum;
+ m->norm.list.multi[0].start_col = (colnr_T)(reginput - regline);
} else
m->norm.list.line[0].start = reginput;
m->norm.in_use = 1;
@@ -4964,7 +4973,7 @@ static int nfa_regmatch(nfa_regprog_T *prog, nfa_state_T *start, regsubs_T *subm
if (t->subs.norm.in_use <= 0)
col = -1;
else if (REG_MULTI)
- col = t->subs.norm.list.multi[0].start.col;
+ col = t->subs.norm.list.multi[0].start_col;
else
col = (int)(t->subs.norm.list.line[0].start - regline);
nfa_set_code(t->state->c);
@@ -5216,7 +5225,7 @@ static int nfa_regmatch(nfa_regprog_T *prog, nfa_state_T *start, regsubs_T *subm
* continue with what follows. */
if (REG_MULTI)
/* TODO: multi-line match */
- bytelen = m->norm.list.multi[0].end.col
+ bytelen = m->norm.list.multi[0].end_col
- (int)(reginput - regline);
else
bytelen = (int)(m->norm.list.line[0].end - reginput);
@@ -6020,7 +6029,7 @@ static int nfa_regmatch(nfa_regprog_T *prog, nfa_state_T *start, regsubs_T *subm
if (add) {
if (REG_MULTI)
- m->norm.list.multi[0].start.col =
+ m->norm.list.multi[0].start_col =
(colnr_T)(reginput - regline) + clen;
else
m->norm.list.line[0].start = reginput + clen;
@@ -6125,8 +6134,11 @@ static long nfa_regtry(nfa_regprog_T *prog, colnr_T col)
cleanup_subexpr();
if (REG_MULTI) {
for (i = 0; i < subs.norm.in_use; i++) {
- reg_startpos[i] = subs.norm.list.multi[i].start;
- reg_endpos[i] = subs.norm.list.multi[i].end;
+ reg_startpos[i].lnum = subs.norm.list.multi[i].start_lnum;
+ reg_startpos[i].col = subs.norm.list.multi[i].start_col;
+
+ reg_endpos[i].lnum = subs.norm.list.multi[i].end_lnum;
+ reg_endpos[i].col = subs.norm.list.multi[i].end_col;
}
if (reg_startpos[0].lnum < 0) {
@@ -6164,12 +6176,12 @@ static long nfa_regtry(nfa_regprog_T *prog, colnr_T col)
struct multipos *mpos = &subs.synt.list.multi[i];
// Only accept single line matches that are valid.
- if (mpos->start.lnum >= 0
- && mpos->start.lnum == mpos->end.lnum
- && mpos->end.col >= mpos->start.col) {
+ if (mpos->start_lnum >= 0
+ && mpos->start_lnum == mpos->end_lnum
+ && mpos->end_col >= mpos->start_col) {
re_extmatch_out->matches[i] =
- vim_strnsave(reg_getline(mpos->start.lnum) + mpos->start.col,
- mpos->end.col - mpos->start.col);
+ vim_strnsave(reg_getline(mpos->start_lnum) + mpos->start_col,
+ mpos->end_col - mpos->start_col);
}
} else {
struct linepos *lpos = &subs.synt.list.line[i];
diff --git a/src/nvim/screen.c b/src/nvim/screen.c
index 43cb6f4878..d57b84ad50 100644
--- a/src/nvim/screen.c
+++ b/src/nvim/screen.c
@@ -1951,6 +1951,28 @@ static void fold_line(win_T *wp, long fold_count, foldinfo_T *foldinfo, linenr_T
}
}
+ // Show colorcolumn in the fold line, but let cursorcolumn override it.
+ if (wp->w_p_cc_cols) {
+ int i = 0;
+ int j = wp->w_p_cc_cols[i];
+ int old_txtcol = txtcol;
+
+ while (j > -1) {
+ txtcol += j;
+ if (wp->w_p_wrap) {
+ txtcol -= wp->w_skipcol;
+ } else {
+ txtcol -= wp->w_leftcol;
+ }
+ if (txtcol >= 0 && txtcol < wp->w_width) {
+ ScreenAttrs[off + txtcol] =
+ hl_combine_attr(ScreenAttrs[off + txtcol], hl_attr(HLF_MC));
+ }
+ txtcol = old_txtcol;
+ j = wp->w_p_cc_cols[++i];
+ }
+ }
+
/* Show 'cursorcolumn' in the fold line. */
if (wp->w_p_cuc) {
txtcol += wp->w_virtcol;
diff --git a/src/nvim/search.c b/src/nvim/search.c
index e10504973b..f91ac3bb9c 100644
--- a/src/nvim/search.c
+++ b/src/nvim/search.c
@@ -2199,7 +2199,6 @@ findpar (
linenr_T curr;
bool did_skip; /* true after separating lines have been skipped */
bool first; /* true on first line */
- int posix = (vim_strchr(p_cpo, CPO_PARA) != NULL);
linenr_T fold_first; /* first line of a closed fold */
linenr_T fold_last; /* last line of a closed fold */
bool fold_skipped; /* true if a closed fold was skipped this
@@ -2220,12 +2219,7 @@ findpar (
fold_skipped = true;
}
- /* POSIX has it's own ideas of what a paragraph boundary is and it
- * doesn't match historical Vi: It also stops at a "{" in the
- * first column and at an empty line. */
- if (!first && did_skip && (startPS(curr, what, both)
- || (posix && what == NUL && *ml_get(curr) ==
- '{')))
+ if (!first && did_skip && startPS(curr, what, both))
break;
if (fold_skipped)
diff --git a/src/nvim/testdir/Makefile b/src/nvim/testdir/Makefile
index f701098980..c97ffc2ced 100644
--- a/src/nvim/testdir/Makefile
+++ b/src/nvim/testdir/Makefile
@@ -12,19 +12,19 @@ SCRIPTS := test_eval.out \
test11.out test12.out test13.out test14.out \
test17.out \
test24.out \
- test26.out test27.out test30.out \
+ test30.out \
test32.out test34.out \
test36.out test37.out test39.out test40.out \
- test42.out test43.out test45.out \
- test46.out test47.out test48.out test49.out \
+ test42.out test45.out \
+ test47.out test48.out test49.out \
test52.out test53.out test55.out \
- test57.out test58.out test59.out \
- test63.out test64.out \
+ test58.out test59.out \
+ test64.out \
test68.out test69.out \
- test71.out test73.out \
- test79.out test80.out \
+ test73.out \
+ test79.out \
test83.out \
- test86.out test87.out test88.out \
+ test88.out \
test_listlbr.out \
test_breakindent.out \
test_close_count.out \
diff --git a/src/nvim/testdir/test57.in b/src/nvim/testdir/test57.in
deleted file mode 100644
index 8d972e4a68..0000000000
--- a/src/nvim/testdir/test57.in
+++ /dev/null
@@ -1,500 +0,0 @@
-Tests for :sort command. vim: set ft=vim :
-
-STARTTEST
-:so small.vim
-:"
-:/^t01:/+1,/^t02/-1sort
-:/^t02:/+1,/^t03/-1sort n
-:/^t03:/+1,/^t04/-1sort x
-:/^t04:/+1,/^t05/-1sort u
-:/^t05:/+1,/^t06/-1sort!
-:/^t06:/+1,/^t07/-1sort! n
-:/^t07:/+1,/^t08/-1sort! u
-:/^t08:/+1,/^t09/-1sort o
-:/^t09:/+1,/^t10/-1sort! x
-:/^t10:/+1,/^t11/-1sort/./
-:/^t11:/+1,/^t12/-1sort/../
-:/^t12:/+1,/^t13/-1sort/../u
-:/^t13:/+1,/^t14/-1sort/./n
-:/^t14:/+1,/^t15/-1sort/./r
-:/^t15:/+1,/^t16/-1sort/../r
-:/^t16:/+1,/^t17/-1sort/./rn
-:/^t17:/+1,/^t18/-1sort/\d/
-:/^t18:/+1,/^t19/-1sort/\d/r
-:/^t19:/+1,/^t20/-1sort/\d/n
-:/^t20:/+1,/^t21/-1sort/\d/rn
-:/^t21:/+1,/^t22/-1sort/\d\d/
-:/^t22:/+1,/^t23/-1sort/\d\d/n
-:/^t23:/+1,/^t24/-1sort/\d\d/x
-:/^t24:/+1,/^t25/-1sort/\d\d/r
-:/^t25:/+1,/^t26/-1sort/\d\d/rn
-:/^t26:/+1,/^t27/-1sort/\d\d/rx
-:/^t27:/+1,/^t28/-1sort no
-:/^t01:/,$wq! test.out
-ENDTEST
-
-t01: alphebetical
-abc
-ab
-a
-a321
-a123
-a122
-b321
-b123
-c123d
- 123b
-c321d
-b322b
-b321
-b321b
-
-
-t02: numeric
-abc
-ab
-a321
-a123
-a122
-a
-x-22
-b321
-b123
-
-c123d
--24
- 123b
-c321d
-0
-b322b
-b321
-b321b
-
-
-t03: hexadecimal
-abc
-ab
-a
-a321
-a123
-a122
-b321
-b123
-c123d
- 123b
-c321d
-b322b
-b321
-b321b
-
-
-t04: alpha, unique
-abc
-ab
-a
-a321
-a123
-a122
-b321
-b123
-c123d
- 123b
-c321d
-b322b
-b321
-b321b
-
-
-t05: alpha, reverse
-abc
-ab
-a
-a321
-a123
-a122
-b321
-b123
-c123d
- 123b
-c321d
-b322b
-b321
-b321b
-
-
-t06: numeric, reverse
-abc
-ab
-a
-a321
-a123
-a122
-b321
-b123
-c123d
- 123b
-c321d
-b322b
-b321
-b321b
-
-
-t07: unique, reverse
-abc
-ab
-a
-a321
-a123
-a122
-b321
-b123
-c123d
- 123b
-c321d
-b322b
-b321
-b321b
-
-
-t08: octal
-abc
-ab
-a
-a321
-a123
-a122
-b321
-b123
-c123d
- 123b
-c321d
-b322b
-b321
-b321b
-
-
-t09: reverse, hexadecimal
-abc
-ab
-a
-a321
-a123
-a122
-b321
-b123
-c123d
- 123b
-c321d
-b322b
-b321
-b321b
-
-
-t10: alpha, skip first character
-abc
-ab
-a
-a321
-a123
-a122
-b321
-b123
-c123d
- 123b
-c321d
-b322b
-b321
-b321b
-
-
-t11: alpha, skip first 2 characters
-abc
-ab
-a
-a321
-a123
-a122
-b321
-b123
-c123d
- 123b
-c321d
-b322b
-b321
-b321b
-
-
-t12: alpha, unique, skip first 2 characters
-abc
-ab
-a
-a321
-a123
-a122
-b321
-b123
-c123d
- 123b
-c321d
-b322b
-b321
-b321b
-
-
-t13: numeric, skip first character
-abc
-ab
-a
-a321
-a123
-a122
-b321
-b123
-c123d
- 123b
-c321d
-b322b
-b321
-b321b
-
-
-t14: alpha, sort on first character
-abc
-ab
-a
-a321
-a123
-a122
-b321
-b123
-c123d
- 123b
-c321d
-b322b
-b321
-b321b
-
-
-t15: alpha, sort on first 2 characters
-abc
-ab
-a
-a321
-a123
-a122
-b321
-b123
-c123d
- 123b
-c321d
-b322b
-b321
-b321b
-
-
-t16: numeric, sort on first character
-abc
-ab
-a
-a321
-a123
-a122
-b321
-b123
-c123d
- 123b
-c321d
-b322b
-b321
-b321b
-
-
-t17: alpha, skip past first digit
-abc
-ab
-a
-a321
-a123
-a122
-b321
-b123
-c123d
- 123b
-c321d
-b322b
-b321
-b321b
-
-
-t18: alpha, sort on first digit
-abc
-ab
-a
-a321
-a123
-a122
-b321
-b123
-c123d
- 123b
-c321d
-b322b
-b321
-b321b
-
-
-t19: numeric, skip past first digit
-abc
-ab
-a
-a321
-a123
-a122
-b321
-b123
-c123d
- 123b
-c321d
-b322b
-b321
-b321b
-
-
-t20: numeric, sort on first digit
-abc
-ab
-a
-a321
-a123
-a122
-b321
-b123
-c123d
- 123b
-c321d
-b322b
-b321
-b321b
-
-
-t21: alpha, skip past first 2 digits
-abc
-ab
-a
-a321
-a123
-a122
-b321
-b123
-c123d
- 123b
-c321d
-b322b
-b321
-b321b
-
-
-t22: numeric, skip past first 2 digits
-abc
-ab
-a
-a321
-a123
-a122
-b321
-b123
-c123d
- 123b
-c321d
-b322b
-b321
-b321b
-
-
-t23: hexadecimal, skip past first 2 digits
-abc
-ab
-a
-a321
-a123
-a122
-b321
-b123
-c123d
- 123b
-c321d
-b322b
-b321
-b321b
-
-
-t24: alpha, sort on first 2 digits
-abc
-ab
-a
-a321
-a123
-a122
-b321
-b123
-c123d
- 123b
-c321d
-b322b
-b321
-b321b
-
-
-t25: numeric, sort on first 2 digits
-abc
-ab
-a
-a321
-a123
-a122
-b321
-b123
-c123d
- 123b
-c321d
-b322b
-b321
-b321b
-
-
-t26: hexadecimal, sort on first 2 digits
-abc
-ab
-a
-a321
-a123
-a122
-b321
-b123
-c123d
- 123b
-c321d
-b322b
-b321
-b321b
-
-
-t27: wrong arguments
-abc
-ab
-a
-a321
-a123
-a122
-b321
-b123
-c123d
- 123b
-c321d
-b322b
-b321
-b321b
-
-
-t28: done
-
diff --git a/src/nvim/testdir/test57.ok b/src/nvim/testdir/test57.ok
deleted file mode 100644
index aa3d373183..0000000000
--- a/src/nvim/testdir/test57.ok
+++ /dev/null
@@ -1,459 +0,0 @@
-t01: alphebetical
-
-
- 123b
-a
-a122
-a123
-a321
-ab
-abc
-b123
-b321
-b321
-b321b
-b322b
-c123d
-c321d
-t02: numeric
-abc
-ab
-a
-
-
-
--24
-x-22
-0
-a122
-a123
-b123
-c123d
- 123b
-a321
-b321
-c321d
-b321
-b321b
-b322b
-t03: hexadecimal
-
-
-a
-ab
-abc
- 123b
-a122
-a123
-a321
-b123
-b321
-b321
-b321b
-b322b
-c123d
-c321d
-t04: alpha, unique
-
- 123b
-a
-a122
-a123
-a321
-ab
-abc
-b123
-b321
-b321b
-b322b
-c123d
-c321d
-t05: alpha, reverse
-c321d
-c123d
-b322b
-b321b
-b321
-b321
-b123
-abc
-ab
-a321
-a123
-a122
-a
- 123b
-
-
-t06: numeric, reverse
-b322b
-b321b
-b321
-c321d
-b321
-a321
- 123b
-c123d
-b123
-a123
-a122
-
-
-a
-ab
-abc
-t07: unique, reverse
-c321d
-c123d
-b322b
-b321b
-b321
-b123
-abc
-ab
-a321
-a123
-a122
-a
- 123b
-
-t08: octal
-abc
-ab
-a
-
-
-a122
-a123
-b123
-c123d
- 123b
-a321
-b321
-c321d
-b321
-b321b
-b322b
-t09: reverse, hexadecimal
-c321d
-c123d
-b322b
-b321b
-b321
-b321
-b123
-a321
-a123
-a122
- 123b
-abc
-ab
-a
-
-
-t10: alpha, skip first character
-a
-
-
-a122
-a123
-b123
- 123b
-c123d
-a321
-b321
-b321
-b321b
-c321d
-b322b
-ab
-abc
-t11: alpha, skip first 2 characters
-ab
-a
-
-
-a321
-b321
-b321
-b321b
-c321d
-a122
-b322b
-a123
-b123
- 123b
-c123d
-abc
-t12: alpha, unique, skip first 2 characters
-ab
-a
-
-a321
-b321
-b321b
-c321d
-a122
-b322b
-a123
-b123
- 123b
-c123d
-abc
-t13: numeric, skip first character
-abc
-ab
-a
-
-
-a122
-a123
-b123
-c123d
- 123b
-a321
-b321
-c321d
-b321
-b321b
-b322b
-t14: alpha, sort on first character
-
-
- 123b
-abc
-ab
-a
-a321
-a123
-a122
-b321
-b123
-b322b
-b321
-b321b
-c123d
-c321d
-t15: alpha, sort on first 2 characters
-a
-
-
- 123b
-a123
-a122
-a321
-abc
-ab
-b123
-b321
-b322b
-b321
-b321b
-c123d
-c321d
-t16: numeric, sort on first character
-abc
-ab
-a
-a321
-a123
-a122
-b321
-b123
-c123d
- 123b
-c321d
-b322b
-b321
-b321b
-
-
-t17: alpha, skip past first digit
-abc
-ab
-a
-
-
-a321
-b321
-b321
-b321b
-c321d
-a122
-b322b
-a123
-b123
- 123b
-c123d
-t18: alpha, sort on first digit
-abc
-ab
-a
-
-
-a123
-a122
-b123
-c123d
- 123b
-a321
-b321
-c321d
-b322b
-b321
-b321b
-t19: numeric, skip past first digit
-abc
-ab
-a
-
-
-a321
-b321
-c321d
-b321
-b321b
-a122
-b322b
-a123
-b123
-c123d
- 123b
-t20: numeric, sort on first digit
-abc
-ab
-a
-
-
-a123
-a122
-b123
-c123d
- 123b
-a321
-b321
-c321d
-b322b
-b321
-b321b
-t21: alpha, skip past first 2 digits
-abc
-ab
-a
-
-
-a321
-b321
-b321
-b321b
-c321d
-a122
-b322b
-a123
-b123
- 123b
-c123d
-t22: numeric, skip past first 2 digits
-abc
-ab
-a
-
-
-a321
-b321
-c321d
-b321
-b321b
-a122
-b322b
-a123
-b123
-c123d
- 123b
-t23: hexadecimal, skip past first 2 digits
-abc
-ab
-a
-
-
-a321
-b321
-b321
-a122
-a123
-b123
-b321b
-c321d
-b322b
- 123b
-c123d
-t24: alpha, sort on first 2 digits
-abc
-ab
-a
-
-
-a123
-a122
-b123
-c123d
- 123b
-a321
-b321
-c321d
-b322b
-b321
-b321b
-t25: numeric, sort on first 2 digits
-abc
-ab
-a
-
-
-a123
-a122
-b123
-c123d
- 123b
-a321
-b321
-c321d
-b322b
-b321
-b321b
-t26: hexadecimal, sort on first 2 digits
-abc
-ab
-a
-
-
-a123
-a122
-b123
-c123d
- 123b
-a321
-b321
-c321d
-b322b
-b321
-b321b
-t27: wrong arguments
-abc
-ab
-a
-a321
-a123
-a122
-b321
-b123
-c123d
- 123b
-c321d
-b322b
-b321
-b321b
-
-
-t28: done
-
diff --git a/src/nvim/testdir/test79.in b/src/nvim/testdir/test79.in
index 8278bd8000..afbf2083d2 100644
--- a/src/nvim/testdir/test79.in
+++ b/src/nvim/testdir/test79.in
Binary files differ
diff --git a/src/nvim/testdir/test79.ok b/src/nvim/testdir/test79.ok
index e22eee0b71..d4e0ae8819 100644
--- a/src/nvim/testdir/test79.ok
+++ b/src/nvim/testdir/test79.ok
Binary files differ
diff --git a/src/nvim/testdir/test80.in b/src/nvim/testdir/test80.in
deleted file mode 100644
index 406fb6dac7..0000000000
--- a/src/nvim/testdir/test80.in
+++ /dev/null
@@ -1,201 +0,0 @@
-Test for *sub-replace-special* and *sub-replace-expression* on substitue().
-Test for submatch() on substitue().
-Test for *:s%* on :substitute.
-
-STARTTEST
-:so small.vim
-ENDTEST
-
-TEST_1:
-
-STARTTEST
-:set magic
-:set cpo&
-:$put =\"\n\nTEST_1:\"
-:$put =substitute('A', 'A', '&&', '')
-:$put =substitute('B', 'B', '\&', '')
-:$put =substitute('C123456789', 'C\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)', '\0\9\8\7\6\5\4\3\2\1', '')
-:$put =substitute('D', 'D', 'd', '')
-:$put =substitute('E', 'E', '~', '')
-:$put =substitute('F', 'F', '\~', '')
-:$put =substitute('G', 'G', '\ugg', '')
-:$put =substitute('H', 'H', '\Uh\Eh', '')
-:$put =substitute('I', 'I', '\lII', '')
-:$put =substitute('J', 'J', '\LJ\EJ', '')
-:$put =substitute('K', 'K', '\Uk\ek', '')
-:$put =substitute('lLl', 'L', ' ', '')
-:$put =substitute('mMm', 'M', '\r', '')
-:$put =substitute('nNn', 'N', '\ ', '')
-:$put =substitute('oOo', 'O', '\n', '')
-:$put =substitute('pPp', 'P', '\b', '')
-:$put =substitute('qQq', 'Q', '\t', '')
-:$put =substitute('rRr', 'R', '\\', '')
-:$put =substitute('sSs', 'S', '\c', '')
-:$put =substitute('uUu', 'U', \"\n\", '')
-:$put =substitute('vVv', 'V', \"\b\", '')
-:$put =substitute('wWw', 'W', \"\\\", '')
-:$put =substitute('xXx', 'X', \"\r\", '')
-:$put =substitute('Y', 'Y', '\L\uyYy\l\EY', '')
-:$put =substitute('Z', 'Z', '\U\lZzZ\u\Ez', '')
-/^TEST_2
-ENDTEST
-
-TEST_2:
-
-STARTTEST
-:set nomagic
-:set cpo&
-:$put =\"\n\nTEST_2:\"
-:$put =substitute('A', 'A', '&&', '')
-:$put =substitute('B', 'B', '\&', '')
-:$put =substitute('C123456789', 'C\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)', '\0\9\8\7\6\5\4\3\2\1', '')
-:$put =substitute('D', 'D', 'd', '')
-:$put =substitute('E', 'E', '~', '')
-:$put =substitute('F', 'F', '\~', '')
-:$put =substitute('G', 'G', '\ugg', '')
-:$put =substitute('H', 'H', '\Uh\Eh', '')
-:$put =substitute('I', 'I', '\lII', '')
-:$put =substitute('J', 'J', '\LJ\EJ', '')
-:$put =substitute('K', 'K', '\Uk\ek', '')
-:$put =substitute('lLl', 'L', ' ', '')
-:$put =substitute('mMm', 'M', '\r', '')
-:$put =substitute('nNn', 'N', '\ ', '')
-:$put =substitute('oOo', 'O', '\n', '')
-:$put =substitute('pPp', 'P', '\b', '')
-:$put =substitute('qQq', 'Q', '\t', '')
-:$put =substitute('rRr', 'R', '\\', '')
-:$put =substitute('sSs', 'S', '\c', '')
-:$put =substitute('tTt', 'T', \"\r\", '')
-:$put =substitute('uUu', 'U', \"\n\", '')
-:$put =substitute('vVv', 'V', \"\b\", '')
-:$put =substitute('wWw', 'W', \"\\\", '')
-:$put =substitute('X', 'X', '\L\uxXx\l\EX', '')
-:$put =substitute('Y', 'Y', '\U\lYyY\u\Ey', '')
-/^TEST_3
-ENDTEST
-
-TEST_3:
-
-STARTTEST
-:set magic&
-:set cpo&
-:$put =\"\n\nTEST_3:\"
-:let y = substitute('aAa', 'A', '\="\\"', '') | $put =y
-:let y = substitute('bBb', 'B', '\="\\\\"', '') | $put =y
-:let y = substitute('cCc', 'C', '\=" "', '') | $put =y
-:let y = substitute('dDd', 'D', '\="\\ "', '') | $put =y
-:let y = substitute('eEe', 'E', '\="\\\\ "', '') | $put =y
-:let y = substitute('fFf', 'F', '\="\\r"', '') | $put =y
-:let y = substitute('jJj', 'J', '\="\\n"', '') | $put =y
-:let y = substitute('kKk', 'K', '\="\r"', '') | $put =y
-:let y = substitute('lLl', 'L', '\="\n"', '') | $put =y
-/^TEST_4
-ENDTEST
-
-TEST_4:
-
-STARTTEST
-:set magic&
-:set cpo&
-:$put =\"\n\nTEST_4:\"
-:let y = substitute('aAa', 'A', '\=substitute(submatch(0), ".", "\\", "")', '') | $put =y
-:let y = substitute('bBb', 'B', '\=substitute(submatch(0), ".", "\\\\", "")', '') | $put =y
-:let y = substitute('cCc', 'C', '\=substitute(submatch(0), ".", " ", "")', '') | $put =y
-:let y = substitute('dDd', 'D', '\=substitute(submatch(0), ".", "\\ ", "")', '') | $put =y
-:let y = substitute('eEe', 'E', '\=substitute(submatch(0), ".", "\\\\ ", "")', '') | $put =y
-:let y = substitute('fFf', 'F', '\=substitute(submatch(0), ".", "\\r", "")', '') | $put =y
-:let y = substitute('jJj', 'J', '\=substitute(submatch(0), ".", "\\n", "")', '') | $put =y
-:let y = substitute('kKk', 'K', '\=substitute(submatch(0), ".", "\r", "")', '') | $put =y
-:let y = substitute('lLl', 'L', '\=substitute(submatch(0), ".", "\n", "")', '') | $put =y
-/^TEST_5
-ENDTEST
-
-TEST_5:
-
-STARTTEST
-:set magic&
-:set cpo&
-:$put =\"\n\nTEST_5:\"
-:$put =substitute('A123456789', 'A\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)', '\=submatch(0) . submatch(9) . submatch(8) . submatch(7) . submatch(6) . submatch(5) . submatch(4) . submatch(3) . submatch(2) . submatch(1)', '')
-:$put =substitute('A123456789', 'A\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)', '\=string([submatch(0, 1), submatch(9, 1), submatch(8, 1), submatch(7, 1), submatch(6, 1), submatch(5, 1), submatch(4, 1), submatch(3, 1), submatch(2, 1), submatch(1, 1)])', '')
-/^TEST_6
-ENDTEST
-
-TEST_6:
-
-STARTTEST
-:set magic&
-:$put =\"\n\nTEST_6:\"
-:set cpo+=/
-:$put =substitute('A', 'A', 'a', '')
-:$put =substitute('B', 'B', '%', '')
-:set cpo-=/
-:$put =substitute('C', 'C', 'c', '')
-:$put =substitute('D', 'D', '%', '')
-/^TEST_7
-ENDTEST
-
-TEST_7:
-
-STARTTEST
-:set magic&
-:set cpo&
-:$put =\"\n\nTEST_7:\"
-:$put =substitute('A A', 'A.', '\=submatch(0)', '')
-:$put =substitute(\"B\nB\", 'B.', '\=submatch(0)', '')
-:$put =substitute(\"B\nB\", 'B.', '\=string(submatch(0, 1))', '')
-:$put =substitute('-bb', '\zeb', 'a', 'g')
-:$put =substitute('-bb', '\ze', 'c', 'g')
-/^TEST_8
-ENDTEST
-
-TEST_8:
-
-STARTTEST
-:set magic&
-:set cpo&
-:$put =\"\n\nTEST_8:\"
-:$put =',,X'
-:s/\(^\|,\)\ze\(,\|X\)/\1N/g
-:$put =',,Y'
-:s/\(^\|,\)\ze\(,\|Y\)/\1N/gc
-a:$put =',,Z'
-:s/\(^\|,\)\ze\(,\|Z\)/\1N/gc
-yy/^TEST_9:
-ENDTEST
-
-TEST_9:
-
-STARTTEST
-:set magic&
-:set cpo&
-:$put =\"\n\nTEST_9:\"
-:$put ='xxx'
-:s/x/X/gc
-yyq/^TEST_10:
-ENDTEST
-
-TEST_10:
-
-STARTTEST
-:set magic&
-:set cpo&
-:$put =\"\n\nTEST_10:\"
-:let y = substitute('123', '\zs', 'a', 'g') | $put =y
-:let y = substitute('123', '\zs.', 'a', 'g') | $put =y
-:let y = substitute('123', '.\zs', 'a', 'g') | $put =y
-:let y = substitute('123', '\ze', 'a', 'g') | $put =y
-:let y = substitute('123', '\ze.', 'a', 'g') | $put =y
-:let y = substitute('123', '.\ze', 'a', 'g') | $put =y
-:let y = substitute('123', '1\|\ze', 'a', 'g') | $put =y
-:let y = substitute('123', '1\zs\|[23]', 'a', 'g') | $put =y
-/^TEST_11
-ENDTEST
-
-TEST_11:
-
-STARTTEST
-:/^Results/,$wq! test.out
-ENDTEST
-
-Results of test72:
diff --git a/src/nvim/testdir/test80.ok b/src/nvim/testdir/test80.ok
deleted file mode 100644
index b42f604a07..0000000000
--- a/src/nvim/testdir/test80.ok
+++ /dev/null
@@ -1,131 +0,0 @@
-Results of test72:
-
-
-TEST_1:
-AA
-&
-C123456789987654321
-d
-~
-~
-Gg
-Hh
-iI
-jJ
-Kk
-l l
-m m
-n n
-o
-o
-pp
-q q
-r\r
-scs
-u
-u
-vv
-w\w
-x x
-YyyY
-zZZz
-
-
-TEST_2:
-AA
-&
-C123456789987654321
-d
-~
-~
-Gg
-Hh
-iI
-jJ
-Kk
-l l
-m m
-n n
-o
-o
-pp
-q q
-r\r
-scs
-t t
-u
-u
-vv
-w\w
-XxxX
-yYYy
-
-
-TEST_3:
-a\a
-b\\b
-c c
-d\ d
-e\\ e
-f\rf
-j\nj
-k k
-l
-l
-
-
-TEST_4:
-a\a
-b\b
-c c
-d d
-e\ e
-f f
-j
-j
-k k
-l
-l
-
-
-TEST_5:
-A123456789987654321
-[['A123456789'], ['9'], ['8'], ['7'], ['6'], ['5'], ['4'], ['3'], ['2'], ['1']]
-
-
-TEST_6:
-a
-%
-c
-%
-
-
-TEST_7:
-A A
-B
-B
-['B
-']B
--abab
-c-cbcbc
-
-
-TEST_8:
-N,,NX
-N,,NY
-N,,NZ
-
-
-TEST_9:
-XXx
-
-
-TEST_10:
-a1a2a3a
-aaa
-1a2a3a
-a1a2a3a
-a1a2a3
-aaa
-aa2a3a
-1aaa
diff --git a/src/nvim/testdir/test86.in b/src/nvim/testdir/test86.in
deleted file mode 100644
index 41d9a2fa32..0000000000
--- a/src/nvim/testdir/test86.in
+++ /dev/null
@@ -1,1425 +0,0 @@
-Tests for various python features. vim: set ft=vim :
-
-This test is not run in Neovim(see the has('nvim') check below) because the
-python compatibility layer is not complete.
-
-NOTE: This will cause errors when run under valgrind.
-This would require recompiling Python with:
- ./configure --without-pymalloc
-See http://svn.python.org/view/python/trunk/Misc/README.valgrind?view=markup
-
-STARTTEST
-:so small.vim
-:set encoding=latin1
-:set noswapfile
-:if !has('python') || has('nvim') | e! test.ok | wq! test.out | endif
-:lang C
-:fun Test()
-:py import vim
-:let l = []
-:py l=vim.bindeval('l')
-:py f=vim.bindeval('function("strlen")')
-:" Extending List directly with different types
-:py l.extend([1, "as'd", [1, 2, f, {'a': 1}]])
-:$put =string(l)
-:$put =string(l[-1])
-:try
-: $put =string(l[-4])
-:catch
-: $put =v:exception[:13]
-:endtry
-:" List assignment
-:py l[0]=0
-:$put =string(l)
-:py l[-2]=f
-:$put =string(l)
-:"
-:" Extending Dictionary directly with different types
-:let d = {}
-:fun d.f()
-: return 1
-:endfun
-py << EOF
-d=vim.bindeval('d')
-d['1']='asd'
-d.update(b=[1, 2, f])
-d.update((('-1', {'a': 1}),))
-d.update({'0': -1})
-dk = d.keys()
-dv = d.values()
-di = d.items()
-cmpfun = lambda a, b: cmp(repr(a), repr(b))
-dk.sort(cmpfun)
-dv.sort(cmpfun)
-di.sort(cmpfun)
-EOF
-:$put =pyeval('d[''f''](self={})')
-:$put =pyeval('repr(dk)')
-:$put =substitute(pyeval('repr(dv)'),'0x\x\+','','g')
-:$put =substitute(pyeval('repr(di)'),'0x\x\+','','g')
-:for [key, Val] in sort(items(d))
-: $put =string(key) . ' : ' . string(Val)
-: unlet key Val
-:endfor
-:py del dk
-:py del di
-:py del dv
-:"
-:" removing items with del
-:py del l[2]
-:$put =string(l)
-:let l = range(8)
-:py l=vim.bindeval('l')
-:try
-: py del l[:3]
-: py del l[1:]
-:catch
-: $put =v:exception
-:endtry
-:$put =string(l)
-:"
-:py del d['-1']
-:py del d['f']
-:$put =string(pyeval('d.get(''b'', 1)'))
-:$put =string(pyeval('d.pop(''b'')'))
-:$put =string(pyeval('d.get(''b'', 1)'))
-:$put =string(pyeval('d.pop(''1'', 2)'))
-:$put =string(pyeval('d.pop(''1'', 2)'))
-:$put =pyeval('repr(d.has_key(''0''))')
-:$put =pyeval('repr(d.has_key(''1''))')
-:$put =pyeval('repr(''0'' in d)')
-:$put =pyeval('repr(''1'' in d)')
-:$put =pyeval('repr(list(iter(d)))')
-:$put =string(d)
-:$put =pyeval('repr(d.popitem())')
-:$put =pyeval('repr(d.get(''0''))')
-:$put =pyeval('repr(list(iter(d)))')
-:"
-:" removing items out of range: silently skip items that don't exist
-:let l = [0, 1, 2, 3]
-:py l=vim.bindeval('l')
-:" The following two ranges delete nothing as they match empty list:
-:py del l[2:1]
-:$put =string(l)
-:py del l[2:2]
-:$put =string(l)
-:py del l[2:3]
-:$put =string(l)
-:let l = [0, 1, 2, 3]
-:py l=vim.bindeval('l')
-:py del l[2:4]
-:$put =string(l)
-:let l = [0, 1, 2, 3]
-:py l=vim.bindeval('l')
-:py del l[2:5]
-:$put =string(l)
-:let l = [0, 1, 2, 3]
-:py l=vim.bindeval('l')
-:py del l[2:6]
-:$put =string(l)
-:let l = [0, 1, 2, 3]
-:py l=vim.bindeval('l')
-:" The following two ranges delete nothing as they match empty list:
-:py del l[-1:2]
-:$put =string(l)
-:py del l[-2:2]
-:$put =string(l)
-:py del l[-3:2]
-:$put =string(l)
-:let l = [0, 1, 2, 3]
-:py l=vim.bindeval('l')
-:py del l[-4:2]
-:$put =string(l)
-:let l = [0, 1, 2, 3]
-:py l=vim.bindeval('l')
-:py del l[-5:2]
-:$put =string(l)
-:let l = [0, 1, 2, 3]
-:py l=vim.bindeval('l')
-:py del l[-6:2]
-:$put =string(l)
-:let l = [0, 1, 2, 3]
-:py l=vim.bindeval('l')
-:py del l[::2]
-:$put =string(l)
-:let l = [0, 1, 2, 3]
-:py l=vim.bindeval('l')
-:py del l[3:0:-2]
-:$put =string(l)
-:let l = [0, 1, 2, 3]
-:py l=vim.bindeval('l')
-:py del l[2:4:-2]
-:$put =string(l)
-:"
-:" Slice assignment to a list
-:let l = [0, 1, 2, 3]
-:py l=vim.bindeval('l')
-:py l[0:0]=['a']
-:$put =string(l)
-:let l = [0, 1, 2, 3]
-:py l=vim.bindeval('l')
-:py l[1:2]=['b']
-:$put =string(l)
-:let l = [0, 1, 2, 3]
-:py l=vim.bindeval('l')
-:py l[2:4]=['c']
-:$put =string(l)
-:let l = [0, 1, 2, 3]
-:py l=vim.bindeval('l')
-:py l[4:4]=['d']
-:$put =string(l)
-:let l = [0, 1, 2, 3]
-:py l=vim.bindeval('l')
-:py l[-1:2]=['e']
-:$put =string(l)
-:let l = [0, 1, 2, 3]
-:py l=vim.bindeval('l')
-:py l[-10:2]=['f']
-:$put =string(l)
-:let l = [0, 1, 2, 3]
-:py l=vim.bindeval('l')
-:py l[2:-10]=['g']
-:$put =string(l)
-:let l = []
-:py l=vim.bindeval('l')
-:py l[0:0]=['h']
-:$put =string(l)
-:let l = range(8)
-:py l=vim.bindeval('l')
-:py l[2:6:2] = [10, 20]
-:$put =string(l)
-:let l = range(8)
-:py l=vim.bindeval('l')
-:py l[6:2:-2] = [10, 20]
-:$put =string(l)
-:let l = range(8)
-:py l=vim.bindeval('l')
-:py l[6:2] = ()
-:$put =string(l)
-:let l = range(8)
-:py l=vim.bindeval('l')
-:py l[6:2:1] = ()
-:$put =string(l)
-:let l = range(8)
-:py l=vim.bindeval('l')
-:py l[2:2:1] = ()
-:$put =string(l)
-:"
-:" Locked variables
-:let l = [0, 1, 2, 3]
-:py l=vim.bindeval('l')
-:lockvar! l
-:py l[2]='i'
-:$put =string(l)
-:unlockvar! l
-:"
-:" Function calls
-py << EOF
-import sys
-def ee(expr, g=globals(), l=locals()):
- try:
- exec(expr, g, l)
- except:
- ei = sys.exc_info()
- msg = sys.exc_info()[0].__name__ + ':' + repr(sys.exc_info()[1].args)
- msg = msg.replace('TypeError:(\'argument 1 ', 'TypeError:(\'')
- if expr.find('None') > -1:
- msg = msg.replace('TypeError:(\'iteration over non-sequence\',)',
- 'TypeError:("\'NoneType\' object is not iterable",)')
- if expr.find('FailingNumber') > -1:
- msg = msg.replace(', not \'FailingNumber\'', '').replace('"', '\'')
- msg = msg.replace('TypeError:(\'iteration over non-sequence\',)',
- 'TypeError:("\'FailingNumber\' object is not iterable",)')
- if msg.find('(\'\'') > -1 or msg.find('(\'can\'t') > -1:
- msg = msg.replace('(\'', '("').replace('\',)', '",)')
- if expr == 'fd(self=[])':
- # HACK: PyMapping_Check changed meaning
- msg = msg.replace('AttributeError:(\'keys\',)',
- 'TypeError:(\'unable to convert list to vim dictionary\',)')
- vim.current.buffer.append(expr + ':' + msg)
- else:
- vim.current.buffer.append(expr + ':NOT FAILED')
-EOF
-:fun New(...)
-: return ['NewStart']+a:000+['NewEnd']
-:endfun
-:fun DictNew(...) dict
-: return ['DictNewStart']+a:000+['DictNewEnd', self]
-:endfun
-:let l=[function('New'), function('DictNew')]
-:py l=vim.bindeval('l')
-:py l.extend(list(l[0](1, 2, 3)))
-:$put =string(l)
-:py l.extend(list(l[1](1, 2, 3, self={'a': 'b'})))
-:$put =string(l)
-:py l.extend([l[0].name])
-:$put =string(l)
-:py ee('l[1](1, 2, 3)')
-:py f=l[0]
-:delfunction New
-:py ee('f(1, 2, 3)')
-:let l=[0.0]
-:py l=vim.bindeval('l')
-:py l.extend([0.0])
-:$put =string(l)
-:let messages=[]
-:delfunction DictNew
-py <<EOF
-d=vim.bindeval('{}')
-m=vim.bindeval('messages')
-def em(expr, g=globals(), l=locals()):
- try:
- exec(expr, g, l)
- except:
- m.extend([sys.exc_type.__name__])
-
-em('d["abc1"]')
-em('d["abc1"]="\\0"')
-em('d["abc1"]=vim')
-em('d[""]=1')
-em('d["a\\0b"]=1')
-em('d[u"a\\0b"]=1')
-
-em('d.pop("abc1")')
-em('d.popitem()')
-del em
-del m
-EOF
-:$put =messages
-:unlet messages
-:" locked and scope attributes
-:let d={} | let dl={} | lockvar dl
-:for s in split("d dl v: g:")
-: let name=tr(s, ':', 's')
-: execute 'py '.name.'=vim.bindeval("'.s.'")'
-: let toput=s.' : '.join(map(['locked', 'scope'], 'v:val.":".pyeval(name.".".v:val)'), ';')
-: $put =toput
-:endfor
-:silent! let d.abc2=1
-:silent! let dl.abc3=1
-:py d.locked=True
-:py dl.locked=False
-:silent! let d.def=1
-:silent! let dl.def=1
-:put ='d:'.string(d)
-:put ='dl:'.string(dl)
-:unlet d dl
-:
-:let l=[] | let ll=[] | lockvar ll
-:for s in split("l ll")
-: let name=tr(s, ':', 's')
-: execute 'py '.name.'=vim.bindeval("'.s.'")'
-: let toput=s.' : locked:'.pyeval(name.'.locked')
-: $put =toput
-:endfor
-:silent! call extend(l, [0])
-:silent! call extend(ll, [0])
-:py l.locked=True
-:py ll.locked=False
-:silent! call extend(l, [1])
-:silent! call extend(ll, [1])
-:put ='l:'.string(l)
-:put ='ll:'.string(ll)
-:unlet l ll
-:"
-:" pyeval()
-:let l=pyeval('range(3)')
-:$put =string(l)
-:let d=pyeval('{"a": "b", "c": 1, "d": ["e"]}')
-:$put =sort(items(d))
-:let f=pyeval('0.0')
-:$put =string(f)
-:" Invalid values:
-:for e in ['"\0"', '{"\0": 1}', 'undefined_name', 'vim']
-: try
-: let v=pyeval(e)
-: catch
-: let toput=e.":\t".v:exception[:13]
-: $put =toput
-: endtry
-:endfor
-:"
-:" threading
-:let l = [0]
-:py l=vim.bindeval('l')
-py <<EOF
-import threading
-import time
-
-class T(threading.Thread):
- def __init__(self):
- threading.Thread.__init__(self)
- self.t = 0
- self.running = True
-
- def run(self):
- while self.running:
- self.t += 1
- time.sleep(0.1)
-
-t = T()
-del T
-t.start()
-EOF
-:sleep 1
-:py t.running = False
-:py t.join()
-:py l[0] = t.t > 8 # check if the background thread is working
-:py del time
-:py del threading
-:py del t
-:$put =string(l)
-:"
-:" settrace
-:let l = []
-:py l=vim.bindeval('l')
-py <<EOF
-import sys
-
-def traceit(frame, event, arg):
- global l
- if event == "line":
- l.extend([frame.f_lineno])
- return traceit
-
-def trace_main():
- for i in range(5):
- pass
-EOF
-:py sys.settrace(traceit)
-:py trace_main()
-:py sys.settrace(None)
-:py del traceit
-:py del trace_main
-:$put =string(l)
-:"
-:" Slice
-:py ll = vim.bindeval('[0, 1, 2, 3, 4, 5]')
-:py l = ll[:4]
-:$put =string(pyeval('l'))
-:py l = ll[2:]
-:$put =string(pyeval('l'))
-:py l = ll[:-4]
-:$put =string(pyeval('l'))
-:py l = ll[-2:]
-:$put =string(pyeval('l'))
-:py l = ll[2:4]
-:$put =string(pyeval('l'))
-:py l = ll[4:2]
-:$put =string(pyeval('l'))
-:py l = ll[-4:-2]
-:$put =string(pyeval('l'))
-:py l = ll[-2:-4]
-:$put =string(pyeval('l'))
-:py l = ll[:]
-:$put =string(pyeval('l'))
-:py l = ll[0:6]
-:$put =string(pyeval('l'))
-:py l = ll[-10:10]
-:$put =string(pyeval('l'))
-:py l = ll[4:2:-1]
-:$put =string(pyeval('l'))
-:py l = ll[::2]
-:$put =string(pyeval('l'))
-:py l = ll[4:2:1]
-:$put =string(pyeval('l'))
-:py del l
-:"
-:" Vars
-:let g:foo = 'bac'
-:let w:abc3 = 'def'
-:let b:baz = 'bar'
-:let t:bar = 'jkl'
-:try
-: throw "Abc"
-:catch
-: put =pyeval('vim.vvars[''exception'']')
-:endtry
-:put =pyeval('vim.vars[''foo'']')
-:put =pyeval('vim.current.window.vars[''abc3'']')
-:put =pyeval('vim.current.buffer.vars[''baz'']')
-:put =pyeval('vim.current.tabpage.vars[''bar'']')
-:"
-:" Options
-:" paste: boolean, global
-:" previewheight number, global
-:" operatorfunc: string, global
-:" number: boolean, window-local
-:" numberwidth: number, window-local
-:" colorcolumn: string, window-local
-:" statusline: string, window-local/global
-:" autoindent: boolean, buffer-local
-:" shiftwidth: number, buffer-local
-:" omnifunc: string, buffer-local
-:" preserveindent: boolean, buffer-local/global
-:" path: string, buffer-local/global
-:let g:bufs=[bufnr('%')]
-:new
-:let g:bufs+=[bufnr('%')]
-:vnew
-:let g:bufs+=[bufnr('%')]
-:wincmd j
-:vnew
-:let g:bufs+=[bufnr('%')]
-:wincmd l
-:fun RecVars(opt)
-: let gval =string(eval('&g:'.a:opt))
-: let wvals=join(map(range(1, 4), 'v:val.":".string(getwinvar(v:val, "&".a:opt))'))
-: let bvals=join(map(copy(g:bufs), 'v:val.":".string(getbufvar(v:val, "&".a:opt))'))
-: put =' G: '.gval
-: put =' W: '.wvals
-: put =' B: '.wvals
-:endfun
-py << EOF
-def e(s, g=globals(), l=locals()):
- try:
- exec(s, g, l)
- except:
- vim.command('return ' + repr(sys.exc_type.__name__))
-
-def ev(s, g=globals(), l=locals()):
- try:
- return eval(s, g, l)
- except:
- vim.command('let exc=' + repr(sys.exc_type.__name__))
- return 0
-EOF
-:fun E(s)
-: python e(vim.eval('a:s'))
-:endfun
-:fun Ev(s)
-: let r=pyeval('ev(vim.eval("a:s"))')
-: if exists('exc')
-: throw exc
-: endif
-: return r
-:endfun
-:py gopts1=vim.options
-:py wopts1=vim.windows[2].options
-:py wopts2=vim.windows[0].options
-:py wopts3=vim.windows[1].options
-:py bopts1=vim.buffers[vim.bindeval("g:bufs")[2]].options
-:py bopts2=vim.buffers[vim.bindeval("g:bufs")[1]].options
-:py bopts3=vim.buffers[vim.bindeval("g:bufs")[0]].options
-:$put ='wopts iters equal: '.pyeval('list(wopts1) == list(wopts2)')
-:$put ='bopts iters equal: '.pyeval('list(bopts1) == list(bopts2)')
-:py gset=set(iter(gopts1))
-:py wset=set(iter(wopts1))
-:py bset=set(iter(bopts1))
-:set path=.,..,,
-:let lst=[]
-:let lst+=[['paste', 1, 0, 1, 2, 1, 1, 0 ]]
-:let lst+=[['previewheight', 5, 1, 6, 'a', 0, 1, 0 ]]
-:let lst+=[['operatorfunc', 'A', 'B', 'C', 2, 0, 1, 0 ]]
-:let lst+=[['number', 0, 1, 1, 0, 1, 0, 1 ]]
-:let lst+=[['numberwidth', 2, 3, 5, -100, 0, 0, 1 ]]
-:let lst+=[['colorcolumn', '+1', '+2', '+3', 'abc4', 0, 0, 1 ]]
-:let lst+=[['statusline', '1', '2', '4', 0, 0, 1, 1 ]]
-:let lst+=[['autoindent', 0, 1, 1, 2, 1, 0, 2 ]]
-:let lst+=[['shiftwidth', 0, 2, 1, 3, 0, 0, 2 ]]
-:let lst+=[['omnifunc', 'A', 'B', 'C', 1, 0, 0, 2 ]]
-:let lst+=[['preserveindent', 0, 1, 1, 2, 1, 1, 2 ]]
-:let lst+=[['path', '.,,', ',,', '.', 0, 0, 1, 2 ]]
-:for [oname, oval1, oval2, oval3, invval, bool, global, local] in lst
-: py oname=vim.eval('oname')
-: py oval1=vim.bindeval('oval1')
-: py oval2=vim.bindeval('oval2')
-: py oval3=vim.bindeval('oval3')
-: if invval is 0 || invval is 1
-: py invval=bool(vim.bindeval('invval'))
-: else
-: py invval=vim.bindeval('invval')
-: endif
-: if bool
-: py oval1=bool(oval1)
-: py oval2=bool(oval2)
-: py oval3=bool(oval3)
-: endif
-: put ='>>> '.oname
-: $put =' g/w/b:'.pyeval('oname in gset').'/'.pyeval('oname in wset').'/'.pyeval('oname in bset')
-: $put =' g/w/b (in):'.pyeval('oname in gopts1').'/'.pyeval('oname in wopts1').'/'.pyeval('oname in bopts1')
-: for v in ['gopts1', 'wopts1', 'bopts1']
-: try
-: put =' p/'.v.': '.Ev('repr('.v.'['''.oname.'''])')
-: catch
-: put =' p/'.v.'! '.v:exception
-: endtry
-: let r=E(v.'['''.oname.''']=invval')
-: if r isnot 0
-: put =' inv: '.string(invval).'! '.r
-: endif
-: for vv in (v is# 'gopts1' ? [v] : [v, v[:-2].'2', v[:-2].'3'])
-: let val=substitute(vv, '^.opts', 'oval', '')
-: let r=E(vv.'['''.oname.''']='.val)
-: if r isnot 0
-: put =' '.vv.'! '.r
-: endif
-: endfor
-: endfor
-: call RecVars(oname)
-: for v in ['wopts3', 'bopts3']
-: let r=E('del '.v.'["'.oname.'"]')
-: if r isnot 0
-: put =' del '.v.'! '.r
-: endif
-: endfor
-: call RecVars(oname)
-:endfor
-:delfunction RecVars
-:delfunction E
-:delfunction Ev
-:py del ev
-:py del e
-:only
-:for buf in g:bufs[1:]
-: execute 'bwipeout!' buf
-:endfor
-:py del gopts1
-:py del wopts1
-:py del wopts2
-:py del wopts3
-:py del bopts1
-:py del bopts2
-:py del bopts3
-:py del oval1
-:py del oval2
-:py del oval3
-:py del oname
-:py del invval
-:"
-:" Test buffer object
-:vnew
-:put ='First line'
-:put ='Second line'
-:put ='Third line'
-:1 delete _
-:py b=vim.current.buffer
-:wincmd w
-:mark a
-:augroup BUFS
-: autocmd BufFilePost * python cb.append(vim.eval('expand("<abuf>")') + ':BufFilePost:' + vim.eval('bufnr("%")'))
-: autocmd BufFilePre * python cb.append(vim.eval('expand("<abuf>")') + ':BufFilePre:' + vim.eval('bufnr("%")'))
-:augroup END
-py << EOF
-cb = vim.current.buffer
-# Tests BufferAppend and BufferItem
-cb.append(b[0])
-# Tests BufferSlice and BufferAssSlice
-cb.append('abc5') # Will be overwritten
-cb[-1:] = b[:-2]
-# Test BufferLength and BufferAssSlice
-cb.append('def') # Will not be overwritten
-cb[len(cb):] = b[:]
-# Test BufferAssItem and BufferMark
-cb.append('ghi') # Will be overwritten
-cb[-1] = repr((len(cb) - cb.mark('a')[0], cb.mark('a')[1]))
-# Test BufferRepr
-cb.append(repr(cb) + repr(b))
-# Modify foreign buffer
-b.append('foo')
-b[0]='bar'
-b[0:0]=['baz']
-vim.command('call append("$", getbufline(%i, 1, "$"))' % b.number)
-# Test assigning to name property
-import os
-old_name = cb.name
-cb.name = 'foo'
-cb.append(cb.name[-11:].replace(os.path.sep, '/'))
-b.name = 'bar'
-cb.append(b.name[-11:].replace(os.path.sep, '/'))
-cb.name = old_name
-cb.append(cb.name[-17:].replace(os.path.sep, '/'))
-del old_name
-# Test CheckBuffer
-for _b in vim.buffers:
- if _b is not cb:
- vim.command('bwipeout! ' + str(_b.number))
-del _b
-cb.append('valid: b:%s, cb:%s' % (repr(b.valid), repr(cb.valid)))
-for expr in ('b[1]','b[:] = ["A", "B"]','b[:]','b.append("abc6")', 'b.name = "!"'):
- try:
- exec(expr)
- except vim.error:
- pass
- else:
- # Usually a SEGV here
- # Should not happen in any case
- cb.append('No exception for ' + expr)
-vim.command('cd .')
-del b
-EOF
-:augroup BUFS
-: autocmd!
-:augroup END
-:augroup! BUFS
-:"
-:" Test vim.buffers object
-:set hidden
-:edit a
-:buffer #
-:edit b
-:buffer #
-:edit c
-:buffer #
-py << EOF
-try:
- from __builtin__ import next
-except ImportError:
- next = lambda o: o.next()
-# Check GCing iterator that was not fully exhausted
-i = iter(vim.buffers)
-cb.append('i:' + str(next(i)))
-# and also check creating more then one iterator at a time
-i2 = iter(vim.buffers)
-cb.append('i2:' + str(next(i2)))
-cb.append('i:' + str(next(i)))
-# The following should trigger GC and not cause any problems
-del i
-del i2
-i3 = iter(vim.buffers)
-cb.append('i3:' + str(next(i3)))
-del i3
-
-prevnum = 0
-for b in vim.buffers:
- # Check buffer order
- if prevnum >= b.number:
- cb.append('!!! Buffer numbers not in strictly ascending order')
- # Check indexing: vim.buffers[number].number == number
- cb.append(str(b.number) + ':' + repr(vim.buffers[b.number]) + '=' + repr(b))
- prevnum = b.number
-del prevnum
-
-cb.append(str(len(vim.buffers)))
-
-bnums = list(map(lambda b: b.number, vim.buffers))[1:]
-
-# Test wiping out buffer with existing iterator
-i4 = iter(vim.buffers)
-cb.append('i4:' + str(next(i4)))
-vim.command('bwipeout! ' + str(bnums.pop(0)))
-try:
- next(i4)
-except vim.error:
- pass
-else:
- cb.append('!!!! No vim.error')
-i4 = iter(vim.buffers)
-vim.command('bwipeout! ' + str(bnums.pop(-1)))
-vim.command('bwipeout! ' + str(bnums.pop(-1)))
-cb.append('i4:' + str(next(i4)))
-try:
- next(i4)
-except StopIteration:
- cb.append('StopIteration')
-del i4
-del bnums
-EOF
-:"
-:" Test vim.{tabpage,window}list and vim.{tabpage,window} objects
-:tabnew 0
-:tabnew 1
-:vnew a.1
-:tabnew 2
-:vnew a.2
-:vnew b.2
-:vnew c.2
-py << EOF
-cb.append('Number of tabs: ' + str(len(vim.tabpages)))
-cb.append('Current tab pages:')
-def W(w):
- if repr(w).find('(unknown)') != -1:
- return '<window object (unknown)>'
- else:
- return repr(w)
-
-start = len(cb)
-
-def Cursor(w):
- if w.buffer is cb:
- return repr((start - w.cursor[0], w.cursor[1]))
- else:
- return repr(w.cursor)
-
-for t in vim.tabpages:
- cb.append(' ' + repr(t) + '(' + str(t.number) + ')' + ': ' + str(len(t.windows)) + ' windows, current is ' + W(t.window))
- cb.append(' Windows:')
- for w in t.windows:
- cb.append(' ' + W(w) + '(' + str(w.number) + ')' + ': displays buffer ' + repr(w.buffer) + '; cursor is at ' + Cursor(w))
- # Other values depend on the size of the terminal, so they are checked partly:
- for attr in ('height', 'row', 'width', 'col'):
- try:
- aval = getattr(w, attr)
- if type(aval) is not long:
- raise TypeError
- if aval < 0:
- raise ValueError
- except Exception:
- cb.append('!!!!!! Error while getting attribute ' + attr + ': ' + sys.exc_type.__name__)
- del aval
- del attr
- w.cursor = (len(w.buffer), 0)
-del W
-del Cursor
-cb.append('Number of windows in current tab page: ' + str(len(vim.windows)))
-if list(vim.windows) != list(vim.current.tabpage.windows):
- cb.append('!!!!!! Windows differ')
-EOF
-:"
-:" Test vim.current
-py << EOF
-def H(o):
- return repr(o)
-cb.append('Current tab page: ' + repr(vim.current.tabpage))
-cb.append('Current window: ' + repr(vim.current.window) + ': ' + H(vim.current.window) + ' is ' + H(vim.current.tabpage.window))
-cb.append('Current buffer: ' + repr(vim.current.buffer) + ': ' + H(vim.current.buffer) + ' is ' + H(vim.current.window.buffer)+ ' is ' + H(vim.current.tabpage.window.buffer))
-del H
-# Assigning: fails
-try:
- vim.current.window = vim.tabpages[0].window
-except ValueError:
- cb.append('ValueError at assigning foreign tab window')
-
-for attr in ('window', 'tabpage', 'buffer'):
- try:
- setattr(vim.current, attr, None)
- except TypeError:
- cb.append('Type error at assigning None to vim.current.' + attr)
-del attr
-
-# Assigning: success
-vim.current.tabpage = vim.tabpages[-2]
-vim.current.buffer = cb
-vim.current.window = vim.windows[0]
-vim.current.window.cursor = (len(vim.current.buffer), 0)
-cb.append('Current tab page: ' + repr(vim.current.tabpage))
-cb.append('Current window: ' + repr(vim.current.window))
-cb.append('Current buffer: ' + repr(vim.current.buffer))
-cb.append('Current line: ' + repr(vim.current.line))
-ws = list(vim.windows)
-ts = list(vim.tabpages)
-for b in vim.buffers:
- if b is not cb:
- vim.command('bwipeout! ' + str(b.number))
-del b
-cb.append('w.valid: ' + repr([w.valid for w in ws]))
-cb.append('t.valid: ' + repr([t.valid for t in ts]))
-del w
-del t
-del ts
-del ws
-EOF
-:tabonly!
-:only!
-:"
-:" Test types
-py << EOF
-for expr, attr in (
- ('vim.vars', 'Dictionary'),
- ('vim.options', 'Options'),
- ('vim.bindeval("{}")', 'Dictionary'),
- ('vim.bindeval("[]")', 'List'),
- ('vim.bindeval("function(\'tr\')")', 'Function'),
- ('vim.current.buffer', 'Buffer'),
- ('vim.current.range', 'Range'),
- ('vim.current.window', 'Window'),
- ('vim.current.tabpage', 'TabPage'),
-):
- cb.append(expr + ':' + attr + ':' + repr(type(eval(expr)) is getattr(vim, attr)))
-del expr
-del attr
-EOF
-:"
-:" Test __dir__() method
-py << EOF
-for name, o in (
- ('current', vim.current),
- ('buffer', vim.current.buffer),
- ('window', vim.current.window),
- ('tabpage', vim.current.tabpage),
- ('range', vim.current.range),
- ('dictionary', vim.bindeval('{}')),
- ('list', vim.bindeval('[]')),
- ('function', vim.bindeval('function("tr")')),
- ('output', sys.stdout),
- ):
- cb.append(name + ':' + ','.join(dir(o)))
-del name
-del o
-EOF
-:"
-:" Test vim.*.__new__
-:$put =string(pyeval('vim.Dictionary({})'))
-:$put =string(pyeval('vim.Dictionary(a=1)'))
-:$put =string(pyeval('vim.Dictionary(((''a'', 1),))'))
-:$put =string(pyeval('vim.List()'))
-:$put =string(pyeval('vim.List(iter(''abc7''))'))
-:$put =string(pyeval('vim.Function(''tr'')'))
-:"
-:" Test stdout/stderr
-:redir => messages
-:py sys.stdout.write('abc8') ; sys.stdout.write('def')
-:py sys.stderr.write('abc9') ; sys.stderr.write('def')
-:py sys.stdout.writelines(iter('abcA'))
-:py sys.stderr.writelines(iter('abcB'))
-:redir END
-:$put =string(substitute(messages, '\d\+', '', 'g'))
-:" Test subclassing
-:fun Put(...)
-: $put =string(a:000)
-: return a:000
-:endfun
-py << EOF
-class DupDict(vim.Dictionary):
- def __setitem__(self, key, value):
- super(DupDict, self).__setitem__(key, value)
- super(DupDict, self).__setitem__('dup_' + key, value)
-dd = DupDict()
-dd['a'] = 'b'
-
-class DupList(vim.List):
- def __getitem__(self, idx):
- return [super(DupList, self).__getitem__(idx)] * 2
-
-dl = DupList()
-dl2 = DupList(iter('abcC'))
-dl.extend(dl2[0])
-
-class DupFun(vim.Function):
- def __call__(self, arg):
- return super(DupFun, self).__call__(arg, arg)
-
-df = DupFun('Put')
-EOF
-:$put =string(sort(keys(pyeval('dd'))))
-:$put =string(pyeval('dl'))
-:$put =string(pyeval('dl2'))
-:$put =string(pyeval('df(2)'))
-:$put =string(pyeval('dl') is# pyeval('dl'))
-:$put =string(pyeval('dd') is# pyeval('dd'))
-:$put =string(pyeval('df'))
-:delfunction Put
-py << EOF
-del DupDict
-del DupList
-del DupFun
-del dd
-del dl
-del dl2
-del df
-EOF
-:"
-:" Test chdir
-py << EOF
-import os
-fnamemodify = vim.Function('fnamemodify')
-cb.append(fnamemodify('.', ':p:h:t'))
-cb.append(vim.eval('@%'))
-os.chdir('..')
-path = fnamemodify('.', ':p:h:t')
-if path != 'src':
- # Running tests from a shadow directory, so move up another level
- # This will result in @% looking like shadow/testdir/test86.in, hence the
- # extra fnamemodify
- os.chdir('..')
- cb.append(fnamemodify('.', ':p:h:t'))
- cb.append(fnamemodify(vim.eval('@%'), ':s?^%s.??' % path).replace(os.path.sep, '/'))
- os.chdir(path)
- del path
-else:
- cb.append(fnamemodify('.', ':p:h:t'))
- cb.append(vim.eval('@%').replace(os.path.sep, '/'))
-os.chdir('testdir')
-cb.append(fnamemodify('.', ':p:h:t'))
-cb.append(vim.eval('@%'))
-del fnamemodify
-EOF
-:"
-:" Test errors
-:fun F() dict
-:endfun
-:fun D()
-:endfun
-py << EOF
-d = vim.Dictionary()
-ned = vim.Dictionary(foo='bar', baz='abcD')
-dl = vim.Dictionary(a=1)
-dl.locked = True
-l = vim.List()
-ll = vim.List('abcE')
-ll.locked = True
-nel = vim.List('abcO')
-f = vim.Function('string')
-fd = vim.Function('F')
-fdel = vim.Function('D')
-vim.command('delfunction D')
-
-def subexpr_test(expr, name, subexprs):
- cb.append('>>> Testing %s using %s' % (name, expr))
- for subexpr in subexprs:
- ee(expr % subexpr)
- cb.append('<<< Finished')
-
-def stringtochars_test(expr):
- return subexpr_test(expr, 'StringToChars', (
- '1', # Fail type checks
- 'u"\\0"', # Fail PyString_AsStringAndSize(bytes, , NULL) check
- '"\\0"', # Fail PyString_AsStringAndSize(object, , NULL) check
- ))
-
-class Mapping(object):
- def __init__(self, d):
- self.d = d
-
- def __getitem__(self, key):
- return self.d[key]
-
- def keys(self):
- return self.d.keys()
-
- def items(self):
- return self.d.items()
-
-def convertfrompyobject_test(expr, recurse=True):
- # pydict_to_tv
- stringtochars_test(expr % '{%s : 1}')
- if recurse:
- convertfrompyobject_test(expr % '{"abcF" : %s}', False)
- # pymap_to_tv
- stringtochars_test(expr % 'Mapping({%s : 1})')
- if recurse:
- convertfrompyobject_test(expr % 'Mapping({"abcG" : %s})', False)
- # pyseq_to_tv
- iter_test(expr)
- return subexpr_test(expr, 'ConvertFromPyObject', (
- 'None', # Not conversible
- '{"": 1}', # Empty key not allowed
- '{u"": 1}', # Same, but with unicode object
- 'FailingMapping()', #
- 'FailingMappingKey()', #
- 'FailingNumber()', #
- ))
-
-def convertfrompymapping_test(expr):
- convertfrompyobject_test(expr)
- return subexpr_test(expr, 'ConvertFromPyMapping', (
- '[]',
- ))
-
-def iter_test(expr):
- return subexpr_test(expr, '*Iter*', (
- 'FailingIter()',
- 'FailingIterNext()',
- ))
-
-def number_test(expr, natural=False, unsigned=False):
- if natural:
- unsigned = True
- return subexpr_test(expr, 'NumberToLong', (
- '[]',
- 'None',
- ) + (unsigned and ('-1',) or ())
- + (natural and ('0',) or ()))
-
-class FailingTrue(object):
- def __nonzero__(self):
- raise NotImplementedError('bool')
-
-class FailingIter(object):
- def __iter__(self):
- raise NotImplementedError('iter')
-
-class FailingIterNext(object):
- def __iter__(self):
- return self
-
- def next(self):
- raise NotImplementedError('next')
-
-class FailingIterNextN(object):
- def __init__(self, n):
- self.n = n
-
- def __iter__(self):
- return self
-
- def next(self):
- if self.n:
- self.n -= 1
- return 1
- else:
- raise NotImplementedError('next N')
-
-class FailingMappingKey(object):
- def __getitem__(self, item):
- raise NotImplementedError('getitem:mappingkey')
-
- def keys(self):
- return list("abcH")
-
-class FailingMapping(object):
- def __getitem__(self):
- raise NotImplementedError('getitem:mapping')
-
- def keys(self):
- raise NotImplementedError('keys')
-
-class FailingList(list):
- def __getitem__(self, idx):
- if i == 2:
- raise NotImplementedError('getitem:list')
- else:
- return super(FailingList, self).__getitem__(idx)
-
-class NoArgsCall(object):
- def __call__(self):
- pass
-
-class FailingCall(object):
- def __call__(self, path):
- raise NotImplementedError('call')
-
-class FailingNumber(object):
- def __int__(self):
- raise NotImplementedError('int')
-
-cb.append("> Output")
-cb.append(">> OutputSetattr")
-ee('del sys.stdout.softspace')
-number_test('sys.stdout.softspace = %s', unsigned=True)
-number_test('sys.stderr.softspace = %s', unsigned=True)
-ee('sys.stdout.attr = None')
-cb.append(">> OutputWrite")
-ee('sys.stdout.write(None)')
-cb.append(">> OutputWriteLines")
-ee('sys.stdout.writelines(None)')
-ee('sys.stdout.writelines([1])')
-iter_test('sys.stdout.writelines(%s)')
-cb.append("> VimCommand")
-stringtochars_test('vim.command(%s)')
-ee('vim.command("", 2)')
-#! Not checked: vim->python exceptions translating: checked later
-cb.append("> VimToPython")
-#! Not checked: everything: needs errors in internal python functions
-cb.append("> VimEval")
-stringtochars_test('vim.eval(%s)')
-ee('vim.eval("", FailingTrue())')
-#! Not checked: everything: needs errors in internal python functions
-cb.append("> VimEvalPy")
-stringtochars_test('vim.bindeval(%s)')
-ee('vim.eval("", 2)')
-#! Not checked: vim->python exceptions translating: checked later
-cb.append("> VimStrwidth")
-stringtochars_test('vim.strwidth(%s)')
-cb.append("> VimForeachRTP")
-ee('vim.foreach_rtp(None)')
-ee('vim.foreach_rtp(NoArgsCall())')
-ee('vim.foreach_rtp(FailingCall())')
-ee('vim.foreach_rtp(int, 2)')
-cb.append('> import')
-old_rtp = vim.options['rtp']
-vim.options['rtp'] = os.getcwd().replace(',', '\\,').replace('\\', '\\\\')
-ee('import xxx_no_such_module_xxx')
-ee('import failing_import')
-ee('import failing')
-vim.options['rtp'] = old_rtp
-del old_rtp
-cb.append("> Options")
-cb.append(">> OptionsItem")
-ee('vim.options["abcQ"]')
-ee('vim.options[""]')
-stringtochars_test('vim.options[%s]')
-cb.append(">> OptionsContains")
-stringtochars_test('%s in vim.options')
-cb.append("> Dictionary")
-cb.append(">> DictionaryConstructor")
-ee('vim.Dictionary("abcI")')
-##! Not checked: py_dict_alloc failure
-cb.append(">> DictionarySetattr")
-ee('del d.locked')
-ee('d.locked = FailingTrue()')
-ee('vim.vvars.locked = False')
-ee('d.scope = True')
-ee('d.xxx = True')
-cb.append(">> _DictionaryItem")
-ee('d.get("a", 2, 3)')
-stringtochars_test('d.get(%s)')
-ee('d.pop("a")')
-ee('dl.pop("a")')
-cb.append(">> DictionaryContains")
-ee('"" in d')
-ee('0 in d')
-cb.append(">> DictionaryIterNext")
-ee('for i in ned: ned["a"] = 1')
-del i
-cb.append(">> DictionaryAssItem")
-ee('dl["b"] = 1')
-stringtochars_test('d[%s] = 1')
-convertfrompyobject_test('d["a"] = %s')
-cb.append(">> DictionaryUpdate")
-cb.append(">>> kwargs")
-cb.append(">>> iter")
-ee('d.update(FailingMapping())')
-ee('d.update([FailingIterNext()])')
-ee('d.update([FailingIterNextN(1)])')
-iter_test('d.update(%s)')
-convertfrompyobject_test('d.update(%s)')
-stringtochars_test('d.update(((%s, 0),))')
-convertfrompyobject_test('d.update((("a", %s),))')
-cb.append(">> DictionaryPopItem")
-ee('d.popitem(1, 2)')
-cb.append(">> DictionaryHasKey")
-ee('d.has_key()')
-cb.append("> List")
-cb.append(">> ListConstructor")
-ee('vim.List(1, 2)')
-ee('vim.List(a=1)')
-iter_test('vim.List(%s)')
-convertfrompyobject_test('vim.List([%s])')
-cb.append(">> ListItem")
-ee('l[1000]')
-cb.append(">> ListAssItem")
-ee('ll[1] = 2')
-ee('l[1000] = 3')
-cb.append(">> ListAssSlice")
-ee('ll[1:100] = "abcJ"')
-iter_test('l[:] = %s')
-ee('nel[1:10:2] = "abcK"')
-cb.append(repr(tuple(nel)))
-ee('nel[1:10:2] = "a"')
-cb.append(repr(tuple(nel)))
-ee('nel[1:1:-1] = "a"')
-cb.append(repr(tuple(nel)))
-ee('nel[:] = FailingIterNextN(2)')
-cb.append(repr(tuple(nel)))
-convertfrompyobject_test('l[:] = [%s]')
-cb.append(">> ListConcatInPlace")
-iter_test('l.extend(%s)')
-convertfrompyobject_test('l.extend([%s])')
-cb.append(">> ListSetattr")
-ee('del l.locked')
-ee('l.locked = FailingTrue()')
-ee('l.xxx = True')
-cb.append("> Function")
-cb.append(">> FunctionConstructor")
-ee('vim.Function("123")')
-ee('vim.Function("xxx_non_existent_function_xxx")')
-ee('vim.Function("xxx#non#existent#function#xxx")')
-cb.append(">> FunctionCall")
-convertfrompyobject_test('f(%s)')
-convertfrompymapping_test('fd(self=%s)')
-cb.append("> TabPage")
-cb.append(">> TabPageAttr")
-ee('vim.current.tabpage.xxx')
-cb.append("> TabList")
-cb.append(">> TabListItem")
-ee('vim.tabpages[1000]')
-cb.append("> Window")
-cb.append(">> WindowAttr")
-ee('vim.current.window.xxx')
-cb.append(">> WindowSetattr")
-ee('vim.current.window.buffer = 0')
-ee('vim.current.window.cursor = (100000000, 100000000)')
-ee('vim.current.window.cursor = True')
-number_test('vim.current.window.height = %s', unsigned=True)
-number_test('vim.current.window.width = %s', unsigned=True)
-ee('vim.current.window.xxxxxx = True')
-cb.append("> WinList")
-cb.append(">> WinListItem")
-ee('vim.windows[1000]')
-cb.append("> Buffer")
-cb.append(">> StringToLine (indirect)")
-ee('vim.current.buffer[0] = u"\\na"')
-ee('vim.current.buffer[0] = "\\na"')
-cb.append(">> SetBufferLine (indirect)")
-ee('vim.current.buffer[0] = True')
-cb.append(">> SetBufferLineList (indirect)")
-ee('vim.current.buffer[:] = True')
-ee('vim.current.buffer[:] = ["\\na", "bc"]')
-cb.append(">> InsertBufferLines (indirect)")
-ee('vim.current.buffer.append(None)')
-ee('vim.current.buffer.append(["\\na", "bc"])')
-ee('vim.current.buffer.append("\\nbc")')
-cb.append(">> RBItem")
-ee('vim.current.buffer[100000000]')
-cb.append(">> RBAsItem")
-ee('vim.current.buffer[100000000] = ""')
-cb.append(">> BufferAttr")
-ee('vim.current.buffer.xxx')
-cb.append(">> BufferSetattr")
-ee('vim.current.buffer.name = True')
-ee('vim.current.buffer.xxx = True')
-cb.append(">> BufferMark")
-ee('vim.current.buffer.mark(0)')
-ee('vim.current.buffer.mark("abcM")')
-ee('vim.current.buffer.mark("!")')
-cb.append(">> BufferRange")
-ee('vim.current.buffer.range(1, 2, 3)')
-cb.append("> BufMap")
-cb.append(">> BufMapItem")
-ee('vim.buffers[100000000]')
-number_test('vim.buffers[%s]', natural=True)
-cb.append("> Current")
-cb.append(">> CurrentGetattr")
-ee('vim.current.xxx')
-cb.append(">> CurrentSetattr")
-ee('vim.current.line = True')
-ee('vim.current.buffer = True')
-ee('vim.current.window = True')
-ee('vim.current.tabpage = True')
-ee('vim.current.xxx = True')
-del d
-del ned
-del dl
-del l
-del ll
-del nel
-del f
-del fd
-del fdel
-del subexpr_test
-del stringtochars_test
-del Mapping
-del convertfrompyobject_test
-del convertfrompymapping_test
-del iter_test
-del number_test
-del FailingTrue
-del FailingIter
-del FailingIterNext
-del FailingIterNextN
-del FailingMapping
-del FailingMappingKey
-del FailingList
-del NoArgsCall
-del FailingCall
-del FailingNumber
-EOF
-:delfunction F
-:"
-:" Test import
-py << EOF
-sys.path.insert(0, os.path.join(os.getcwd(), 'python_before'))
-sys.path.append(os.path.join(os.getcwd(), 'python_after'))
-vim.options['rtp'] = os.getcwd().replace(',', '\\,').replace('\\', '\\\\')
-l = []
-def callback(path):
- l.append(path[-len('/testdir'):].replace(os.path.sep, '/'))
-vim.foreach_rtp(callback)
-cb.append(repr(l))
-del l
-def callback(path):
- return path[-len('/testdir'):].replace(os.path.sep, '/')
-cb.append(repr(vim.foreach_rtp(callback)))
-del callback
-from module import dir as d
-from modulex import ddir
-cb.append(d + ',' + ddir)
-import before
-cb.append(before.dir)
-import after
-cb.append(after.dir)
-import topmodule as tm
-import topmodule.submodule as tms
-import topmodule.submodule.subsubmodule.subsubsubmodule as tmsss
-cb.append(tm.__file__.replace('.pyc', '.py').replace(os.path.sep, '/')[-len('modulex/topmodule/__init__.py'):])
-cb.append(tms.__file__.replace('.pyc', '.py').replace(os.path.sep, '/')[-len('modulex/topmodule/submodule/__init__.py'):])
-cb.append(tmsss.__file__.replace('.pyc', '.py').replace(os.path.sep, '/')[-len('modulex/topmodule/submodule/subsubmodule/subsubsubmodule.py'):])
-del before
-del after
-del d
-del ddir
-del tm
-del tms
-del tmsss
-EOF
-:"
-:" Test exceptions
-:fun Exe(e)
-: execute a:e
-:endfun
-py << EOF
-Exe = vim.bindeval('function("Exe")')
-ee('vim.command("throw \'abcN\'")')
-ee('Exe("throw \'def\'")')
-ee('vim.eval("Exe(\'throw \'\'ghi\'\'\')")')
-ee('vim.eval("Exe(\'echoerr \'\'jkl\'\'\')")')
-ee('vim.eval("Exe(\'xxx_non_existent_command_xxx\')")')
-ee('vim.eval("xxx_unknown_function_xxx()")')
-ee('vim.bindeval("Exe(\'xxx_non_existent_command_xxx\')")')
-del Exe
-EOF
-:delfunction Exe
-:"
-:" Regression: interrupting vim.command propagates to next vim.command
-py << EOF
-def test_keyboard_interrupt():
- try:
- vim.command('while 1 | endwhile')
- except KeyboardInterrupt:
- cb.append('Caught KeyboardInterrupt')
- except Exception:
- cb.append('!!!!!!!! Caught exception: ' + repr(sys.exc_info))
- else:
- cb.append('!!!!!!!! No exception')
- try:
- vim.command('$ put =\'Running :put\'')
- except KeyboardInterrupt:
- cb.append('!!!!!!!! Caught KeyboardInterrupt')
- except Exception:
- cb.append('!!!!!!!! Caught exception: ' + repr(sys.exc_info))
- else:
- cb.append('No exception')
-EOF
-:debuggreedy
-:call inputsave()
-:call feedkeys("s\ns\ns\ns\nq\n")
-:redir => output
-:debug silent! py test_keyboard_interrupt()
-:redir END
-:0 debuggreedy
-:call inputrestore()
-:silent $put =output
-:unlet output
-:py del test_keyboard_interrupt
-:"
-:" Cleanup
-py << EOF
-del cb
-del ee
-del sys
-del os
-del vim
-EOF
-:endfun
-:"
-:fun RunTest()
-:let checkrefs = !empty($PYTHONDUMPREFS)
-:let start = getline(1, '$')
-:for i in range(checkrefs ? 10 : 1)
-: if i != 0
-: %d _
-: call setline(1, start)
-: endif
-: call Test()
-: if i == 0
-: let result = getline(1, '$')
-: endif
-:endfor
-:if checkrefs
-: %d _
-: call setline(1, result)
-:endif
-:endfun
-:"
-:call RunTest()
-:delfunction RunTest
-:delfunction Test
-:call garbagecollect(1)
-:"
-:/^start:/,$wq! test.out
-:" vim: et ts=4 isk-=\:
-:call getchar()
-ENDTEST
-
-start:
diff --git a/src/nvim/testdir/test86.ok b/src/nvim/testdir/test86.ok
deleted file mode 100644
index 257a5ee4cd..0000000000
--- a/src/nvim/testdir/test86.ok
+++ /dev/null
@@ -1,1266 +0,0 @@
-start:
-[1, 'as''d', [1, 2, function('strlen'), {'a': 1}]]
-[1, 2, function('strlen'), {'a': 1}]
-Vim(put):E684:
-[0, 'as''d', [1, 2, function('strlen'), {'a': 1}]]
-[0, function('strlen'), [1, 2, function('strlen'), {'a': 1}]]
-1
-['-1', '0', '1', 'b', 'f']
-['asd', -1L, <vim.Function '1'>, <vim.dictionary object at >, <vim.list object at >]
-[('-1', <vim.dictionary object at >), ('0', -1L), ('1', 'asd'), ('b', <vim.list object at >), ('f', <vim.Function '1'>)]
-'-1' : {'a': 1}
-'0' : -1
-'1' : 'asd'
-'b' : [1, 2, function('strlen')]
-'f' : function('1')
-[0, function('strlen')]
-[3]
-[1, 2, function('strlen')]
-[1, 2, function('strlen')]
-1
-'asd'
-2
-True
-False
-True
-False
-['0']
-{'0': -1}
-('0', -1L)
-None
-[]
-[0, 1, 2, 3]
-[0, 1, 2, 3]
-[0, 1, 3]
-[0, 1]
-[0, 1]
-[0, 1]
-[0, 1, 2, 3]
-[0, 1, 2, 3]
-[0, 2, 3]
-[2, 3]
-[2, 3]
-[2, 3]
-[1, 3]
-[0, 2]
-[0, 1, 2, 3]
-['a', 0, 1, 2, 3]
-[0, 'b', 2, 3]
-[0, 1, 'c']
-[0, 1, 2, 3, 'd']
-[0, 1, 2, 'e', 3]
-['f', 2, 3]
-[0, 1, 'g', 2, 3]
-['h']
-[0, 1, 10, 3, 20, 5, 6, 7]
-[0, 1, 2, 3, 20, 5, 10, 7]
-[0, 1, 2, 3, 4, 5, 6, 7]
-[0, 1, 2, 3, 4, 5, 6, 7]
-[0, 1, 2, 3, 4, 5, 6, 7]
-[0, 1, 2, 3]
-[function('New'), function('DictNew'), 'NewStart', 1, 2, 3, 'NewEnd']
-[function('New'), function('DictNew'), 'NewStart', 1, 2, 3, 'NewEnd', 'DictNewStart', 1, 2, 3, 'DictNewEnd', {'a': 'b'}]
-[function('New'), function('DictNew'), 'NewStart', 1, 2, 3, 'NewEnd', 'DictNewStart', 1, 2, 3, 'DictNewEnd', {'a': 'b'}, 'New']
-l[1](1, 2, 3):error:('Vim:E725: Calling dict function without Dictionary: DictNew',)
-f(1, 2, 3):error:('Vim:E117: Unknown function: New',)
-[0.0, 0.0]
-KeyError
-TypeError
-TypeError
-ValueError
-TypeError
-TypeError
-KeyError
-KeyError
-d : locked:0;scope:0
-dl : locked:1;scope:0
-v: : locked:2;scope:1
-g: : locked:0;scope:2
-d:{'abc2': 1}
-dl:{'def': 1}
-l : locked:0
-ll : locked:1
-l:[0]
-ll:[1]
-[0, 1, 2]
-['a', 'b']
-['c', 1]
-['d', ['e']]
-0.0
-"\0": Vim(let):E859:
-{"\0": 1}: Vim(let):E859:
-undefined_name: Vim(let):Trace
-vim: Vim(let):E859:
-[1]
-[1, 10, 11, 10, 11, 10, 11, 10, 11, 10, 11, 10, 1]
-[0, 1, 2, 3]
-[2, 3, 4, 5]
-[0, 1]
-[4, 5]
-[2, 3]
-[]
-[2, 3]
-[]
-[0, 1, 2, 3, 4, 5]
-[0, 1, 2, 3, 4, 5]
-[0, 1, 2, 3, 4, 5]
-[4, 3]
-[0, 2, 4]
-[]
-Abc
-bac
-def
-bar
-jkl
-wopts iters equal: 1
-bopts iters equal: 1
->>> paste
- g/w/b:1/0/0
- g/w/b (in):1/0/0
- p/gopts1: False
- p/wopts1! KeyError
- inv: 2! KeyError
- wopts1! KeyError
- wopts2! KeyError
- wopts3! KeyError
- p/bopts1! KeyError
- inv: 2! KeyError
- bopts1! KeyError
- bopts2! KeyError
- bopts3! KeyError
- G: 1
- W: 1:1 2:1 3:1 4:1
- B: 1:1 2:1 3:1 4:1
- del wopts3! KeyError
- del bopts3! KeyError
- G: 1
- W: 1:1 2:1 3:1 4:1
- B: 1:1 2:1 3:1 4:1
->>> previewheight
- g/w/b:1/0/0
- g/w/b (in):1/0/0
- p/gopts1: 12
- inv: 'a'! TypeError
- p/wopts1! KeyError
- inv: 'a'! KeyError
- wopts1! KeyError
- wopts2! KeyError
- wopts3! KeyError
- p/bopts1! KeyError
- inv: 'a'! KeyError
- bopts1! KeyError
- bopts2! KeyError
- bopts3! KeyError
- G: 5
- W: 1:5 2:5 3:5 4:5
- B: 1:5 2:5 3:5 4:5
- del wopts3! KeyError
- del bopts3! KeyError
- G: 5
- W: 1:5 2:5 3:5 4:5
- B: 1:5 2:5 3:5 4:5
->>> operatorfunc
- g/w/b:1/0/0
- g/w/b (in):1/0/0
- p/gopts1: ''
- inv: 2! TypeError
- p/wopts1! KeyError
- inv: 2! KeyError
- wopts1! KeyError
- wopts2! KeyError
- wopts3! KeyError
- p/bopts1! KeyError
- inv: 2! KeyError
- bopts1! KeyError
- bopts2! KeyError
- bopts3! KeyError
- G: 'A'
- W: 1:'A' 2:'A' 3:'A' 4:'A'
- B: 1:'A' 2:'A' 3:'A' 4:'A'
- del wopts3! KeyError
- del bopts3! KeyError
- G: 'A'
- W: 1:'A' 2:'A' 3:'A' 4:'A'
- B: 1:'A' 2:'A' 3:'A' 4:'A'
->>> number
- g/w/b:0/1/0
- g/w/b (in):0/1/0
- p/gopts1! KeyError
- inv: 0! KeyError
- gopts1! KeyError
- p/wopts1: False
- p/bopts1! KeyError
- inv: 0! KeyError
- bopts1! KeyError
- bopts2! KeyError
- bopts3! KeyError
- G: 0
- W: 1:1 2:1 3:0 4:0
- B: 1:1 2:1 3:0 4:0
- del wopts3! ValueError
- del bopts3! KeyError
- G: 0
- W: 1:1 2:1 3:0 4:0
- B: 1:1 2:1 3:0 4:0
->>> numberwidth
- g/w/b:0/1/0
- g/w/b (in):0/1/0
- p/gopts1! KeyError
- inv: -100! KeyError
- gopts1! KeyError
- p/wopts1: 8
- inv: -100! error
- p/bopts1! KeyError
- inv: -100! KeyError
- bopts1! KeyError
- bopts2! KeyError
- bopts3! KeyError
- G: 8
- W: 1:3 2:5 3:2 4:8
- B: 1:3 2:5 3:2 4:8
- del wopts3! ValueError
- del bopts3! KeyError
- G: 8
- W: 1:3 2:5 3:2 4:8
- B: 1:3 2:5 3:2 4:8
->>> colorcolumn
- g/w/b:0/1/0
- g/w/b (in):0/1/0
- p/gopts1! KeyError
- inv: 'abc4'! KeyError
- gopts1! KeyError
- p/wopts1: ''
- inv: 'abc4'! error
- p/bopts1! KeyError
- inv: 'abc4'! KeyError
- bopts1! KeyError
- bopts2! KeyError
- bopts3! KeyError
- G: ''
- W: 1:'+2' 2:'+3' 3:'+1' 4:''
- B: 1:'+2' 2:'+3' 3:'+1' 4:''
- del wopts3! ValueError
- del bopts3! KeyError
- G: ''
- W: 1:'+2' 2:'+3' 3:'+1' 4:''
- B: 1:'+2' 2:'+3' 3:'+1' 4:''
->>> statusline
- g/w/b:1/1/0
- g/w/b (in):1/1/0
- p/gopts1: ''
- inv: 0! TypeError
- p/wopts1: None
- inv: 0! TypeError
- p/bopts1! KeyError
- inv: 0! KeyError
- bopts1! KeyError
- bopts2! KeyError
- bopts3! KeyError
- G: '1'
- W: 1:'2' 2:'4' 3:'1' 4:'1'
- B: 1:'2' 2:'4' 3:'1' 4:'1'
- del bopts3! KeyError
- G: '1'
- W: 1:'2' 2:'1' 3:'1' 4:'1'
- B: 1:'2' 2:'1' 3:'1' 4:'1'
->>> autoindent
- g/w/b:0/0/1
- g/w/b (in):0/0/1
- p/gopts1! KeyError
- inv: 2! KeyError
- gopts1! KeyError
- p/wopts1! KeyError
- inv: 2! KeyError
- wopts1! KeyError
- wopts2! KeyError
- wopts3! KeyError
- p/bopts1: False
- G: 0
- W: 1:0 2:1 3:0 4:1
- B: 1:0 2:1 3:0 4:1
- del wopts3! KeyError
- del bopts3! ValueError
- G: 0
- W: 1:0 2:1 3:0 4:1
- B: 1:0 2:1 3:0 4:1
->>> shiftwidth
- g/w/b:0/0/1
- g/w/b (in):0/0/1
- p/gopts1! KeyError
- inv: 3! KeyError
- gopts1! KeyError
- p/wopts1! KeyError
- inv: 3! KeyError
- wopts1! KeyError
- wopts2! KeyError
- wopts3! KeyError
- p/bopts1: 8
- G: 8
- W: 1:0 2:2 3:8 4:1
- B: 1:0 2:2 3:8 4:1
- del wopts3! KeyError
- del bopts3! ValueError
- G: 8
- W: 1:0 2:2 3:8 4:1
- B: 1:0 2:2 3:8 4:1
->>> omnifunc
- g/w/b:0/0/1
- g/w/b (in):0/0/1
- p/gopts1! KeyError
- inv: 1! KeyError
- gopts1! KeyError
- p/wopts1! KeyError
- inv: 1! KeyError
- wopts1! KeyError
- wopts2! KeyError
- wopts3! KeyError
- p/bopts1: ''
- inv: 1! TypeError
- G: ''
- W: 1:'A' 2:'B' 3:'' 4:'C'
- B: 1:'A' 2:'B' 3:'' 4:'C'
- del wopts3! KeyError
- del bopts3! ValueError
- G: ''
- W: 1:'A' 2:'B' 3:'' 4:'C'
- B: 1:'A' 2:'B' 3:'' 4:'C'
->>> preserveindent
- g/w/b:0/0/1
- g/w/b (in):0/0/1
- p/gopts1! KeyError
- inv: 2! KeyError
- gopts1! KeyError
- p/wopts1! KeyError
- inv: 2! KeyError
- wopts1! KeyError
- wopts2! KeyError
- wopts3! KeyError
- p/bopts1: False
- G: 0
- W: 1:0 2:1 3:0 4:1
- B: 1:0 2:1 3:0 4:1
- del wopts3! KeyError
- del bopts3! ValueError
- G: 0
- W: 1:0 2:1 3:0 4:1
- B: 1:0 2:1 3:0 4:1
->>> path
- g/w/b:1/0/1
- g/w/b (in):1/0/1
- p/gopts1: '.,..,,'
- inv: 0! TypeError
- p/wopts1! KeyError
- inv: 0! KeyError
- wopts1! KeyError
- wopts2! KeyError
- wopts3! KeyError
- p/bopts1: None
- inv: 0! TypeError
- G: '.,,'
- W: 1:'.,,' 2:',,' 3:'.,,' 4:'.'
- B: 1:'.,,' 2:',,' 3:'.,,' 4:'.'
- del wopts3! KeyError
- G: '.,,'
- W: 1:'.,,' 2:',,' 3:'.,,' 4:'.,,'
- B: 1:'.,,' 2:',,' 3:'.,,' 4:'.,,'
-First line
-First line
-def
-First line
-Second line
-Third line
-(7, 2)
-<buffer test86.in><buffer >
-baz
-bar
-Second line
-Third line
-foo
-1:BufFilePre:1
-1:BufFilePost:1
-testdir/foo
-5:BufFilePre:5
-5:BufFilePost:5
-testdir/bar
-1:BufFilePre:1
-1:BufFilePost:1
-testdir/test86.in
-valid: b:False, cb:True
-i:<buffer test86.in>
-i2:<buffer test86.in>
-i:<buffer a>
-i3:<buffer test86.in>
-1:<buffer test86.in>=<buffer test86.in>
-8:<buffer a>=<buffer a>
-9:<buffer b>=<buffer b>
-10:<buffer c>=<buffer c>
-4
-i4:<buffer test86.in>
-i4:<buffer test86.in>
-StopIteration
-Number of tabs: 4
-Current tab pages:
- <tabpage 0>(1): 1 windows, current is <window object (unknown)>
- Windows:
- <window object (unknown)>(1): displays buffer <buffer test86.in>; cursor is at (37, 0)
- <tabpage 1>(2): 1 windows, current is <window object (unknown)>
- Windows:
- <window object (unknown)>(1): displays buffer <buffer 0>; cursor is at (1, 0)
- <tabpage 2>(3): 2 windows, current is <window object (unknown)>
- Windows:
- <window object (unknown)>(1): displays buffer <buffer a.1>; cursor is at (1, 0)
- <window object (unknown)>(2): displays buffer <buffer 1>; cursor is at (1, 0)
- <tabpage 3>(4): 4 windows, current is <window 0>
- Windows:
- <window 0>(1): displays buffer <buffer c.2>; cursor is at (1, 0)
- <window 1>(2): displays buffer <buffer b.2>; cursor is at (1, 0)
- <window 2>(3): displays buffer <buffer a.2>; cursor is at (1, 0)
- <window 3>(4): displays buffer <buffer 2>; cursor is at (1, 0)
-Number of windows in current tab page: 4
-Current tab page: <tabpage 3>
-Current window: <window 0>: <window 0> is <window 0>
-Current buffer: <buffer c.2>: <buffer c.2> is <buffer c.2> is <buffer c.2>
-ValueError at assigning foreign tab window
-Type error at assigning None to vim.current.window
-Type error at assigning None to vim.current.tabpage
-Type error at assigning None to vim.current.buffer
-Current tab page: <tabpage 2>
-Current window: <window 0>
-Current buffer: <buffer test86.in>
-Current line: 'Type error at assigning None to vim.current.buffer'
-w.valid: [True, False]
-t.valid: [True, False, True, False]
-vim.vars:Dictionary:True
-vim.options:Options:True
-vim.bindeval("{}"):Dictionary:True
-vim.bindeval("[]"):List:True
-vim.bindeval("function('tr')"):Function:True
-vim.current.buffer:Buffer:True
-vim.current.range:Range:True
-vim.current.window:Window:True
-vim.current.tabpage:TabPage:True
-current:__dir__,__members__,buffer,line,range,tabpage,window
-buffer:__dir__,__members__,append,mark,name,number,options,range,valid,vars
-window:__dir__,__members__,buffer,col,cursor,height,number,options,row,tabpage,valid,vars
-tabpage:__dir__,__members__,number,valid,vars,window,windows
-range:__dir__,__members__,append,end,start
-dictionary:__dir__,__members__,get,has_key,items,keys,locked,pop,popitem,scope,update,values
-list:__dir__,__members__,extend,locked
-function:__dir__,__members__,softspace
-output:__dir__,__members__,flush,softspace,write,writelines
-{}
-{'a': 1}
-{'a': 1}
-[]
-['a', 'b', 'c', '7']
-function('tr')
-'
-abcdef
-line :
-abcdef
-abcA
-line :
-abcB'
-['a', 'dup_a']
-['a', 'a']
-['a', 'b', 'c', 'C']
-[2, 2]
-[2, 2]
-1
-1
-function('Put')
-testdir
-test86.in
-src
-testdir/test86.in
-testdir
-test86.in
-> Output
->> OutputSetattr
-del sys.stdout.softspace:AttributeError:("can't delete OutputObject attributes",)
->>> Testing NumberToLong using sys.stdout.softspace = %s
-sys.stdout.softspace = []:TypeError:('expected int(), long() or something supporting coercing to long(), but got list',)
-sys.stdout.softspace = None:TypeError:('expected int(), long() or something supporting coercing to long(), but got NoneType',)
-sys.stdout.softspace = -1:ValueError:('number must be greater or equal to zero',)
-<<< Finished
->>> Testing NumberToLong using sys.stderr.softspace = %s
-sys.stderr.softspace = []:TypeError:('expected int(), long() or something supporting coercing to long(), but got list',)
-sys.stderr.softspace = None:TypeError:('expected int(), long() or something supporting coercing to long(), but got NoneType',)
-sys.stderr.softspace = -1:ValueError:('number must be greater or equal to zero',)
-<<< Finished
-sys.stdout.attr = None:AttributeError:('invalid attribute: attr',)
->> OutputWrite
-sys.stdout.write(None):TypeError:('coercing to Unicode: need string or buffer, NoneType found',)
->> OutputWriteLines
-sys.stdout.writelines(None):TypeError:("'NoneType' object is not iterable",)
-sys.stdout.writelines([1]):TypeError:('coercing to Unicode: need string or buffer, int found',)
->>> Testing *Iter* using sys.stdout.writelines(%s)
-sys.stdout.writelines(FailingIter()):NotImplementedError:('iter',)
-sys.stdout.writelines(FailingIterNext()):NotImplementedError:('next',)
-<<< Finished
-> VimCommand
->>> Testing StringToChars using vim.command(%s)
-vim.command(1):TypeError:('expected str() or unicode() instance, but got int',)
-vim.command(u"\0"):TypeError:('expected string without null bytes',)
-vim.command("\0"):TypeError:('expected string without null bytes',)
-<<< Finished
-vim.command("", 2):TypeError:('command() takes exactly one argument (2 given)',)
-> VimToPython
-> VimEval
->>> Testing StringToChars using vim.eval(%s)
-vim.eval(1):TypeError:('expected str() or unicode() instance, but got int',)
-vim.eval(u"\0"):TypeError:('expected string without null bytes',)
-vim.eval("\0"):TypeError:('expected string without null bytes',)
-<<< Finished
-vim.eval("", FailingTrue()):TypeError:('function takes exactly 1 argument (2 given)',)
-> VimEvalPy
->>> Testing StringToChars using vim.bindeval(%s)
-vim.bindeval(1):TypeError:('expected str() or unicode() instance, but got int',)
-vim.bindeval(u"\0"):TypeError:('expected string without null bytes',)
-vim.bindeval("\0"):TypeError:('expected string without null bytes',)
-<<< Finished
-vim.eval("", 2):TypeError:('function takes exactly 1 argument (2 given)',)
-> VimStrwidth
->>> Testing StringToChars using vim.strwidth(%s)
-vim.strwidth(1):TypeError:('expected str() or unicode() instance, but got int',)
-vim.strwidth(u"\0"):TypeError:('expected string without null bytes',)
-vim.strwidth("\0"):TypeError:('expected string without null bytes',)
-<<< Finished
-> VimForeachRTP
-vim.foreach_rtp(None):TypeError:("'NoneType' object is not callable",)
-vim.foreach_rtp(NoArgsCall()):TypeError:('__call__() takes exactly 1 argument (2 given)',)
-vim.foreach_rtp(FailingCall()):NotImplementedError:('call',)
-vim.foreach_rtp(int, 2):TypeError:('foreach_rtp() takes exactly one argument (2 given)',)
-> import
-import xxx_no_such_module_xxx:ImportError:('No module named xxx_no_such_module_xxx',)
-import failing_import:ImportError:('No module named failing_import',)
-import failing:NotImplementedError:()
-> Options
->> OptionsItem
-vim.options["abcQ"]:KeyError:('abcQ',)
-vim.options[""]:ValueError:('empty keys are not allowed',)
->>> Testing StringToChars using vim.options[%s]
-vim.options[1]:TypeError:('expected str() or unicode() instance, but got int',)
-vim.options[u"\0"]:TypeError:('expected string without null bytes',)
-vim.options["\0"]:TypeError:('expected string without null bytes',)
-<<< Finished
->> OptionsContains
->>> Testing StringToChars using %s in vim.options
-1 in vim.options:TypeError:('expected str() or unicode() instance, but got int',)
-u"\0" in vim.options:TypeError:('expected string without null bytes',)
-"\0" in vim.options:TypeError:('expected string without null bytes',)
-<<< Finished
-> Dictionary
->> DictionaryConstructor
-vim.Dictionary("abcI"):ValueError:('expected sequence element of size 2, but got sequence of size 1',)
->> DictionarySetattr
-del d.locked:AttributeError:('cannot delete vim.Dictionary attributes',)
-d.locked = FailingTrue():NotImplementedError:('bool',)
-vim.vvars.locked = False:TypeError:('cannot modify fixed dictionary',)
-d.scope = True:AttributeError:('cannot set attribute scope',)
-d.xxx = True:AttributeError:('cannot set attribute xxx',)
->> _DictionaryItem
-d.get("a", 2, 3):TypeError:('function takes at most 2 arguments (3 given)',)
->>> Testing StringToChars using d.get(%s)
-d.get(1):TypeError:('expected str() or unicode() instance, but got int',)
-d.get(u"\0"):TypeError:('expected string without null bytes',)
-d.get("\0"):TypeError:('expected string without null bytes',)
-<<< Finished
-d.pop("a"):KeyError:('a',)
-dl.pop("a"):error:('dictionary is locked',)
->> DictionaryContains
-"" in d:ValueError:('empty keys are not allowed',)
-0 in d:TypeError:('expected str() or unicode() instance, but got int',)
->> DictionaryIterNext
-for i in ned: ned["a"] = 1:RuntimeError:('hashtab changed during iteration',)
->> DictionaryAssItem
-dl["b"] = 1:error:('dictionary is locked',)
->>> Testing StringToChars using d[%s] = 1
-d[1] = 1:TypeError:('expected str() or unicode() instance, but got int',)
-d[u"\0"] = 1:TypeError:('expected string without null bytes',)
-d["\0"] = 1:TypeError:('expected string without null bytes',)
-<<< Finished
->>> Testing StringToChars using d["a"] = {%s : 1}
-d["a"] = {1 : 1}:TypeError:('expected str() or unicode() instance, but got int',)
-d["a"] = {u"\0" : 1}:TypeError:('expected string without null bytes',)
-d["a"] = {"\0" : 1}:TypeError:('expected string without null bytes',)
-<<< Finished
->>> Testing StringToChars using d["a"] = {"abcF" : {%s : 1}}
-d["a"] = {"abcF" : {1 : 1}}:TypeError:('expected str() or unicode() instance, but got int',)
-d["a"] = {"abcF" : {u"\0" : 1}}:TypeError:('expected string without null bytes',)
-d["a"] = {"abcF" : {"\0" : 1}}:TypeError:('expected string without null bytes',)
-<<< Finished
->>> Testing StringToChars using d["a"] = {"abcF" : Mapping({%s : 1})}
-d["a"] = {"abcF" : Mapping({1 : 1})}:TypeError:('expected str() or unicode() instance, but got int',)
-d["a"] = {"abcF" : Mapping({u"\0" : 1})}:TypeError:('expected string without null bytes',)
-d["a"] = {"abcF" : Mapping({"\0" : 1})}:TypeError:('expected string without null bytes',)
-<<< Finished
->>> Testing *Iter* using d["a"] = {"abcF" : %s}
-d["a"] = {"abcF" : FailingIter()}:TypeError:('unable to convert FailingIter to vim structure',)
-d["a"] = {"abcF" : FailingIterNext()}:NotImplementedError:('next',)
-<<< Finished
->>> Testing ConvertFromPyObject using d["a"] = {"abcF" : %s}
-d["a"] = {"abcF" : None}:TypeError:('unable to convert NoneType to vim structure',)
-d["a"] = {"abcF" : {"": 1}}:ValueError:('empty keys are not allowed',)
-d["a"] = {"abcF" : {u"": 1}}:ValueError:('empty keys are not allowed',)
-d["a"] = {"abcF" : FailingMapping()}:NotImplementedError:('keys',)
-d["a"] = {"abcF" : FailingMappingKey()}:NotImplementedError:('getitem:mappingkey',)
-d["a"] = {"abcF" : FailingNumber()}:TypeError:('long() argument must be a string or a number',)
-<<< Finished
->>> Testing StringToChars using d["a"] = Mapping({%s : 1})
-d["a"] = Mapping({1 : 1}):TypeError:('expected str() or unicode() instance, but got int',)
-d["a"] = Mapping({u"\0" : 1}):TypeError:('expected string without null bytes',)
-d["a"] = Mapping({"\0" : 1}):TypeError:('expected string without null bytes',)
-<<< Finished
->>> Testing StringToChars using d["a"] = Mapping({"abcG" : {%s : 1}})
-d["a"] = Mapping({"abcG" : {1 : 1}}):TypeError:('expected str() or unicode() instance, but got int',)
-d["a"] = Mapping({"abcG" : {u"\0" : 1}}):TypeError:('expected string without null bytes',)
-d["a"] = Mapping({"abcG" : {"\0" : 1}}):TypeError:('expected string without null bytes',)
-<<< Finished
->>> Testing StringToChars using d["a"] = Mapping({"abcG" : Mapping({%s : 1})})
-d["a"] = Mapping({"abcG" : Mapping({1 : 1})}):TypeError:('expected str() or unicode() instance, but got int',)
-d["a"] = Mapping({"abcG" : Mapping({u"\0" : 1})}):TypeError:('expected string without null bytes',)
-d["a"] = Mapping({"abcG" : Mapping({"\0" : 1})}):TypeError:('expected string without null bytes',)
-<<< Finished
->>> Testing *Iter* using d["a"] = Mapping({"abcG" : %s})
-d["a"] = Mapping({"abcG" : FailingIter()}):TypeError:('unable to convert FailingIter to vim structure',)
-d["a"] = Mapping({"abcG" : FailingIterNext()}):NotImplementedError:('next',)
-<<< Finished
->>> Testing ConvertFromPyObject using d["a"] = Mapping({"abcG" : %s})
-d["a"] = Mapping({"abcG" : None}):TypeError:('unable to convert NoneType to vim structure',)
-d["a"] = Mapping({"abcG" : {"": 1}}):ValueError:('empty keys are not allowed',)
-d["a"] = Mapping({"abcG" : {u"": 1}}):ValueError:('empty keys are not allowed',)
-d["a"] = Mapping({"abcG" : FailingMapping()}):NotImplementedError:('keys',)
-d["a"] = Mapping({"abcG" : FailingMappingKey()}):NotImplementedError:('getitem:mappingkey',)
-d["a"] = Mapping({"abcG" : FailingNumber()}):TypeError:('long() argument must be a string or a number',)
-<<< Finished
->>> Testing *Iter* using d["a"] = %s
-d["a"] = FailingIter():TypeError:('unable to convert FailingIter to vim structure',)
-d["a"] = FailingIterNext():NotImplementedError:('next',)
-<<< Finished
->>> Testing ConvertFromPyObject using d["a"] = %s
-d["a"] = None:TypeError:('unable to convert NoneType to vim structure',)
-d["a"] = {"": 1}:ValueError:('empty keys are not allowed',)
-d["a"] = {u"": 1}:ValueError:('empty keys are not allowed',)
-d["a"] = FailingMapping():NotImplementedError:('keys',)
-d["a"] = FailingMappingKey():NotImplementedError:('getitem:mappingkey',)
-d["a"] = FailingNumber():TypeError:('long() argument must be a string or a number',)
-<<< Finished
->> DictionaryUpdate
->>> kwargs
->>> iter
-d.update(FailingMapping()):NotImplementedError:('keys',)
-d.update([FailingIterNext()]):NotImplementedError:('next',)
-d.update([FailingIterNextN(1)]):NotImplementedError:('next N',)
->>> Testing *Iter* using d.update(%s)
-d.update(FailingIter()):NotImplementedError:('iter',)
-d.update(FailingIterNext()):NotImplementedError:('next',)
-<<< Finished
->>> Testing StringToChars using d.update({%s : 1})
-d.update({1 : 1}):TypeError:('expected str() or unicode() instance, but got int',)
-d.update({u"\0" : 1}):TypeError:('expected string without null bytes',)
-d.update({"\0" : 1}):TypeError:('expected string without null bytes',)
-<<< Finished
->>> Testing StringToChars using d.update({"abcF" : {%s : 1}})
-d.update({"abcF" : {1 : 1}}):TypeError:('expected str() or unicode() instance, but got int',)
-d.update({"abcF" : {u"\0" : 1}}):TypeError:('expected string without null bytes',)
-d.update({"abcF" : {"\0" : 1}}):TypeError:('expected string without null bytes',)
-<<< Finished
->>> Testing StringToChars using d.update({"abcF" : Mapping({%s : 1})})
-d.update({"abcF" : Mapping({1 : 1})}):TypeError:('expected str() or unicode() instance, but got int',)
-d.update({"abcF" : Mapping({u"\0" : 1})}):TypeError:('expected string without null bytes',)
-d.update({"abcF" : Mapping({"\0" : 1})}):TypeError:('expected string without null bytes',)
-<<< Finished
->>> Testing *Iter* using d.update({"abcF" : %s})
-d.update({"abcF" : FailingIter()}):TypeError:('unable to convert FailingIter to vim structure',)
-d.update({"abcF" : FailingIterNext()}):NotImplementedError:('next',)
-<<< Finished
->>> Testing ConvertFromPyObject using d.update({"abcF" : %s})
-d.update({"abcF" : None}):TypeError:('unable to convert NoneType to vim structure',)
-d.update({"abcF" : {"": 1}}):ValueError:('empty keys are not allowed',)
-d.update({"abcF" : {u"": 1}}):ValueError:('empty keys are not allowed',)
-d.update({"abcF" : FailingMapping()}):NotImplementedError:('keys',)
-d.update({"abcF" : FailingMappingKey()}):NotImplementedError:('getitem:mappingkey',)
-d.update({"abcF" : FailingNumber()}):TypeError:('long() argument must be a string or a number',)
-<<< Finished
->>> Testing StringToChars using d.update(Mapping({%s : 1}))
-d.update(Mapping({1 : 1})):TypeError:('expected str() or unicode() instance, but got int',)
-d.update(Mapping({u"\0" : 1})):TypeError:('expected string without null bytes',)
-d.update(Mapping({"\0" : 1})):TypeError:('expected string without null bytes',)
-<<< Finished
->>> Testing StringToChars using d.update(Mapping({"abcG" : {%s : 1}}))
-d.update(Mapping({"abcG" : {1 : 1}})):TypeError:('expected str() or unicode() instance, but got int',)
-d.update(Mapping({"abcG" : {u"\0" : 1}})):TypeError:('expected string without null bytes',)
-d.update(Mapping({"abcG" : {"\0" : 1}})):TypeError:('expected string without null bytes',)
-<<< Finished
->>> Testing StringToChars using d.update(Mapping({"abcG" : Mapping({%s : 1})}))
-d.update(Mapping({"abcG" : Mapping({1 : 1})})):TypeError:('expected str() or unicode() instance, but got int',)
-d.update(Mapping({"abcG" : Mapping({u"\0" : 1})})):TypeError:('expected string without null bytes',)
-d.update(Mapping({"abcG" : Mapping({"\0" : 1})})):TypeError:('expected string without null bytes',)
-<<< Finished
->>> Testing *Iter* using d.update(Mapping({"abcG" : %s}))
-d.update(Mapping({"abcG" : FailingIter()})):TypeError:('unable to convert FailingIter to vim structure',)
-d.update(Mapping({"abcG" : FailingIterNext()})):NotImplementedError:('next',)
-<<< Finished
->>> Testing ConvertFromPyObject using d.update(Mapping({"abcG" : %s}))
-d.update(Mapping({"abcG" : None})):TypeError:('unable to convert NoneType to vim structure',)
-d.update(Mapping({"abcG" : {"": 1}})):ValueError:('empty keys are not allowed',)
-d.update(Mapping({"abcG" : {u"": 1}})):ValueError:('empty keys are not allowed',)
-d.update(Mapping({"abcG" : FailingMapping()})):NotImplementedError:('keys',)
-d.update(Mapping({"abcG" : FailingMappingKey()})):NotImplementedError:('getitem:mappingkey',)
-d.update(Mapping({"abcG" : FailingNumber()})):TypeError:('long() argument must be a string or a number',)
-<<< Finished
->>> Testing *Iter* using d.update(%s)
-d.update(FailingIter()):NotImplementedError:('iter',)
-d.update(FailingIterNext()):NotImplementedError:('next',)
-<<< Finished
->>> Testing ConvertFromPyObject using d.update(%s)
-d.update(None):TypeError:("'NoneType' object is not iterable",)
-d.update({"": 1}):ValueError:('empty keys are not allowed',)
-d.update({u"": 1}):ValueError:('empty keys are not allowed',)
-d.update(FailingMapping()):NotImplementedError:('keys',)
-d.update(FailingMappingKey()):NotImplementedError:('getitem:mappingkey',)
-d.update(FailingNumber()):TypeError:("'FailingNumber' object is not iterable",)
-<<< Finished
->>> Testing StringToChars using d.update(((%s, 0),))
-d.update(((1, 0),)):TypeError:('expected str() or unicode() instance, but got int',)
-d.update(((u"\0", 0),)):TypeError:('expected string without null bytes',)
-d.update((("\0", 0),)):TypeError:('expected string without null bytes',)
-<<< Finished
->>> Testing StringToChars using d.update((("a", {%s : 1}),))
-d.update((("a", {1 : 1}),)):TypeError:('expected str() or unicode() instance, but got int',)
-d.update((("a", {u"\0" : 1}),)):TypeError:('expected string without null bytes',)
-d.update((("a", {"\0" : 1}),)):TypeError:('expected string without null bytes',)
-<<< Finished
->>> Testing StringToChars using d.update((("a", {"abcF" : {%s : 1}}),))
-d.update((("a", {"abcF" : {1 : 1}}),)):TypeError:('expected str() or unicode() instance, but got int',)
-d.update((("a", {"abcF" : {u"\0" : 1}}),)):TypeError:('expected string without null bytes',)
-d.update((("a", {"abcF" : {"\0" : 1}}),)):TypeError:('expected string without null bytes',)
-<<< Finished
->>> Testing StringToChars using d.update((("a", {"abcF" : Mapping({%s : 1})}),))
-d.update((("a", {"abcF" : Mapping({1 : 1})}),)):TypeError:('expected str() or unicode() instance, but got int',)
-d.update((("a", {"abcF" : Mapping({u"\0" : 1})}),)):TypeError:('expected string without null bytes',)
-d.update((("a", {"abcF" : Mapping({"\0" : 1})}),)):TypeError:('expected string without null bytes',)
-<<< Finished
->>> Testing *Iter* using d.update((("a", {"abcF" : %s}),))
-d.update((("a", {"abcF" : FailingIter()}),)):TypeError:('unable to convert FailingIter to vim structure',)
-d.update((("a", {"abcF" : FailingIterNext()}),)):NotImplementedError:('next',)
-<<< Finished
->>> Testing ConvertFromPyObject using d.update((("a", {"abcF" : %s}),))
-d.update((("a", {"abcF" : None}),)):TypeError:('unable to convert NoneType to vim structure',)
-d.update((("a", {"abcF" : {"": 1}}),)):ValueError:('empty keys are not allowed',)
-d.update((("a", {"abcF" : {u"": 1}}),)):ValueError:('empty keys are not allowed',)
-d.update((("a", {"abcF" : FailingMapping()}),)):NotImplementedError:('keys',)
-d.update((("a", {"abcF" : FailingMappingKey()}),)):NotImplementedError:('getitem:mappingkey',)
-d.update((("a", {"abcF" : FailingNumber()}),)):TypeError:('long() argument must be a string or a number',)
-<<< Finished
->>> Testing StringToChars using d.update((("a", Mapping({%s : 1})),))
-d.update((("a", Mapping({1 : 1})),)):TypeError:('expected str() or unicode() instance, but got int',)
-d.update((("a", Mapping({u"\0" : 1})),)):TypeError:('expected string without null bytes',)
-d.update((("a", Mapping({"\0" : 1})),)):TypeError:('expected string without null bytes',)
-<<< Finished
->>> Testing StringToChars using d.update((("a", Mapping({"abcG" : {%s : 1}})),))
-d.update((("a", Mapping({"abcG" : {1 : 1}})),)):TypeError:('expected str() or unicode() instance, but got int',)
-d.update((("a", Mapping({"abcG" : {u"\0" : 1}})),)):TypeError:('expected string without null bytes',)
-d.update((("a", Mapping({"abcG" : {"\0" : 1}})),)):TypeError:('expected string without null bytes',)
-<<< Finished
->>> Testing StringToChars using d.update((("a", Mapping({"abcG" : Mapping({%s : 1})})),))
-d.update((("a", Mapping({"abcG" : Mapping({1 : 1})})),)):TypeError:('expected str() or unicode() instance, but got int',)
-d.update((("a", Mapping({"abcG" : Mapping({u"\0" : 1})})),)):TypeError:('expected string without null bytes',)
-d.update((("a", Mapping({"abcG" : Mapping({"\0" : 1})})),)):TypeError:('expected string without null bytes',)
-<<< Finished
->>> Testing *Iter* using d.update((("a", Mapping({"abcG" : %s})),))
-d.update((("a", Mapping({"abcG" : FailingIter()})),)):TypeError:('unable to convert FailingIter to vim structure',)
-d.update((("a", Mapping({"abcG" : FailingIterNext()})),)):NotImplementedError:('next',)
-<<< Finished
->>> Testing ConvertFromPyObject using d.update((("a", Mapping({"abcG" : %s})),))
-d.update((("a", Mapping({"abcG" : None})),)):TypeError:('unable to convert NoneType to vim structure',)
-d.update((("a", Mapping({"abcG" : {"": 1}})),)):ValueError:('empty keys are not allowed',)
-d.update((("a", Mapping({"abcG" : {u"": 1}})),)):ValueError:('empty keys are not allowed',)
-d.update((("a", Mapping({"abcG" : FailingMapping()})),)):NotImplementedError:('keys',)
-d.update((("a", Mapping({"abcG" : FailingMappingKey()})),)):NotImplementedError:('getitem:mappingkey',)
-d.update((("a", Mapping({"abcG" : FailingNumber()})),)):TypeError:('long() argument must be a string or a number',)
-<<< Finished
->>> Testing *Iter* using d.update((("a", %s),))
-d.update((("a", FailingIter()),)):TypeError:('unable to convert FailingIter to vim structure',)
-d.update((("a", FailingIterNext()),)):NotImplementedError:('next',)
-<<< Finished
->>> Testing ConvertFromPyObject using d.update((("a", %s),))
-d.update((("a", None),)):TypeError:('unable to convert NoneType to vim structure',)
-d.update((("a", {"": 1}),)):ValueError:('empty keys are not allowed',)
-d.update((("a", {u"": 1}),)):ValueError:('empty keys are not allowed',)
-d.update((("a", FailingMapping()),)):NotImplementedError:('keys',)
-d.update((("a", FailingMappingKey()),)):NotImplementedError:('getitem:mappingkey',)
-d.update((("a", FailingNumber()),)):TypeError:('long() argument must be a string or a number',)
-<<< Finished
->> DictionaryPopItem
-d.popitem(1, 2):TypeError:('popitem() takes no arguments (2 given)',)
->> DictionaryHasKey
-d.has_key():TypeError:('has_key() takes exactly one argument (0 given)',)
-> List
->> ListConstructor
-vim.List(1, 2):TypeError:('function takes at most 1 argument (2 given)',)
-vim.List(a=1):TypeError:('list constructor does not accept keyword arguments',)
->>> Testing *Iter* using vim.List(%s)
-vim.List(FailingIter()):NotImplementedError:('iter',)
-vim.List(FailingIterNext()):NotImplementedError:('next',)
-<<< Finished
->>> Testing StringToChars using vim.List([{%s : 1}])
-vim.List([{1 : 1}]):TypeError:('expected str() or unicode() instance, but got int',)
-vim.List([{u"\0" : 1}]):TypeError:('expected string without null bytes',)
-vim.List([{"\0" : 1}]):TypeError:('expected string without null bytes',)
-<<< Finished
->>> Testing StringToChars using vim.List([{"abcF" : {%s : 1}}])
-vim.List([{"abcF" : {1 : 1}}]):TypeError:('expected str() or unicode() instance, but got int',)
-vim.List([{"abcF" : {u"\0" : 1}}]):TypeError:('expected string without null bytes',)
-vim.List([{"abcF" : {"\0" : 1}}]):TypeError:('expected string without null bytes',)
-<<< Finished
->>> Testing StringToChars using vim.List([{"abcF" : Mapping({%s : 1})}])
-vim.List([{"abcF" : Mapping({1 : 1})}]):TypeError:('expected str() or unicode() instance, but got int',)
-vim.List([{"abcF" : Mapping({u"\0" : 1})}]):TypeError:('expected string without null bytes',)
-vim.List([{"abcF" : Mapping({"\0" : 1})}]):TypeError:('expected string without null bytes',)
-<<< Finished
->>> Testing *Iter* using vim.List([{"abcF" : %s}])
-vim.List([{"abcF" : FailingIter()}]):TypeError:('unable to convert FailingIter to vim structure',)
-vim.List([{"abcF" : FailingIterNext()}]):NotImplementedError:('next',)
-<<< Finished
->>> Testing ConvertFromPyObject using vim.List([{"abcF" : %s}])
-vim.List([{"abcF" : None}]):TypeError:('unable to convert NoneType to vim structure',)
-vim.List([{"abcF" : {"": 1}}]):ValueError:('empty keys are not allowed',)
-vim.List([{"abcF" : {u"": 1}}]):ValueError:('empty keys are not allowed',)
-vim.List([{"abcF" : FailingMapping()}]):NotImplementedError:('keys',)
-vim.List([{"abcF" : FailingMappingKey()}]):NotImplementedError:('getitem:mappingkey',)
-vim.List([{"abcF" : FailingNumber()}]):TypeError:('long() argument must be a string or a number',)
-<<< Finished
->>> Testing StringToChars using vim.List([Mapping({%s : 1})])
-vim.List([Mapping({1 : 1})]):TypeError:('expected str() or unicode() instance, but got int',)
-vim.List([Mapping({u"\0" : 1})]):TypeError:('expected string without null bytes',)
-vim.List([Mapping({"\0" : 1})]):TypeError:('expected string without null bytes',)
-<<< Finished
->>> Testing StringToChars using vim.List([Mapping({"abcG" : {%s : 1}})])
-vim.List([Mapping({"abcG" : {1 : 1}})]):TypeError:('expected str() or unicode() instance, but got int',)
-vim.List([Mapping({"abcG" : {u"\0" : 1}})]):TypeError:('expected string without null bytes',)
-vim.List([Mapping({"abcG" : {"\0" : 1}})]):TypeError:('expected string without null bytes',)
-<<< Finished
->>> Testing StringToChars using vim.List([Mapping({"abcG" : Mapping({%s : 1})})])
-vim.List([Mapping({"abcG" : Mapping({1 : 1})})]):TypeError:('expected str() or unicode() instance, but got int',)
-vim.List([Mapping({"abcG" : Mapping({u"\0" : 1})})]):TypeError:('expected string without null bytes',)
-vim.List([Mapping({"abcG" : Mapping({"\0" : 1})})]):TypeError:('expected string without null bytes',)
-<<< Finished
->>> Testing *Iter* using vim.List([Mapping({"abcG" : %s})])
-vim.List([Mapping({"abcG" : FailingIter()})]):TypeError:('unable to convert FailingIter to vim structure',)
-vim.List([Mapping({"abcG" : FailingIterNext()})]):NotImplementedError:('next',)
-<<< Finished
->>> Testing ConvertFromPyObject using vim.List([Mapping({"abcG" : %s})])
-vim.List([Mapping({"abcG" : None})]):TypeError:('unable to convert NoneType to vim structure',)
-vim.List([Mapping({"abcG" : {"": 1}})]):ValueError:('empty keys are not allowed',)
-vim.List([Mapping({"abcG" : {u"": 1}})]):ValueError:('empty keys are not allowed',)
-vim.List([Mapping({"abcG" : FailingMapping()})]):NotImplementedError:('keys',)
-vim.List([Mapping({"abcG" : FailingMappingKey()})]):NotImplementedError:('getitem:mappingkey',)
-vim.List([Mapping({"abcG" : FailingNumber()})]):TypeError:('long() argument must be a string or a number',)
-<<< Finished
->>> Testing *Iter* using vim.List([%s])
-vim.List([FailingIter()]):TypeError:('unable to convert FailingIter to vim structure',)
-vim.List([FailingIterNext()]):NotImplementedError:('next',)
-<<< Finished
->>> Testing ConvertFromPyObject using vim.List([%s])
-vim.List([None]):TypeError:('unable to convert NoneType to vim structure',)
-vim.List([{"": 1}]):ValueError:('empty keys are not allowed',)
-vim.List([{u"": 1}]):ValueError:('empty keys are not allowed',)
-vim.List([FailingMapping()]):NotImplementedError:('keys',)
-vim.List([FailingMappingKey()]):NotImplementedError:('getitem:mappingkey',)
-vim.List([FailingNumber()]):TypeError:('long() argument must be a string or a number',)
-<<< Finished
->> ListItem
-l[1000]:IndexError:('list index out of range',)
->> ListAssItem
-ll[1] = 2:error:('list is locked',)
-l[1000] = 3:IndexError:('list index out of range',)
->> ListAssSlice
-ll[1:100] = "abcJ":error:('list is locked',)
->>> Testing *Iter* using l[:] = %s
-l[:] = FailingIter():NotImplementedError:('iter',)
-l[:] = FailingIterNext():NotImplementedError:('next',)
-<<< Finished
-nel[1:10:2] = "abcK":ValueError:('attempt to assign sequence of size greater then 2 to extended slice',)
-('a', 'b', 'c', 'O')
-nel[1:10:2] = "a":ValueError:('attempt to assign sequence of size 1 to extended slice of size 2',)
-('a', 'b', 'c', 'O')
-nel[1:1:-1] = "a":ValueError:('attempt to assign sequence of size greater then 0 to extended slice',)
-('a', 'b', 'c', 'O')
-nel[:] = FailingIterNextN(2):NotImplementedError:('next N',)
-('a', 'b', 'c', 'O')
->>> Testing StringToChars using l[:] = [{%s : 1}]
-l[:] = [{1 : 1}]:TypeError:('expected str() or unicode() instance, but got int',)
-l[:] = [{u"\0" : 1}]:TypeError:('expected string without null bytes',)
-l[:] = [{"\0" : 1}]:TypeError:('expected string without null bytes',)
-<<< Finished
->>> Testing StringToChars using l[:] = [{"abcF" : {%s : 1}}]
-l[:] = [{"abcF" : {1 : 1}}]:TypeError:('expected str() or unicode() instance, but got int',)
-l[:] = [{"abcF" : {u"\0" : 1}}]:TypeError:('expected string without null bytes',)
-l[:] = [{"abcF" : {"\0" : 1}}]:TypeError:('expected string without null bytes',)
-<<< Finished
->>> Testing StringToChars using l[:] = [{"abcF" : Mapping({%s : 1})}]
-l[:] = [{"abcF" : Mapping({1 : 1})}]:TypeError:('expected str() or unicode() instance, but got int',)
-l[:] = [{"abcF" : Mapping({u"\0" : 1})}]:TypeError:('expected string without null bytes',)
-l[:] = [{"abcF" : Mapping({"\0" : 1})}]:TypeError:('expected string without null bytes',)
-<<< Finished
->>> Testing *Iter* using l[:] = [{"abcF" : %s}]
-l[:] = [{"abcF" : FailingIter()}]:TypeError:('unable to convert FailingIter to vim structure',)
-l[:] = [{"abcF" : FailingIterNext()}]:NotImplementedError:('next',)
-<<< Finished
->>> Testing ConvertFromPyObject using l[:] = [{"abcF" : %s}]
-l[:] = [{"abcF" : None}]:TypeError:('unable to convert NoneType to vim structure',)
-l[:] = [{"abcF" : {"": 1}}]:ValueError:('empty keys are not allowed',)
-l[:] = [{"abcF" : {u"": 1}}]:ValueError:('empty keys are not allowed',)
-l[:] = [{"abcF" : FailingMapping()}]:NotImplementedError:('keys',)
-l[:] = [{"abcF" : FailingMappingKey()}]:NotImplementedError:('getitem:mappingkey',)
-l[:] = [{"abcF" : FailingNumber()}]:TypeError:('long() argument must be a string or a number',)
-<<< Finished
->>> Testing StringToChars using l[:] = [Mapping({%s : 1})]
-l[:] = [Mapping({1 : 1})]:TypeError:('expected str() or unicode() instance, but got int',)
-l[:] = [Mapping({u"\0" : 1})]:TypeError:('expected string without null bytes',)
-l[:] = [Mapping({"\0" : 1})]:TypeError:('expected string without null bytes',)
-<<< Finished
->>> Testing StringToChars using l[:] = [Mapping({"abcG" : {%s : 1}})]
-l[:] = [Mapping({"abcG" : {1 : 1}})]:TypeError:('expected str() or unicode() instance, but got int',)
-l[:] = [Mapping({"abcG" : {u"\0" : 1}})]:TypeError:('expected string without null bytes',)
-l[:] = [Mapping({"abcG" : {"\0" : 1}})]:TypeError:('expected string without null bytes',)
-<<< Finished
->>> Testing StringToChars using l[:] = [Mapping({"abcG" : Mapping({%s : 1})})]
-l[:] = [Mapping({"abcG" : Mapping({1 : 1})})]:TypeError:('expected str() or unicode() instance, but got int',)
-l[:] = [Mapping({"abcG" : Mapping({u"\0" : 1})})]:TypeError:('expected string without null bytes',)
-l[:] = [Mapping({"abcG" : Mapping({"\0" : 1})})]:TypeError:('expected string without null bytes',)
-<<< Finished
->>> Testing *Iter* using l[:] = [Mapping({"abcG" : %s})]
-l[:] = [Mapping({"abcG" : FailingIter()})]:TypeError:('unable to convert FailingIter to vim structure',)
-l[:] = [Mapping({"abcG" : FailingIterNext()})]:NotImplementedError:('next',)
-<<< Finished
->>> Testing ConvertFromPyObject using l[:] = [Mapping({"abcG" : %s})]
-l[:] = [Mapping({"abcG" : None})]:TypeError:('unable to convert NoneType to vim structure',)
-l[:] = [Mapping({"abcG" : {"": 1}})]:ValueError:('empty keys are not allowed',)
-l[:] = [Mapping({"abcG" : {u"": 1}})]:ValueError:('empty keys are not allowed',)
-l[:] = [Mapping({"abcG" : FailingMapping()})]:NotImplementedError:('keys',)
-l[:] = [Mapping({"abcG" : FailingMappingKey()})]:NotImplementedError:('getitem:mappingkey',)
-l[:] = [Mapping({"abcG" : FailingNumber()})]:TypeError:('long() argument must be a string or a number',)
-<<< Finished
->>> Testing *Iter* using l[:] = [%s]
-l[:] = [FailingIter()]:TypeError:('unable to convert FailingIter to vim structure',)
-l[:] = [FailingIterNext()]:NotImplementedError:('next',)
-<<< Finished
->>> Testing ConvertFromPyObject using l[:] = [%s]
-l[:] = [None]:TypeError:('unable to convert NoneType to vim structure',)
-l[:] = [{"": 1}]:ValueError:('empty keys are not allowed',)
-l[:] = [{u"": 1}]:ValueError:('empty keys are not allowed',)
-l[:] = [FailingMapping()]:NotImplementedError:('keys',)
-l[:] = [FailingMappingKey()]:NotImplementedError:('getitem:mappingkey',)
-l[:] = [FailingNumber()]:TypeError:('long() argument must be a string or a number',)
-<<< Finished
->> ListConcatInPlace
->>> Testing *Iter* using l.extend(%s)
-l.extend(FailingIter()):NotImplementedError:('iter',)
-l.extend(FailingIterNext()):NotImplementedError:('next',)
-<<< Finished
->>> Testing StringToChars using l.extend([{%s : 1}])
-l.extend([{1 : 1}]):TypeError:('expected str() or unicode() instance, but got int',)
-l.extend([{u"\0" : 1}]):TypeError:('expected string without null bytes',)
-l.extend([{"\0" : 1}]):TypeError:('expected string without null bytes',)
-<<< Finished
->>> Testing StringToChars using l.extend([{"abcF" : {%s : 1}}])
-l.extend([{"abcF" : {1 : 1}}]):TypeError:('expected str() or unicode() instance, but got int',)
-l.extend([{"abcF" : {u"\0" : 1}}]):TypeError:('expected string without null bytes',)
-l.extend([{"abcF" : {"\0" : 1}}]):TypeError:('expected string without null bytes',)
-<<< Finished
->>> Testing StringToChars using l.extend([{"abcF" : Mapping({%s : 1})}])
-l.extend([{"abcF" : Mapping({1 : 1})}]):TypeError:('expected str() or unicode() instance, but got int',)
-l.extend([{"abcF" : Mapping({u"\0" : 1})}]):TypeError:('expected string without null bytes',)
-l.extend([{"abcF" : Mapping({"\0" : 1})}]):TypeError:('expected string without null bytes',)
-<<< Finished
->>> Testing *Iter* using l.extend([{"abcF" : %s}])
-l.extend([{"abcF" : FailingIter()}]):TypeError:('unable to convert FailingIter to vim structure',)
-l.extend([{"abcF" : FailingIterNext()}]):NotImplementedError:('next',)
-<<< Finished
->>> Testing ConvertFromPyObject using l.extend([{"abcF" : %s}])
-l.extend([{"abcF" : None}]):TypeError:('unable to convert NoneType to vim structure',)
-l.extend([{"abcF" : {"": 1}}]):ValueError:('empty keys are not allowed',)
-l.extend([{"abcF" : {u"": 1}}]):ValueError:('empty keys are not allowed',)
-l.extend([{"abcF" : FailingMapping()}]):NotImplementedError:('keys',)
-l.extend([{"abcF" : FailingMappingKey()}]):NotImplementedError:('getitem:mappingkey',)
-l.extend([{"abcF" : FailingNumber()}]):TypeError:('long() argument must be a string or a number',)
-<<< Finished
->>> Testing StringToChars using l.extend([Mapping({%s : 1})])
-l.extend([Mapping({1 : 1})]):TypeError:('expected str() or unicode() instance, but got int',)
-l.extend([Mapping({u"\0" : 1})]):TypeError:('expected string without null bytes',)
-l.extend([Mapping({"\0" : 1})]):TypeError:('expected string without null bytes',)
-<<< Finished
->>> Testing StringToChars using l.extend([Mapping({"abcG" : {%s : 1}})])
-l.extend([Mapping({"abcG" : {1 : 1}})]):TypeError:('expected str() or unicode() instance, but got int',)
-l.extend([Mapping({"abcG" : {u"\0" : 1}})]):TypeError:('expected string without null bytes',)
-l.extend([Mapping({"abcG" : {"\0" : 1}})]):TypeError:('expected string without null bytes',)
-<<< Finished
->>> Testing StringToChars using l.extend([Mapping({"abcG" : Mapping({%s : 1})})])
-l.extend([Mapping({"abcG" : Mapping({1 : 1})})]):TypeError:('expected str() or unicode() instance, but got int',)
-l.extend([Mapping({"abcG" : Mapping({u"\0" : 1})})]):TypeError:('expected string without null bytes',)
-l.extend([Mapping({"abcG" : Mapping({"\0" : 1})})]):TypeError:('expected string without null bytes',)
-<<< Finished
->>> Testing *Iter* using l.extend([Mapping({"abcG" : %s})])
-l.extend([Mapping({"abcG" : FailingIter()})]):TypeError:('unable to convert FailingIter to vim structure',)
-l.extend([Mapping({"abcG" : FailingIterNext()})]):NotImplementedError:('next',)
-<<< Finished
->>> Testing ConvertFromPyObject using l.extend([Mapping({"abcG" : %s})])
-l.extend([Mapping({"abcG" : None})]):TypeError:('unable to convert NoneType to vim structure',)
-l.extend([Mapping({"abcG" : {"": 1}})]):ValueError:('empty keys are not allowed',)
-l.extend([Mapping({"abcG" : {u"": 1}})]):ValueError:('empty keys are not allowed',)
-l.extend([Mapping({"abcG" : FailingMapping()})]):NotImplementedError:('keys',)
-l.extend([Mapping({"abcG" : FailingMappingKey()})]):NotImplementedError:('getitem:mappingkey',)
-l.extend([Mapping({"abcG" : FailingNumber()})]):TypeError:('long() argument must be a string or a number',)
-<<< Finished
->>> Testing *Iter* using l.extend([%s])
-l.extend([FailingIter()]):TypeError:('unable to convert FailingIter to vim structure',)
-l.extend([FailingIterNext()]):NotImplementedError:('next',)
-<<< Finished
->>> Testing ConvertFromPyObject using l.extend([%s])
-l.extend([None]):TypeError:('unable to convert NoneType to vim structure',)
-l.extend([{"": 1}]):ValueError:('empty keys are not allowed',)
-l.extend([{u"": 1}]):ValueError:('empty keys are not allowed',)
-l.extend([FailingMapping()]):NotImplementedError:('keys',)
-l.extend([FailingMappingKey()]):NotImplementedError:('getitem:mappingkey',)
-l.extend([FailingNumber()]):TypeError:('long() argument must be a string or a number',)
-<<< Finished
->> ListSetattr
-del l.locked:AttributeError:('cannot delete vim.List attributes',)
-l.locked = FailingTrue():NotImplementedError:('bool',)
-l.xxx = True:AttributeError:('cannot set attribute xxx',)
-> Function
->> FunctionConstructor
-vim.Function("123"):ValueError:('unnamed function 123 does not exist',)
-vim.Function("xxx_non_existent_function_xxx"):ValueError:('function xxx_non_existent_function_xxx does not exist',)
-vim.Function("xxx#non#existent#function#xxx"):NOT FAILED
->> FunctionCall
->>> Testing StringToChars using f({%s : 1})
-f({1 : 1}):TypeError:('expected str() or unicode() instance, but got int',)
-f({u"\0" : 1}):TypeError:('expected string without null bytes',)
-f({"\0" : 1}):TypeError:('expected string without null bytes',)
-<<< Finished
->>> Testing StringToChars using f({"abcF" : {%s : 1}})
-f({"abcF" : {1 : 1}}):TypeError:('expected str() or unicode() instance, but got int',)
-f({"abcF" : {u"\0" : 1}}):TypeError:('expected string without null bytes',)
-f({"abcF" : {"\0" : 1}}):TypeError:('expected string without null bytes',)
-<<< Finished
->>> Testing StringToChars using f({"abcF" : Mapping({%s : 1})})
-f({"abcF" : Mapping({1 : 1})}):TypeError:('expected str() or unicode() instance, but got int',)
-f({"abcF" : Mapping({u"\0" : 1})}):TypeError:('expected string without null bytes',)
-f({"abcF" : Mapping({"\0" : 1})}):TypeError:('expected string without null bytes',)
-<<< Finished
->>> Testing *Iter* using f({"abcF" : %s})
-f({"abcF" : FailingIter()}):TypeError:('unable to convert FailingIter to vim structure',)
-f({"abcF" : FailingIterNext()}):NotImplementedError:('next',)
-<<< Finished
->>> Testing ConvertFromPyObject using f({"abcF" : %s})
-f({"abcF" : None}):TypeError:('unable to convert NoneType to vim structure',)
-f({"abcF" : {"": 1}}):ValueError:('empty keys are not allowed',)
-f({"abcF" : {u"": 1}}):ValueError:('empty keys are not allowed',)
-f({"abcF" : FailingMapping()}):NotImplementedError:('keys',)
-f({"abcF" : FailingMappingKey()}):NotImplementedError:('getitem:mappingkey',)
-f({"abcF" : FailingNumber()}):TypeError:('long() argument must be a string or a number',)
-<<< Finished
->>> Testing StringToChars using f(Mapping({%s : 1}))
-f(Mapping({1 : 1})):TypeError:('expected str() or unicode() instance, but got int',)
-f(Mapping({u"\0" : 1})):TypeError:('expected string without null bytes',)
-f(Mapping({"\0" : 1})):TypeError:('expected string without null bytes',)
-<<< Finished
->>> Testing StringToChars using f(Mapping({"abcG" : {%s : 1}}))
-f(Mapping({"abcG" : {1 : 1}})):TypeError:('expected str() or unicode() instance, but got int',)
-f(Mapping({"abcG" : {u"\0" : 1}})):TypeError:('expected string without null bytes',)
-f(Mapping({"abcG" : {"\0" : 1}})):TypeError:('expected string without null bytes',)
-<<< Finished
->>> Testing StringToChars using f(Mapping({"abcG" : Mapping({%s : 1})}))
-f(Mapping({"abcG" : Mapping({1 : 1})})):TypeError:('expected str() or unicode() instance, but got int',)
-f(Mapping({"abcG" : Mapping({u"\0" : 1})})):TypeError:('expected string without null bytes',)
-f(Mapping({"abcG" : Mapping({"\0" : 1})})):TypeError:('expected string without null bytes',)
-<<< Finished
->>> Testing *Iter* using f(Mapping({"abcG" : %s}))
-f(Mapping({"abcG" : FailingIter()})):TypeError:('unable to convert FailingIter to vim structure',)
-f(Mapping({"abcG" : FailingIterNext()})):NotImplementedError:('next',)
-<<< Finished
->>> Testing ConvertFromPyObject using f(Mapping({"abcG" : %s}))
-f(Mapping({"abcG" : None})):TypeError:('unable to convert NoneType to vim structure',)
-f(Mapping({"abcG" : {"": 1}})):ValueError:('empty keys are not allowed',)
-f(Mapping({"abcG" : {u"": 1}})):ValueError:('empty keys are not allowed',)
-f(Mapping({"abcG" : FailingMapping()})):NotImplementedError:('keys',)
-f(Mapping({"abcG" : FailingMappingKey()})):NotImplementedError:('getitem:mappingkey',)
-f(Mapping({"abcG" : FailingNumber()})):TypeError:('long() argument must be a string or a number',)
-<<< Finished
->>> Testing *Iter* using f(%s)
-f(FailingIter()):TypeError:('unable to convert FailingIter to vim structure',)
-f(FailingIterNext()):NotImplementedError:('next',)
-<<< Finished
->>> Testing ConvertFromPyObject using f(%s)
-f(None):TypeError:('unable to convert NoneType to vim structure',)
-f({"": 1}):ValueError:('empty keys are not allowed',)
-f({u"": 1}):ValueError:('empty keys are not allowed',)
-f(FailingMapping()):NotImplementedError:('keys',)
-f(FailingMappingKey()):NotImplementedError:('getitem:mappingkey',)
-f(FailingNumber()):TypeError:('long() argument must be a string or a number',)
-<<< Finished
->>> Testing StringToChars using fd(self={%s : 1})
-fd(self={1 : 1}):TypeError:('expected str() or unicode() instance, but got int',)
-fd(self={u"\0" : 1}):TypeError:('expected string without null bytes',)
-fd(self={"\0" : 1}):TypeError:('expected string without null bytes',)
-<<< Finished
->>> Testing StringToChars using fd(self={"abcF" : {%s : 1}})
-fd(self={"abcF" : {1 : 1}}):TypeError:('expected str() or unicode() instance, but got int',)
-fd(self={"abcF" : {u"\0" : 1}}):TypeError:('expected string without null bytes',)
-fd(self={"abcF" : {"\0" : 1}}):TypeError:('expected string without null bytes',)
-<<< Finished
->>> Testing StringToChars using fd(self={"abcF" : Mapping({%s : 1})})
-fd(self={"abcF" : Mapping({1 : 1})}):TypeError:('expected str() or unicode() instance, but got int',)
-fd(self={"abcF" : Mapping({u"\0" : 1})}):TypeError:('expected string without null bytes',)
-fd(self={"abcF" : Mapping({"\0" : 1})}):TypeError:('expected string without null bytes',)
-<<< Finished
->>> Testing *Iter* using fd(self={"abcF" : %s})
-fd(self={"abcF" : FailingIter()}):TypeError:('unable to convert FailingIter to vim structure',)
-fd(self={"abcF" : FailingIterNext()}):NotImplementedError:('next',)
-<<< Finished
->>> Testing ConvertFromPyObject using fd(self={"abcF" : %s})
-fd(self={"abcF" : None}):TypeError:('unable to convert NoneType to vim structure',)
-fd(self={"abcF" : {"": 1}}):ValueError:('empty keys are not allowed',)
-fd(self={"abcF" : {u"": 1}}):ValueError:('empty keys are not allowed',)
-fd(self={"abcF" : FailingMapping()}):NotImplementedError:('keys',)
-fd(self={"abcF" : FailingMappingKey()}):NotImplementedError:('getitem:mappingkey',)
-fd(self={"abcF" : FailingNumber()}):TypeError:('long() argument must be a string or a number',)
-<<< Finished
->>> Testing StringToChars using fd(self=Mapping({%s : 1}))
-fd(self=Mapping({1 : 1})):TypeError:('expected str() or unicode() instance, but got int',)
-fd(self=Mapping({u"\0" : 1})):TypeError:('expected string without null bytes',)
-fd(self=Mapping({"\0" : 1})):TypeError:('expected string without null bytes',)
-<<< Finished
->>> Testing StringToChars using fd(self=Mapping({"abcG" : {%s : 1}}))
-fd(self=Mapping({"abcG" : {1 : 1}})):TypeError:('expected str() or unicode() instance, but got int',)
-fd(self=Mapping({"abcG" : {u"\0" : 1}})):TypeError:('expected string without null bytes',)
-fd(self=Mapping({"abcG" : {"\0" : 1}})):TypeError:('expected string without null bytes',)
-<<< Finished
->>> Testing StringToChars using fd(self=Mapping({"abcG" : Mapping({%s : 1})}))
-fd(self=Mapping({"abcG" : Mapping({1 : 1})})):TypeError:('expected str() or unicode() instance, but got int',)
-fd(self=Mapping({"abcG" : Mapping({u"\0" : 1})})):TypeError:('expected string without null bytes',)
-fd(self=Mapping({"abcG" : Mapping({"\0" : 1})})):TypeError:('expected string without null bytes',)
-<<< Finished
->>> Testing *Iter* using fd(self=Mapping({"abcG" : %s}))
-fd(self=Mapping({"abcG" : FailingIter()})):TypeError:('unable to convert FailingIter to vim structure',)
-fd(self=Mapping({"abcG" : FailingIterNext()})):NotImplementedError:('next',)
-<<< Finished
->>> Testing ConvertFromPyObject using fd(self=Mapping({"abcG" : %s}))
-fd(self=Mapping({"abcG" : None})):TypeError:('unable to convert NoneType to vim structure',)
-fd(self=Mapping({"abcG" : {"": 1}})):ValueError:('empty keys are not allowed',)
-fd(self=Mapping({"abcG" : {u"": 1}})):ValueError:('empty keys are not allowed',)
-fd(self=Mapping({"abcG" : FailingMapping()})):NotImplementedError:('keys',)
-fd(self=Mapping({"abcG" : FailingMappingKey()})):NotImplementedError:('getitem:mappingkey',)
-fd(self=Mapping({"abcG" : FailingNumber()})):TypeError:('long() argument must be a string or a number',)
-<<< Finished
->>> Testing *Iter* using fd(self=%s)
-fd(self=FailingIter()):TypeError:('unable to convert FailingIter to vim dictionary',)
-fd(self=FailingIterNext()):TypeError:('unable to convert FailingIterNext to vim dictionary',)
-<<< Finished
->>> Testing ConvertFromPyObject using fd(self=%s)
-fd(self=None):TypeError:('unable to convert NoneType to vim dictionary',)
-fd(self={"": 1}):ValueError:('empty keys are not allowed',)
-fd(self={u"": 1}):ValueError:('empty keys are not allowed',)
-fd(self=FailingMapping()):NotImplementedError:('keys',)
-fd(self=FailingMappingKey()):NotImplementedError:('getitem:mappingkey',)
-fd(self=FailingNumber()):TypeError:('unable to convert FailingNumber to vim dictionary',)
-<<< Finished
->>> Testing ConvertFromPyMapping using fd(self=%s)
-fd(self=[]):TypeError:('unable to convert list to vim dictionary',)
-<<< Finished
-> TabPage
->> TabPageAttr
-vim.current.tabpage.xxx:AttributeError:('xxx',)
-> TabList
->> TabListItem
-vim.tabpages[1000]:IndexError:('no such tab page',)
-> Window
->> WindowAttr
-vim.current.window.xxx:AttributeError:('xxx',)
->> WindowSetattr
-vim.current.window.buffer = 0:TypeError:('readonly attribute: buffer',)
-vim.current.window.cursor = (100000000, 100000000):error:('cursor position outside buffer',)
-vim.current.window.cursor = True:TypeError:('argument must be 2-item sequence, not bool',)
->>> Testing NumberToLong using vim.current.window.height = %s
-vim.current.window.height = []:TypeError:('expected int(), long() or something supporting coercing to long(), but got list',)
-vim.current.window.height = None:TypeError:('expected int(), long() or something supporting coercing to long(), but got NoneType',)
-vim.current.window.height = -1:ValueError:('number must be greater or equal to zero',)
-<<< Finished
->>> Testing NumberToLong using vim.current.window.width = %s
-vim.current.window.width = []:TypeError:('expected int(), long() or something supporting coercing to long(), but got list',)
-vim.current.window.width = None:TypeError:('expected int(), long() or something supporting coercing to long(), but got NoneType',)
-vim.current.window.width = -1:ValueError:('number must be greater or equal to zero',)
-<<< Finished
-vim.current.window.xxxxxx = True:AttributeError:('xxxxxx',)
-> WinList
->> WinListItem
-vim.windows[1000]:IndexError:('no such window',)
-> Buffer
->> StringToLine (indirect)
-vim.current.buffer[0] = u"\na":error:('string cannot contain newlines',)
-vim.current.buffer[0] = "\na":error:('string cannot contain newlines',)
->> SetBufferLine (indirect)
-vim.current.buffer[0] = True:TypeError:('bad argument type for built-in operation',)
->> SetBufferLineList (indirect)
-vim.current.buffer[:] = True:TypeError:('bad argument type for built-in operation',)
-vim.current.buffer[:] = ["\na", "bc"]:error:('string cannot contain newlines',)
->> InsertBufferLines (indirect)
-vim.current.buffer.append(None):TypeError:('bad argument type for built-in operation',)
-vim.current.buffer.append(["\na", "bc"]):error:('string cannot contain newlines',)
-vim.current.buffer.append("\nbc"):error:('string cannot contain newlines',)
->> RBItem
-vim.current.buffer[100000000]:IndexError:('line number out of range',)
->> RBAsItem
-vim.current.buffer[100000000] = "":IndexError:('line number out of range',)
->> BufferAttr
-vim.current.buffer.xxx:AttributeError:('xxx',)
->> BufferSetattr
-vim.current.buffer.name = True:TypeError:('expected str() or unicode() instance, but got bool',)
-vim.current.buffer.xxx = True:AttributeError:('xxx',)
->> BufferMark
-vim.current.buffer.mark(0):TypeError:('expected str() or unicode() instance, but got int',)
-vim.current.buffer.mark("abcM"):ValueError:('mark name must be a single character',)
-vim.current.buffer.mark("!"):error:('invalid mark name',)
->> BufferRange
-vim.current.buffer.range(1, 2, 3):TypeError:('function takes exactly 2 arguments (3 given)',)
-> BufMap
->> BufMapItem
-vim.buffers[100000000]:KeyError:(100000000,)
->>> Testing NumberToLong using vim.buffers[%s]
-vim.buffers[[]]:TypeError:('expected int(), long() or something supporting coercing to long(), but got list',)
-vim.buffers[None]:TypeError:('expected int(), long() or something supporting coercing to long(), but got NoneType',)
-vim.buffers[-1]:ValueError:('number must be greater then zero',)
-vim.buffers[0]:ValueError:('number must be greater then zero',)
-<<< Finished
-> Current
->> CurrentGetattr
-vim.current.xxx:AttributeError:('xxx',)
->> CurrentSetattr
-vim.current.line = True:TypeError:('bad argument type for built-in operation',)
-vim.current.buffer = True:TypeError:('expected vim.Buffer object, but got bool',)
-vim.current.window = True:TypeError:('expected vim.Window object, but got bool',)
-vim.current.tabpage = True:TypeError:('expected vim.TabPage object, but got bool',)
-vim.current.xxx = True:AttributeError:('xxx',)
-['/testdir']
-'/testdir'
-2,xx
-before
-after
-pythonx/topmodule/__init__.py
-pythonx/topmodule/submodule/__init__.py
-pythonx/topmodule/submodule/subsubmodule/subsubsubmodule.py
-vim.command("throw 'abcN'"):error:('abcN',)
-Exe("throw 'def'"):error:('def',)
-vim.eval("Exe('throw ''ghi''')"):error:('ghi',)
-vim.eval("Exe('echoerr ''jkl''')"):error:('Vim(echoerr):jkl',)
-vim.eval("Exe('xxx_non_existent_command_xxx')"):error:('Vim:E492: Not an editor command: xxx_non_existent_command_xxx',)
-vim.eval("xxx_unknown_function_xxx()"):error:('Vim:E117: Unknown function: xxx_unknown_function_xxx',)
-vim.bindeval("Exe('xxx_non_existent_command_xxx')"):error:('Vim:E492: Not an editor command: xxx_non_existent_command_xxx',)
-Caught KeyboardInterrupt
-Running :put
-No exception
-
diff --git a/src/nvim/testdir/test87.in b/src/nvim/testdir/test87.in
deleted file mode 100644
index 58f9ac6418..0000000000
--- a/src/nvim/testdir/test87.in
+++ /dev/null
@@ -1,1402 +0,0 @@
-Tests for various python features. vim: set ft=vim :
-
-This test is not run in Neovim(see the has('nvim') check below) because the
-python3 compatibility layer is not complete.
-
-STARTTEST
-:so small.vim
-:set noswapfile
-:if !has('python3') || has('nvim') | e! test.ok | wq! test.out | endif
-:lang C
-:fun Test()
-:py3 import vim
-:let l = []
-:py3 l=vim.bindeval('l')
-:py3 f=vim.bindeval('function("strlen")')
-:" Extending List directly with different types
-:py3 l+=[1, "as'd", [1, 2, f, {'a': 1}]]
-:$put =string(l)
-:$put =string(l[-1])
-:try
-: $put =string(l[-4])
-:catch
-: $put =v:exception[:13]
-:endtry
-:" List assignment
-:py3 l[0]=0
-:$put =string(l)
-:py3 l[-2]=f
-:$put =string(l)
-:"
-:" Extending Dictionary directly with different types
-:let d = {}
-:fun d.f()
-: return 1
-:endfun
-py3 << EOF
-d=vim.bindeval('d')
-d['1']='asd'
-d.update(b=[1, 2, f])
-d.update((('-1', {'a': 1}),))
-d.update({'0': -1})
-dk = d.keys()
-dv = d.values()
-di = d.items()
-dk.sort(key=repr)
-dv.sort(key=repr)
-di.sort(key=repr)
-EOF
-:$put =py3eval('d[''f''](self={})')
-:$put =py3eval('repr(dk)')
-:$put =substitute(py3eval('repr(dv)'),'0x\x\+','','g')
-:$put =substitute(py3eval('repr(di)'),'0x\x\+','','g')
-:for [key, Val] in sort(items(d))
-: $put =string(key) . ' : ' . string(Val)
-: unlet key Val
-:endfor
-:py3 del dk
-:py3 del di
-:py3 del dv
-:"
-:" removing items with del
-:py3 del l[2]
-:$put =string(l)
-:let l = range(8)
-:py3 l=vim.bindeval('l')
-:try
-: py3 del l[:3]
-: py3 del l[1:]
-:catch
-: $put =v:exception
-:endtry
-:$put =string(l)
-:"
-:py3 del d['-1']
-:py3 del d['f']
-:$put =string(py3eval('d.get(''b'', 1)'))
-:$put =string(py3eval('d.pop(''b'')'))
-:$put =string(py3eval('d.get(''b'', 1)'))
-:$put =string(py3eval('d.pop(''1'', 2)'))
-:$put =string(py3eval('d.pop(''1'', 2)'))
-:$put =py3eval('repr(d.has_key(''0''))')
-:$put =py3eval('repr(d.has_key(''1''))')
-:$put =py3eval('repr(''0'' in d)')
-:$put =py3eval('repr(''1'' in d)')
-:$put =py3eval('repr(list(iter(d)))')
-:$put =string(d)
-:$put =py3eval('repr(d.popitem())')
-:$put =py3eval('repr(d.get(''0''))')
-:$put =py3eval('repr(list(iter(d)))')
-:"
-:" removing items out of range: silently skip items that don't exist
-:let l = [0, 1, 2, 3]
-:py3 l=vim.bindeval('l')
-:" The following two ranges delete nothing as they match empty list:
-:py3 del l[2:1]
-:$put =string(l)
-:py3 del l[2:2]
-:$put =string(l)
-:py3 del l[2:3]
-:$put =string(l)
-:let l = [0, 1, 2, 3]
-:py3 l=vim.bindeval('l')
-:py3 del l[2:4]
-:$put =string(l)
-:let l = [0, 1, 2, 3]
-:py3 l=vim.bindeval('l')
-:py3 del l[2:5]
-:$put =string(l)
-:let l = [0, 1, 2, 3]
-:py3 l=vim.bindeval('l')
-:py3 del l[2:6]
-:$put =string(l)
-:let l = [0, 1, 2, 3]
-:py3 l=vim.bindeval('l')
-:" The following two ranges delete nothing as they match empty list:
-:py3 del l[-1:2]
-:$put =string(l)
-:py3 del l[-2:2]
-:$put =string(l)
-:py3 del l[-3:2]
-:$put =string(l)
-:let l = [0, 1, 2, 3]
-:py3 l=vim.bindeval('l')
-:py3 del l[-4:2]
-:$put =string(l)
-:let l = [0, 1, 2, 3]
-:py3 l=vim.bindeval('l')
-:py3 del l[-5:2]
-:$put =string(l)
-:let l = [0, 1, 2, 3]
-:py3 l=vim.bindeval('l')
-:py3 del l[-6:2]
-:$put =string(l)
-:let l = [0, 1, 2, 3]
-:py3 l=vim.bindeval('l')
-:py3 del l[::2]
-:$put =string(l)
-:let l = [0, 1, 2, 3]
-:py3 l=vim.bindeval('l')
-:py3 del l[3:0:-2]
-:$put =string(l)
-:let l = [0, 1, 2, 3]
-:py3 l=vim.bindeval('l')
-:py3 del l[2:4:-2]
-:$put =string(l)
-:"
-:" Slice assignment to a list
-:let l = [0, 1, 2, 3]
-:py3 l=vim.bindeval('l')
-:py3 l[0:0]=['a']
-:$put =string(l)
-:let l = [0, 1, 2, 3]
-:py3 l=vim.bindeval('l')
-:py3 l[1:2]=['b']
-:$put =string(l)
-:let l = [0, 1, 2, 3]
-:py3 l=vim.bindeval('l')
-:py3 l[2:4]=['c']
-:$put =string(l)
-:let l = [0, 1, 2, 3]
-:py3 l=vim.bindeval('l')
-:py3 l[4:4]=['d']
-:$put =string(l)
-:let l = [0, 1, 2, 3]
-:py3 l=vim.bindeval('l')
-:py3 l[-1:2]=['e']
-:$put =string(l)
-:let l = [0, 1, 2, 3]
-:py3 l=vim.bindeval('l')
-:py3 l[-10:2]=['f']
-:$put =string(l)
-:let l = [0, 1, 2, 3]
-:py3 l=vim.bindeval('l')
-:py3 l[2:-10]=['g']
-:$put =string(l)
-:let l = []
-:py3 l=vim.bindeval('l')
-:py3 l[0:0]=['h']
-:$put =string(l)
-:let l = range(8)
-:py3 l=vim.bindeval('l')
-:py3 l[2:6:2] = [10, 20]
-:$put =string(l)
-:let l = range(8)
-:py3 l=vim.bindeval('l')
-:py3 l[6:2:-2] = [10, 20]
-:$put =string(l)
-:let l = range(8)
-:py3 l=vim.bindeval('l')
-:py3 l[6:2] = ()
-:$put =string(l)
-:let l = range(8)
-:py3 l=vim.bindeval('l')
-:py3 l[6:2:1] = ()
-:$put =string(l)
-:let l = range(8)
-:py3 l=vim.bindeval('l')
-:py3 l[2:2:1] = ()
-:$put =string(l)
-:"
-:" Locked variables
-:let l = [0, 1, 2, 3]
-:py3 l=vim.bindeval('l')
-:lockvar! l
-:py3 l[2]='i'
-:$put =string(l)
-:unlockvar! l
-:"
-:" Function calls
-py3 << EOF
-import sys
-import re
-
-py33_type_error_pattern = re.compile('^__call__\(\) takes (\d+) positional argument but (\d+) were given$')
-
-def ee(expr, g=globals(), l=locals()):
- cb = vim.current.buffer
- try:
- try:
- exec(expr, g, l)
- except Exception as e:
- if sys.version_info >= (3, 3) and e.__class__ is AttributeError and str(e).find('has no attribute')>=0 and not str(e).startswith("'vim."):
- cb.append(expr + ':' + repr((e.__class__, AttributeError(str(e)[str(e).rfind(" '") + 2:-1]))))
- elif sys.version_info >= (3, 3) and e.__class__ is ImportError and str(e).find('No module named \'') >= 0:
- cb.append(expr + ':' + repr((e.__class__, ImportError(str(e).replace("'", '')))))
- elif sys.version_info >= (3, 3) and e.__class__ is TypeError:
- m = py33_type_error_pattern.search(str(e))
- if m:
- msg = '__call__() takes exactly {0} positional argument ({1} given)'.format(m.group(1), m.group(2))
- cb.append(expr + ':' + repr((e.__class__, TypeError(msg))))
- else:
- cb.append(expr + ':' + repr((e.__class__, e)))
- else:
- cb.append(expr + ':' + repr((e.__class__, e)))
- else:
- cb.append(expr + ':NOT FAILED')
- except Exception as e:
- cb.append(expr + '::' + repr((e.__class__, e)))
-EOF
-:fun New(...)
-: return ['NewStart']+a:000+['NewEnd']
-:endfun
-:fun DictNew(...) dict
-: return ['DictNewStart']+a:000+['DictNewEnd', self]
-:endfun
-:let l=[function('New'), function('DictNew')]
-:py3 l=vim.bindeval('l')
-:py3 l.extend(list(l[0](1, 2, 3)))
-:$put =string(l)
-:py3 l.extend(list(l[1](1, 2, 3, self={'a': 'b'})))
-:$put =string(l)
-:py3 l+=[l[0].name]
-:$put =string(l)
-:py3 ee('l[1](1, 2, 3)')
-:py3 f=l[0]
-:delfunction New
-:py3 ee('f(1, 2, 3)')
-:let l=[0.0]
-:py3 l=vim.bindeval('l')
-:py3 l.extend([0.0])
-:$put =string(l)
-:let messages=[]
-:delfunction DictNew
-py3 <<EOF
-d=vim.bindeval('{}')
-m=vim.bindeval('messages')
-def em(expr, g=globals(), l=locals()):
- try:
- exec(expr, g, l)
- except Exception as e:
- m.extend([e.__class__.__name__])
-
-em('d["abc1"]')
-em('d["abc1"]="\\0"')
-em('d["abc1"]=vim')
-em('d[""]=1')
-em('d["a\\0b"]=1')
-em('d[b"a\\0b"]=1')
-
-em('d.pop("abc1")')
-em('d.popitem()')
-del em
-del m
-EOF
-:$put =messages
-:unlet messages
-:" locked and scope attributes
-:let d={} | let dl={} | lockvar dl
-:for s in split("d dl v: g:")
-: let name=tr(s, ':', 's')
-: execute 'py3 '.name.'=vim.bindeval("'.s.'")'
-: let toput=s.' : '.join(map(['locked', 'scope'], 'v:val.":".py3eval(name.".".v:val)'), ';')
-: $put =toput
-:endfor
-:silent! let d.abc2=1
-:silent! let dl.abc3=1
-:py3 d.locked=True
-:py3 dl.locked=False
-:silent! let d.def=1
-:silent! let dl.def=1
-:put ='d:'.string(d)
-:put ='dl:'.string(dl)
-:unlet d dl
-:
-:let l=[] | let ll=[] | lockvar ll
-:for s in split("l ll")
-: let name=tr(s, ':', 's')
-: execute 'py3 '.name.'=vim.bindeval("'.s.'")'
-: let toput=s.' : locked:'.py3eval(name.'.locked')
-: $put =toput
-:endfor
-:silent! call extend(l, [0])
-:silent! call extend(ll, [0])
-:py3 l.locked=True
-:py3 ll.locked=False
-:silent! call extend(l, [1])
-:silent! call extend(ll, [1])
-:put ='l:'.string(l)
-:put ='ll:'.string(ll)
-:unlet l ll
-:"
-:" py3eval()
-:let l=py3eval('[0, 1, 2]')
-:$put =string(l)
-:let d=py3eval('{"a": "b", "c": 1, "d": ["e"]}')
-:$put =sort(items(d))
-:let f=py3eval('0.0')
-:$put =string(f)
-:" Invalid values:
-:for e in ['"\0"', '{"\0": 1}', 'undefined_name', 'vim']
-: try
-: let v=py3eval(e)
-: catch
-: let toput=e.":\t".v:exception[:13]
-: $put =toput
-: endtry
-:endfor
-:"
-:" threading
-:let l = [0]
-:py3 l=vim.bindeval('l')
-py3 <<EOF
-import threading
-import time
-
-class T(threading.Thread):
- def __init__(self):
- threading.Thread.__init__(self)
- self.t = 0
- self.running = True
-
- def run(self):
- while self.running:
- self.t += 1
- time.sleep(0.1)
-
-t = T()
-del T
-t.start()
-EOF
-:sleep 1
-:py3 t.running = False
-:py3 t.join()
-:py3 l[0] = t.t > 8 # check if the background thread is working
-:py3 del time
-:py3 del threading
-:py3 del t
-:$put =string(l)
-:"
-:" settrace
-:let l = []
-:py3 l=vim.bindeval('l')
-py3 <<EOF
-import sys
-
-def traceit(frame, event, arg):
- global l
- if event == "line":
- l += [frame.f_lineno]
- return traceit
-
-def trace_main():
- for i in range(5):
- pass
-EOF
-:py3 sys.settrace(traceit)
-:py3 trace_main()
-:py3 sys.settrace(None)
-:py3 del traceit
-:py3 del trace_main
-:$put =string(l)
-:"
-:" Slice
-:py3 ll = vim.bindeval('[0, 1, 2, 3, 4, 5]')
-:py3 l = ll[:4]
-:$put =string(py3eval('l'))
-:py3 l = ll[2:]
-:$put =string(py3eval('l'))
-:py3 l = ll[:-4]
-:$put =string(py3eval('l'))
-:py3 l = ll[-2:]
-:$put =string(py3eval('l'))
-:py3 l = ll[2:4]
-:$put =string(py3eval('l'))
-:py3 l = ll[4:2]
-:$put =string(py3eval('l'))
-:py3 l = ll[-4:-2]
-:$put =string(py3eval('l'))
-:py3 l = ll[-2:-4]
-:$put =string(py3eval('l'))
-:py3 l = ll[:]
-:$put =string(py3eval('l'))
-:py3 l = ll[0:6]
-:$put =string(py3eval('l'))
-:py3 l = ll[-10:10]
-:$put =string(py3eval('l'))
-:py3 l = ll[4:2:-1]
-:$put =string(py3eval('l'))
-:py3 l = ll[::2]
-:$put =string(py3eval('l'))
-:py3 l = ll[4:2:1]
-:$put =string(py3eval('l'))
-:py3 del l
-:"
-:" Vars
-:let g:foo = 'bac'
-:let w:abc3 = 'def'
-:let b:baz = 'bar'
-:let t:bar = 'jkl'
-:try
-: throw "Abc"
-:catch
-: put =py3eval('vim.vvars[''exception'']')
-:endtry
-:put =py3eval('vim.vars[''foo'']')
-:put =py3eval('vim.current.window.vars[''abc3'']')
-:put =py3eval('vim.current.buffer.vars[''baz'']')
-:put =py3eval('vim.current.tabpage.vars[''bar'']')
-:"
-:" Options
-:" paste: boolean, global
-:" previewheight number, global
-:" operatorfunc: string, global
-:" number: boolean, window-local
-:" numberwidth: number, window-local
-:" colorcolumn: string, window-local
-:" statusline: string, window-local/global
-:" autoindent: boolean, buffer-local
-:" shiftwidth: number, buffer-local
-:" omnifunc: string, buffer-local
-:" preserveindent: boolean, buffer-local/global
-:" path: string, buffer-local/global
-:let g:bufs=[bufnr('%')]
-:new
-:let g:bufs+=[bufnr('%')]
-:vnew
-:let g:bufs+=[bufnr('%')]
-:wincmd j
-:vnew
-:let g:bufs+=[bufnr('%')]
-:wincmd l
-:fun RecVars(opt)
-: let gval =string(eval('&g:'.a:opt))
-: let wvals=join(map(range(1, 4), 'v:val.":".string(getwinvar(v:val, "&".a:opt))'))
-: let bvals=join(map(copy(g:bufs), 'v:val.":".string(getbufvar(v:val, "&".a:opt))'))
-: put =' G: '.gval
-: put =' W: '.wvals
-: put =' B: '.wvals
-:endfun
-py3 << EOF
-def e(s, g=globals(), l=locals()):
- try:
- exec(s, g, l)
- except Exception as e:
- vim.command('return ' + repr(e.__class__.__name__))
-
-def ev(s, g=globals(), l=locals()):
- try:
- return eval(s, g, l)
- except Exception as e:
- vim.command('let exc=' + repr(e.__class__.__name__))
- return 0
-EOF
-:fun E(s)
-: python3 e(vim.eval('a:s'))
-:endfun
-:fun Ev(s)
-: let r=py3eval('ev(vim.eval("a:s"))')
-: if exists('exc')
-: throw exc
-: endif
-: return r
-:endfun
-:py3 gopts1=vim.options
-:py3 wopts1=vim.windows[2].options
-:py3 wopts2=vim.windows[0].options
-:py3 wopts3=vim.windows[1].options
-:py3 bopts1=vim.buffers[vim.bindeval("g:bufs")[2]].options
-:py3 bopts2=vim.buffers[vim.bindeval("g:bufs")[1]].options
-:py3 bopts3=vim.buffers[vim.bindeval("g:bufs")[0]].options
-:$put ='wopts iters equal: '.py3eval('list(wopts1) == list(wopts2)')
-:$put ='bopts iters equal: '.py3eval('list(bopts1) == list(bopts2)')
-:py3 gset=set(iter(gopts1))
-:py3 wset=set(iter(wopts1))
-:py3 bset=set(iter(bopts1))
-:set path=.,..,,
-:let lst=[]
-:let lst+=[['paste', 1, 0, 1, 2, 1, 1, 0 ]]
-:let lst+=[['previewheight', 5, 1, 6, 'a', 0, 1, 0 ]]
-:let lst+=[['operatorfunc', 'A', 'B', 'C', 2, 0, 1, 0 ]]
-:let lst+=[['number', 0, 1, 1, 0, 1, 0, 1 ]]
-:let lst+=[['numberwidth', 2, 3, 5, -100, 0, 0, 1 ]]
-:let lst+=[['colorcolumn', '+1', '+2', '+3', 'abc4', 0, 0, 1 ]]
-:let lst+=[['statusline', '1', '2', '4', 0, 0, 1, 1 ]]
-:let lst+=[['autoindent', 0, 1, 1, 2, 1, 0, 2 ]]
-:let lst+=[['shiftwidth', 0, 2, 1, 3, 0, 0, 2 ]]
-:let lst+=[['omnifunc', 'A', 'B', 'C', 1, 0, 0, 2 ]]
-:let lst+=[['preserveindent', 0, 1, 1, 2, 1, 1, 2 ]]
-:let lst+=[['path', '.,,', ',,', '.', 0, 0, 1, 2 ]]
-:for [oname, oval1, oval2, oval3, invval, bool, global, local] in lst
-: py3 oname=vim.eval('oname')
-: py3 oval1=vim.bindeval('oval1')
-: py3 oval2=vim.bindeval('oval2')
-: py3 oval3=vim.bindeval('oval3')
-: if invval is 0 || invval is 1
-: py3 invval=bool(vim.bindeval('invval'))
-: else
-: py3 invval=vim.bindeval('invval')
-: endif
-: if bool
-: py3 oval1=bool(oval1)
-: py3 oval2=bool(oval2)
-: py3 oval3=bool(oval3)
-: endif
-: put ='>>> '.oname
-: $put =' g/w/b:'.py3eval('oname in gset').'/'.py3eval('oname in wset').'/'.py3eval('oname in bset')
-: $put =' g/w/b (in):'.py3eval('oname in gopts1').'/'.py3eval('oname in wopts1').'/'.py3eval('oname in bopts1')
-: for v in ['gopts1', 'wopts1', 'bopts1']
-: try
-: put =' p/'.v.': '.Ev('repr('.v.'['''.oname.'''])')
-: catch
-: put =' p/'.v.'! '.v:exception
-: endtry
-: let r=E(v.'['''.oname.''']=invval')
-: if r isnot 0
-: put =' inv: '.string(invval).'! '.r
-: endif
-: for vv in (v is# 'gopts1' ? [v] : [v, v[:-2].'2', v[:-2].'3'])
-: let val=substitute(vv, '^.opts', 'oval', '')
-: let r=E(vv.'['''.oname.''']='.val)
-: if r isnot 0
-: put =' '.vv.'! '.r
-: endif
-: endfor
-: endfor
-: call RecVars(oname)
-: for v in ['wopts3', 'bopts3']
-: let r=E('del '.v.'["'.oname.'"]')
-: if r isnot 0
-: put =' del '.v.'! '.r
-: endif
-: endfor
-: call RecVars(oname)
-:endfor
-:delfunction RecVars
-:delfunction E
-:delfunction Ev
-:py3 del ev
-:py3 del e
-:only
-:for buf in g:bufs[1:]
-: execute 'bwipeout!' buf
-:endfor
-:py3 del gopts1
-:py3 del wopts1
-:py3 del wopts2
-:py3 del wopts3
-:py3 del bopts1
-:py3 del bopts2
-:py3 del bopts3
-:py3 del oval1
-:py3 del oval2
-:py3 del oval3
-:py3 del oname
-:py3 del invval
-:"
-:" Test buffer object
-:vnew
-:put ='First line'
-:put ='Second line'
-:put ='Third line'
-:1 delete _
-:py3 b=vim.current.buffer
-:wincmd w
-:mark a
-:augroup BUFS
-: autocmd BufFilePost * python3 cb.append(vim.eval('expand("<abuf>")') + ':BufFilePost:' + vim.eval('bufnr("%")'))
-: autocmd BufFilePre * python3 cb.append(vim.eval('expand("<abuf>")') + ':BufFilePre:' + vim.eval('bufnr("%")'))
-:augroup END
-py3 << EOF
-cb = vim.current.buffer
-# Tests BufferAppend and BufferItem
-cb.append(b[0])
-# Tests BufferSlice and BufferAssSlice
-cb.append('abc5') # Will be overwritten
-cb[-1:] = b[:-2]
-# Test BufferLength and BufferAssSlice
-cb.append('def') # Will not be overwritten
-cb[len(cb):] = b[:]
-# Test BufferAssItem and BufferMark
-cb.append('ghi') # Will be overwritten
-cb[-1] = repr((len(cb) - cb.mark('a')[0], cb.mark('a')[1]))
-# Test BufferRepr
-cb.append(repr(cb) + repr(b))
-# Modify foreign buffer
-b.append('foo')
-b[0]='bar'
-b[0:0]=['baz']
-vim.command('call append("$", getbufline(%i, 1, "$"))' % b.number)
-# Test assigning to name property
-import os
-old_name = cb.name
-cb.name = 'foo'
-cb.append(cb.name[-11:].replace(os.path.sep, '/'))
-b.name = 'bar'
-cb.append(b.name[-11:].replace(os.path.sep, '/'))
-cb.name = old_name
-cb.append(cb.name[-17:].replace(os.path.sep, '/'))
-del old_name
-# Test CheckBuffer
-for _b in vim.buffers:
- if _b is not cb:
- vim.command('bwipeout! ' + str(_b.number))
-del _b
-cb.append('valid: b:%s, cb:%s' % (repr(b.valid), repr(cb.valid)))
-for expr in ('b[1]','b[:] = ["A", "B"]','b[:]','b.append("abc6")'):
- try:
- exec(expr)
- except vim.error:
- pass
- else:
- # Usually a SEGV here
- # Should not happen in any case
- cb.append('No exception for ' + expr)
-vim.command('cd .')
-del b
-EOF
-:"
-:" Test vim.buffers object
-:set hidden
-:edit a
-:buffer #
-:edit b
-:buffer #
-:edit c
-:buffer #
-py3 << EOF
-# Check GCing iterator that was not fully exhausted
-i = iter(vim.buffers)
-cb.append('i:' + str(next(i)))
-# and also check creating more then one iterator at a time
-i2 = iter(vim.buffers)
-cb.append('i2:' + str(next(i2)))
-cb.append('i:' + str(next(i)))
-# The following should trigger GC and not cause any problems
-del i
-del i2
-i3 = iter(vim.buffers)
-cb.append('i3:' + str(next(i3)))
-del i3
-
-prevnum = 0
-for b in vim.buffers:
- # Check buffer order
- if prevnum >= b.number:
- cb.append('!!! Buffer numbers not in strictly ascending order')
- # Check indexing: vim.buffers[number].number == number
- cb.append(str(b.number) + ':' + repr(vim.buffers[b.number]) + '=' + repr(b))
- prevnum = b.number
-del prevnum
-
-cb.append(str(len(vim.buffers)))
-
-bnums = list(map(lambda b: b.number, vim.buffers))[1:]
-
-# Test wiping out buffer with existing iterator
-i4 = iter(vim.buffers)
-cb.append('i4:' + str(next(i4)))
-vim.command('bwipeout! ' + str(bnums.pop(0)))
-try:
- next(i4)
-except vim.error:
- pass
-else:
- cb.append('!!!! No vim.error')
-i4 = iter(vim.buffers)
-vim.command('bwipeout! ' + str(bnums.pop(-1)))
-vim.command('bwipeout! ' + str(bnums.pop(-1)))
-cb.append('i4:' + str(next(i4)))
-try:
- next(i4)
-except StopIteration:
- cb.append('StopIteration')
-del i4
-del bnums
-EOF
-:"
-:" Test vim.{tabpage,window}list and vim.{tabpage,window} objects
-:tabnew 0
-:tabnew 1
-:vnew a.1
-:tabnew 2
-:vnew a.2
-:vnew b.2
-:vnew c.2
-py3 << EOF
-cb.append('Number of tabs: ' + str(len(vim.tabpages)))
-cb.append('Current tab pages:')
-
-def W(w):
- if '(unknown)' in repr(w):
- return '<window object (unknown)>'
- else:
- return repr(w)
-
-def Cursor(w, start=len(cb)):
- if w.buffer is cb:
- return repr((start - w.cursor[0], w.cursor[1]))
- else:
- return repr(w.cursor)
-
-for t in vim.tabpages:
- cb.append(' ' + repr(t) + '(' + str(t.number) + ')' + ': ' + str(len(t.windows)) + ' windows, current is ' + W(t.window))
- cb.append(' Windows:')
- for w in t.windows:
- cb.append(' ' + W(w) + '(' + str(w.number) + ')' + ': displays buffer ' + repr(w.buffer) + '; cursor is at ' + Cursor(w))
- # Other values depend on the size of the terminal, so they are checked partly:
- for attr in ('height', 'row', 'width', 'col'):
- try:
- aval = getattr(w, attr)
- if type(aval) is not int:
- raise TypeError
- if aval < 0:
- raise ValueError
- except Exception as e:
- cb.append('!!!!!! Error while getting attribute ' + attr + ': ' + e.__class__.__name__)
- del aval
- del attr
- w.cursor = (len(w.buffer), 0)
-del W
-del Cursor
-cb.append('Number of windows in current tab page: ' + str(len(vim.windows)))
-if list(vim.windows) != list(vim.current.tabpage.windows):
- cb.append('!!!!!! Windows differ')
-EOF
-:"
-:" Test vim.current
-py3 << EOF
-def H(o):
- return repr(o)
-cb.append('Current tab page: ' + repr(vim.current.tabpage))
-cb.append('Current window: ' + repr(vim.current.window) + ': ' + H(vim.current.window) + ' is ' + H(vim.current.tabpage.window))
-cb.append('Current buffer: ' + repr(vim.current.buffer) + ': ' + H(vim.current.buffer) + ' is ' + H(vim.current.window.buffer)+ ' is ' + H(vim.current.tabpage.window.buffer))
-del H
-# Assigning: fails
-try:
- vim.current.window = vim.tabpages[0].window
-except ValueError:
- cb.append('ValueError at assigning foreign tab window')
-
-for attr in ('window', 'tabpage', 'buffer'):
- try:
- setattr(vim.current, attr, None)
- except TypeError:
- cb.append('Type error at assigning None to vim.current.' + attr)
-del attr
-
-# Assigning: success
-vim.current.tabpage = vim.tabpages[-2]
-vim.current.buffer = cb
-vim.current.window = vim.windows[0]
-vim.current.window.cursor = (len(vim.current.buffer), 0)
-cb.append('Current tab page: ' + repr(vim.current.tabpage))
-cb.append('Current window: ' + repr(vim.current.window))
-cb.append('Current buffer: ' + repr(vim.current.buffer))
-cb.append('Current line: ' + repr(vim.current.line))
-ws = list(vim.windows)
-ts = list(vim.tabpages)
-for b in vim.buffers:
- if b is not cb:
- vim.command('bwipeout! ' + str(b.number))
-del b
-cb.append('w.valid: ' + repr([w.valid for w in ws]))
-cb.append('t.valid: ' + repr([t.valid for t in ts]))
-del w
-del t
-del ts
-del ws
-EOF
-:tabonly!
-:only!
-:"
-:" Test types
-py3 << EOF
-for expr, attr in (
- ('vim.vars', 'Dictionary'),
- ('vim.options', 'Options'),
- ('vim.bindeval("{}")', 'Dictionary'),
- ('vim.bindeval("[]")', 'List'),
- ('vim.bindeval("function(\'tr\')")', 'Function'),
- ('vim.current.buffer', 'Buffer'),
- ('vim.current.range', 'Range'),
- ('vim.current.window', 'Window'),
- ('vim.current.tabpage', 'TabPage'),
-):
- cb.append(expr + ':' + attr + ':' + repr(type(eval(expr)) is getattr(vim, attr)))
-del expr
-del attr
-EOF
-:"
-:" Test __dir__() method
-py3 << EOF
-for name, o in (
- ('current', vim.current),
- ('buffer', vim.current.buffer),
- ('window', vim.current.window),
- ('tabpage', vim.current.tabpage),
- ('range', vim.current.range),
- ('dictionary', vim.bindeval('{}')),
- ('list', vim.bindeval('[]')),
- ('function', vim.bindeval('function("tr")')),
- ('output', sys.stdout),
- ):
- cb.append(name + ':' + ','.join(dir(o)))
-del name
-del o
-EOF
-:"
-:" Test vim.*.__new__
-:$put =string(py3eval('vim.Dictionary({})'))
-:$put =string(py3eval('vim.Dictionary(a=1)'))
-:$put =string(py3eval('vim.Dictionary(((''a'', 1),))'))
-:$put =string(py3eval('vim.List()'))
-:$put =string(py3eval('vim.List(iter(''abc7''))'))
-:$put =string(py3eval('vim.Function(''tr'')'))
-:"
-:" Test stdout/stderr
-:redir => messages
-:py3 sys.stdout.write('abc8') ; sys.stdout.write('def')
-:py3 sys.stderr.write('abc9') ; sys.stderr.write('def')
-:py3 sys.stdout.writelines(iter('abcA'))
-:py3 sys.stderr.writelines(iter('abcB'))
-:redir END
-:$put =string(substitute(messages, '\d\+', '', 'g'))
-:" Test subclassing
-:fun Put(...)
-: $put =string(a:000)
-: return a:000
-:endfun
-py3 << EOF
-class DupDict(vim.Dictionary):
- def __setitem__(self, key, value):
- super(DupDict, self).__setitem__(key, value)
- super(DupDict, self).__setitem__('dup_' + key, value)
-dd = DupDict()
-dd['a'] = 'b'
-
-class DupList(vim.List):
- def __getitem__(self, idx):
- return [super(DupList, self).__getitem__(idx)] * 2
-
-dl = DupList()
-dl2 = DupList(iter('abcC'))
-dl.extend(dl2[0])
-
-class DupFun(vim.Function):
- def __call__(self, arg):
- return super(DupFun, self).__call__(arg, arg)
-
-df = DupFun('Put')
-EOF
-:$put =string(sort(keys(py3eval('dd'))))
-:$put =string(py3eval('dl'))
-:$put =string(py3eval('dl2'))
-:$put =string(py3eval('df(2)'))
-:$put =string(py3eval('dl') is# py3eval('dl'))
-:$put =string(py3eval('dd') is# py3eval('dd'))
-:$put =string(py3eval('df'))
-:delfunction Put
-py3 << EOF
-del DupDict
-del DupList
-del DupFun
-del dd
-del dl
-del dl2
-del df
-EOF
-:"
-:" Test chdir
-py3 << EOF
-import os
-fnamemodify = vim.Function('fnamemodify')
-cb.append(str(fnamemodify('.', ':p:h:t')))
-cb.append(vim.eval('@%'))
-os.chdir('..')
-cb.append(str(fnamemodify('.', ':p:h:t')))
-cb.append(vim.eval('@%').replace(os.path.sep, '/'))
-os.chdir('testdir')
-cb.append(str(fnamemodify('.', ':p:h:t')))
-cb.append(vim.eval('@%'))
-del fnamemodify
-EOF
-:"
-:" Test errors
-:fun F() dict
-:endfun
-:fun D()
-:endfun
-py3 << EOF
-d = vim.Dictionary()
-ned = vim.Dictionary(foo='bar', baz='abcD')
-dl = vim.Dictionary(a=1)
-dl.locked = True
-l = vim.List()
-ll = vim.List('abcE')
-ll.locked = True
-nel = vim.List('abcO')
-f = vim.Function('string')
-fd = vim.Function('F')
-fdel = vim.Function('D')
-vim.command('delfunction D')
-
-def subexpr_test(expr, name, subexprs):
- cb.append('>>> Testing %s using %s' % (name, expr))
- for subexpr in subexprs:
- ee(expr % subexpr)
- cb.append('<<< Finished')
-
-def stringtochars_test(expr):
- return subexpr_test(expr, 'StringToChars', (
- '1', # Fail type checks
- 'b"\\0"', # Fail PyString_AsStringAndSize(object, , NULL) check
- '"\\0"', # Fail PyString_AsStringAndSize(bytes, , NULL) check
- ))
-
-class Mapping(object):
- def __init__(self, d):
- self.d = d
-
- def __getitem__(self, key):
- return self.d[key]
-
- def keys(self):
- return self.d.keys()
-
- def items(self):
- return self.d.items()
-
-def convertfrompyobject_test(expr, recurse=True):
- # pydict_to_tv
- stringtochars_test(expr % '{%s : 1}')
- if recurse:
- convertfrompyobject_test(expr % '{"abcF" : %s}', False)
- # pymap_to_tv
- stringtochars_test(expr % 'Mapping({%s : 1})')
- if recurse:
- convertfrompyobject_test(expr % 'Mapping({"abcG" : %s})', False)
- # pyseq_to_tv
- iter_test(expr)
- return subexpr_test(expr, 'ConvertFromPyObject', (
- 'None', # Not conversible
- '{b"": 1}', # Empty key not allowed
- '{"": 1}', # Same, but with unicode object
- 'FailingMapping()', #
- 'FailingMappingKey()', #
- 'FailingNumber()', #
- ))
-
-def convertfrompymapping_test(expr):
- convertfrompyobject_test(expr)
- return subexpr_test(expr, 'ConvertFromPyMapping', (
- '[]',
- ))
-
-def iter_test(expr):
- return subexpr_test(expr, '*Iter*', (
- 'FailingIter()',
- 'FailingIterNext()',
- ))
-
-def number_test(expr, natural=False, unsigned=False):
- if natural:
- unsigned = True
- return subexpr_test(expr, 'NumberToLong', (
- '[]',
- 'None',
- ) + (('-1',) if unsigned else ())
- + (('0',) if natural else ()))
-
-class FailingTrue(object):
- def __bool__(self):
- raise NotImplementedError('bool')
-
-class FailingIter(object):
- def __iter__(self):
- raise NotImplementedError('iter')
-
-class FailingIterNext(object):
- def __iter__(self):
- return self
-
- def __next__(self):
- raise NotImplementedError('next')
-
-class FailingIterNextN(object):
- def __init__(self, n):
- self.n = n
-
- def __iter__(self):
- return self
-
- def __next__(self):
- if self.n:
- self.n -= 1
- return 1
- else:
- raise NotImplementedError('next N')
-
-class FailingMappingKey(object):
- def __getitem__(self, item):
- raise NotImplementedError('getitem:mappingkey')
-
- def keys(self):
- return list("abcH")
-
-class FailingMapping(object):
- def __getitem__(self):
- raise NotImplementedError('getitem:mapping')
-
- def keys(self):
- raise NotImplementedError('keys')
-
-class FailingList(list):
- def __getitem__(self, idx):
- if i == 2:
- raise NotImplementedError('getitem:list')
- else:
- return super(FailingList, self).__getitem__(idx)
-
-class NoArgsCall(object):
- def __call__(self):
- pass
-
-class FailingCall(object):
- def __call__(self, path):
- raise NotImplementedError('call')
-
-class FailingNumber(object):
- def __int__(self):
- raise NotImplementedError('int')
-
-cb.append("> Output")
-cb.append(">> OutputSetattr")
-ee('del sys.stdout.softspace')
-number_test('sys.stdout.softspace = %s', unsigned=True)
-number_test('sys.stderr.softspace = %s', unsigned=True)
-ee('sys.stdout.attr = None')
-cb.append(">> OutputWrite")
-ee('sys.stdout.write(None)')
-cb.append(">> OutputWriteLines")
-ee('sys.stdout.writelines(None)')
-ee('sys.stdout.writelines([1])')
-iter_test('sys.stdout.writelines(%s)')
-cb.append("> VimCommand")
-stringtochars_test('vim.command(%s)')
-ee('vim.command("", 2)')
-#! Not checked: vim->python exceptions translating: checked later
-cb.append("> VimToPython")
-#! Not checked: everything: needs errors in internal python functions
-cb.append("> VimEval")
-stringtochars_test('vim.eval(%s)')
-ee('vim.eval("", FailingTrue())')
-#! Not checked: everything: needs errors in internal python functions
-cb.append("> VimEvalPy")
-stringtochars_test('vim.bindeval(%s)')
-ee('vim.eval("", 2)')
-#! Not checked: vim->python exceptions translating: checked later
-cb.append("> VimStrwidth")
-stringtochars_test('vim.strwidth(%s)')
-cb.append("> VimForeachRTP")
-ee('vim.foreach_rtp(None)')
-ee('vim.foreach_rtp(NoArgsCall())')
-ee('vim.foreach_rtp(FailingCall())')
-ee('vim.foreach_rtp(int, 2)')
-cb.append('> import')
-old_rtp = vim.options['rtp']
-vim.options['rtp'] = os.getcwd().replace(',', '\\,').replace('\\', '\\\\')
-ee('import xxx_no_such_module_xxx')
-ee('import failing_import')
-ee('import failing')
-vim.options['rtp'] = old_rtp
-del old_rtp
-cb.append("> Options")
-cb.append(">> OptionsItem")
-ee('vim.options["abcQ"]')
-ee('vim.options[""]')
-stringtochars_test('vim.options[%s]')
-cb.append(">> OptionsContains")
-stringtochars_test('%s in vim.options')
-cb.append("> Dictionary")
-cb.append(">> DictionaryConstructor")
-ee('vim.Dictionary("abcI")')
-##! Not checked: py_dict_alloc failure
-cb.append(">> DictionarySetattr")
-ee('del d.locked')
-ee('d.locked = FailingTrue()')
-ee('vim.vvars.locked = False')
-ee('d.scope = True')
-ee('d.xxx = True')
-cb.append(">> _DictionaryItem")
-ee('d.get("a", 2, 3)')
-stringtochars_test('d.get(%s)')
-ee('d.pop("a")')
-ee('dl.pop("a")')
-cb.append(">> DictionaryContains")
-ee('"" in d')
-ee('0 in d')
-cb.append(">> DictionaryIterNext")
-ee('for i in ned: ned["a"] = 1')
-del i
-cb.append(">> DictionaryAssItem")
-ee('dl["b"] = 1')
-stringtochars_test('d[%s] = 1')
-convertfrompyobject_test('d["a"] = %s')
-cb.append(">> DictionaryUpdate")
-cb.append(">>> kwargs")
-cb.append(">>> iter")
-ee('d.update(FailingMapping())')
-ee('d.update([FailingIterNext()])')
-ee('d.update([FailingIterNextN(1)])')
-iter_test('d.update(%s)')
-convertfrompyobject_test('d.update(%s)')
-stringtochars_test('d.update(((%s, 0),))')
-convertfrompyobject_test('d.update((("a", %s),))')
-cb.append(">> DictionaryPopItem")
-ee('d.popitem(1, 2)')
-cb.append(">> DictionaryHasKey")
-ee('d.has_key()')
-cb.append("> List")
-cb.append(">> ListConstructor")
-ee('vim.List(1, 2)')
-ee('vim.List(a=1)')
-iter_test('vim.List(%s)')
-convertfrompyobject_test('vim.List([%s])')
-cb.append(">> ListItem")
-ee('l[1000]')
-cb.append(">> ListAssItem")
-ee('ll[1] = 2')
-ee('l[1000] = 3')
-cb.append(">> ListAssSlice")
-ee('ll[1:100] = "abcJ"')
-iter_test('l[:] = %s')
-ee('nel[1:10:2] = "abcK"')
-cb.append(repr(tuple(nel)))
-ee('nel[1:10:2] = "a"')
-cb.append(repr(tuple(nel)))
-ee('nel[1:1:-1] = "a"')
-cb.append(repr(tuple(nel)))
-ee('nel[:] = FailingIterNextN(2)')
-cb.append(repr(tuple(nel)))
-convertfrompyobject_test('l[:] = [%s]')
-cb.append(">> ListConcatInPlace")
-iter_test('l.extend(%s)')
-convertfrompyobject_test('l.extend([%s])')
-cb.append(">> ListSetattr")
-ee('del l.locked')
-ee('l.locked = FailingTrue()')
-ee('l.xxx = True')
-cb.append("> Function")
-cb.append(">> FunctionConstructor")
-ee('vim.Function("123")')
-ee('vim.Function("xxx_non_existent_function_xxx")')
-ee('vim.Function("xxx#non#existent#function#xxx")')
-cb.append(">> FunctionCall")
-convertfrompyobject_test('f(%s)')
-convertfrompymapping_test('fd(self=%s)')
-cb.append("> TabPage")
-cb.append(">> TabPageAttr")
-ee('vim.current.tabpage.xxx')
-cb.append("> TabList")
-cb.append(">> TabListItem")
-ee('vim.tabpages[1000]')
-cb.append("> Window")
-cb.append(">> WindowAttr")
-ee('vim.current.window.xxx')
-cb.append(">> WindowSetattr")
-ee('vim.current.window.buffer = 0')
-ee('vim.current.window.cursor = (100000000, 100000000)')
-ee('vim.current.window.cursor = True')
-number_test('vim.current.window.height = %s', unsigned=True)
-number_test('vim.current.window.width = %s', unsigned=True)
-ee('vim.current.window.xxxxxx = True')
-cb.append("> WinList")
-cb.append(">> WinListItem")
-ee('vim.windows[1000]')
-cb.append("> Buffer")
-cb.append(">> StringToLine (indirect)")
-ee('vim.current.buffer[0] = "\\na"')
-ee('vim.current.buffer[0] = b"\\na"')
-cb.append(">> SetBufferLine (indirect)")
-ee('vim.current.buffer[0] = True')
-cb.append(">> SetBufferLineList (indirect)")
-ee('vim.current.buffer[:] = True')
-ee('vim.current.buffer[:] = ["\\na", "bc"]')
-cb.append(">> InsertBufferLines (indirect)")
-ee('vim.current.buffer.append(None)')
-ee('vim.current.buffer.append(["\\na", "bc"])')
-ee('vim.current.buffer.append("\\nbc")')
-cb.append(">> RBItem")
-ee('vim.current.buffer[100000000]')
-cb.append(">> RBAsItem")
-ee('vim.current.buffer[100000000] = ""')
-cb.append(">> BufferAttr")
-ee('vim.current.buffer.xxx')
-cb.append(">> BufferSetattr")
-ee('vim.current.buffer.name = True')
-ee('vim.current.buffer.xxx = True')
-cb.append(">> BufferMark")
-ee('vim.current.buffer.mark(0)')
-ee('vim.current.buffer.mark("abcM")')
-ee('vim.current.buffer.mark("!")')
-cb.append(">> BufferRange")
-ee('vim.current.buffer.range(1, 2, 3)')
-cb.append("> BufMap")
-cb.append(">> BufMapItem")
-ee('vim.buffers[100000000]')
-number_test('vim.buffers[%s]', natural=True)
-cb.append("> Current")
-cb.append(">> CurrentGetattr")
-ee('vim.current.xxx')
-cb.append(">> CurrentSetattr")
-ee('vim.current.line = True')
-ee('vim.current.buffer = True')
-ee('vim.current.window = True')
-ee('vim.current.tabpage = True')
-ee('vim.current.xxx = True')
-del d
-del ned
-del dl
-del l
-del ll
-del nel
-del f
-del fd
-del fdel
-del subexpr_test
-del stringtochars_test
-del Mapping
-del convertfrompyobject_test
-del convertfrompymapping_test
-del iter_test
-del number_test
-del FailingTrue
-del FailingIter
-del FailingIterNext
-del FailingIterNextN
-del FailingMapping
-del FailingMappingKey
-del FailingList
-del NoArgsCall
-del FailingCall
-del FailingNumber
-EOF
-:delfunction F
-:"
-:" Test import
-py3 << EOF
-sys.path.insert(0, os.path.join(os.getcwd(), 'python_before'))
-sys.path.append(os.path.join(os.getcwd(), 'python_after'))
-vim.options['rtp'] = os.getcwd().replace(',', '\\,').replace('\\', '\\\\')
-l = []
-def callback(path):
- l.append(os.path.relpath(path))
-vim.foreach_rtp(callback)
-cb.append(repr(l))
-del l
-def callback(path):
- return os.path.relpath(path)
-cb.append(repr(vim.foreach_rtp(callback)))
-del callback
-from module import dir as d
-from modulex import ddir
-cb.append(d + ',' + ddir)
-import before
-cb.append(before.dir)
-import after
-cb.append(after.dir)
-import topmodule as tm
-import topmodule.submodule as tms
-import topmodule.submodule.subsubmodule.subsubsubmodule as tmsss
-cb.append(tm.__file__.replace(os.path.sep, '/')[-len('modulex/topmodule/__init__.py'):])
-cb.append(tms.__file__.replace(os.path.sep, '/')[-len('modulex/topmodule/submodule/__init__.py'):])
-cb.append(tmsss.__file__.replace(os.path.sep, '/')[-len('modulex/topmodule/submodule/subsubmodule/subsubsubmodule.py'):])
-del before
-del after
-del d
-del ddir
-del tm
-del tms
-del tmsss
-EOF
-:"
-:" Test exceptions
-:fun Exe(e)
-: execute a:e
-:endfun
-py3 << EOF
-Exe = vim.bindeval('function("Exe")')
-ee('vim.command("throw \'abcN\'")')
-ee('Exe("throw \'def\'")')
-ee('vim.eval("Exe(\'throw \'\'ghi\'\'\')")')
-ee('vim.eval("Exe(\'echoerr \'\'jkl\'\'\')")')
-ee('vim.eval("Exe(\'xxx_non_existent_command_xxx\')")')
-ee('vim.eval("xxx_unknown_function_xxx()")')
-ee('vim.bindeval("Exe(\'xxx_non_existent_command_xxx\')")')
-del Exe
-EOF
-:delfunction Exe
-:"
-:" Regression: interrupting vim.command propagates to next vim.command
-py3 << EOF
-def test_keyboard_interrupt():
- try:
- vim.command('while 1 | endwhile')
- except KeyboardInterrupt:
- cb.append('Caught KeyboardInterrupt')
- except Exception as e:
- cb.append('!!!!!!!! Caught exception: ' + repr(e))
- else:
- cb.append('!!!!!!!! No exception')
- try:
- vim.command('$ put =\'Running :put\'')
- except KeyboardInterrupt:
- cb.append('!!!!!!!! Caught KeyboardInterrupt')
- except Exception as e:
- cb.append('!!!!!!!! Caught exception: ' + repr(e))
- else:
- cb.append('No exception')
-EOF
-:debuggreedy
-:call inputsave()
-:call feedkeys("s\ns\ns\ns\nq\n")
-:redir => output
-:debug silent! py3 test_keyboard_interrupt()
-:redir END
-:0 debuggreedy
-:call inputrestore()
-:silent $put =output
-:unlet output
-:py3 del test_keyboard_interrupt
-:"
-:" Cleanup
-py3 << EOF
-del cb
-del ee
-del sys
-del os
-del vim
-EOF
-:endfun
-:"
-:fun RunTest()
-:let checkrefs = !empty($PYTHONDUMPREFS)
-:let start = getline(1, '$')
-:for i in range(checkrefs ? 10 : 1)
-: if i != 0
-: %d _
-: call setline(1, start)
-: endif
-: call Test()
-: if i == 0
-: let result = getline(1, '$')
-: endif
-:endfor
-:if checkrefs
-: %d _
-: call setline(1, result)
-:endif
-:endfun
-:"
-:call RunTest()
-:delfunction RunTest
-:delfunction Test
-:call garbagecollect(1)
-:"
-:/^start:/,$wq! test.out
-:" vim: et ts=4 isk-=\:
-:call getchar()
-ENDTEST
-
-start:
diff --git a/src/nvim/testdir/test87.ok b/src/nvim/testdir/test87.ok
deleted file mode 100644
index d1ec84c6b8..0000000000
--- a/src/nvim/testdir/test87.ok
+++ /dev/null
@@ -1,1266 +0,0 @@
-start:
-[1, 'as''d', [1, 2, function('strlen'), {'a': 1}]]
-[1, 2, function('strlen'), {'a': 1}]
-Vim(put):E684:
-[0, 'as''d', [1, 2, function('strlen'), {'a': 1}]]
-[0, function('strlen'), [1, 2, function('strlen'), {'a': 1}]]
-1
-[b'-1', b'0', b'1', b'b', b'f']
-[-1, <vim.Function '1'>, <vim.dictionary object at >, <vim.list object at >, b'asd']
-[(b'-1', <vim.dictionary object at >), (b'0', -1), (b'1', b'asd'), (b'b', <vim.list object at >), (b'f', <vim.Function '1'>)]
-'-1' : {'a': 1}
-'0' : -1
-'1' : 'asd'
-'b' : [1, 2, function('strlen')]
-'f' : function('1')
-[0, function('strlen')]
-[3]
-[1, 2, function('strlen')]
-[1, 2, function('strlen')]
-1
-'asd'
-2
-True
-False
-True
-False
-[b'0']
-{'0': -1}
-(b'0', -1)
-None
-[]
-[0, 1, 2, 3]
-[0, 1, 2, 3]
-[0, 1, 3]
-[0, 1]
-[0, 1]
-[0, 1]
-[0, 1, 2, 3]
-[0, 1, 2, 3]
-[0, 2, 3]
-[2, 3]
-[2, 3]
-[2, 3]
-[1, 3]
-[0, 2]
-[0, 1, 2, 3]
-['a', 0, 1, 2, 3]
-[0, 'b', 2, 3]
-[0, 1, 'c']
-[0, 1, 2, 3, 'd']
-[0, 1, 2, 'e', 3]
-['f', 2, 3]
-[0, 1, 'g', 2, 3]
-['h']
-[0, 1, 10, 3, 20, 5, 6, 7]
-[0, 1, 2, 3, 20, 5, 10, 7]
-[0, 1, 2, 3, 4, 5, 6, 7]
-[0, 1, 2, 3, 4, 5, 6, 7]
-[0, 1, 2, 3, 4, 5, 6, 7]
-[0, 1, 2, 3]
-[function('New'), function('DictNew'), 'NewStart', 1, 2, 3, 'NewEnd']
-[function('New'), function('DictNew'), 'NewStart', 1, 2, 3, 'NewEnd', 'DictNewStart', 1, 2, 3, 'DictNewEnd', {'a': 'b'}]
-[function('New'), function('DictNew'), 'NewStart', 1, 2, 3, 'NewEnd', 'DictNewStart', 1, 2, 3, 'DictNewEnd', {'a': 'b'}, 'New']
-l[1](1, 2, 3):(<class 'vim.error'>, error('Vim:E725: Calling dict function without Dictionary: DictNew',))
-f(1, 2, 3):(<class 'vim.error'>, error('Vim:E117: Unknown function: New',))
-[0.0, 0.0]
-KeyError
-TypeError
-TypeError
-ValueError
-TypeError
-TypeError
-KeyError
-KeyError
-d : locked:0;scope:0
-dl : locked:1;scope:0
-v: : locked:2;scope:1
-g: : locked:0;scope:2
-d:{'abc2': 1}
-dl:{'def': 1}
-l : locked:0
-ll : locked:1
-l:[0]
-ll:[1]
-[0, 1, 2]
-['a', 'b']
-['c', 1]
-['d', ['e']]
-0.0
-"\0": Vim(let):E859:
-{"\0": 1}: Vim(let):E859:
-undefined_name: Vim(let):Trace
-vim: Vim(let):E859:
-[1]
-[1, 10, 11, 10, 11, 10, 11, 10, 11, 10, 11, 10, 1]
-[0, 1, 2, 3]
-[2, 3, 4, 5]
-[0, 1]
-[4, 5]
-[2, 3]
-[]
-[2, 3]
-[]
-[0, 1, 2, 3, 4, 5]
-[0, 1, 2, 3, 4, 5]
-[0, 1, 2, 3, 4, 5]
-[4, 3]
-[0, 2, 4]
-[]
-Abc
-bac
-def
-bar
-jkl
-wopts iters equal: 1
-bopts iters equal: 1
->>> paste
- g/w/b:1/0/0
- g/w/b (in):1/0/0
- p/gopts1: False
- p/wopts1! KeyError
- inv: 2! KeyError
- wopts1! KeyError
- wopts2! KeyError
- wopts3! KeyError
- p/bopts1! KeyError
- inv: 2! KeyError
- bopts1! KeyError
- bopts2! KeyError
- bopts3! KeyError
- G: 1
- W: 1:1 2:1 3:1 4:1
- B: 1:1 2:1 3:1 4:1
- del wopts3! KeyError
- del bopts3! KeyError
- G: 1
- W: 1:1 2:1 3:1 4:1
- B: 1:1 2:1 3:1 4:1
->>> previewheight
- g/w/b:1/0/0
- g/w/b (in):1/0/0
- p/gopts1: 12
- inv: 'a'! TypeError
- p/wopts1! KeyError
- inv: 'a'! KeyError
- wopts1! KeyError
- wopts2! KeyError
- wopts3! KeyError
- p/bopts1! KeyError
- inv: 'a'! KeyError
- bopts1! KeyError
- bopts2! KeyError
- bopts3! KeyError
- G: 5
- W: 1:5 2:5 3:5 4:5
- B: 1:5 2:5 3:5 4:5
- del wopts3! KeyError
- del bopts3! KeyError
- G: 5
- W: 1:5 2:5 3:5 4:5
- B: 1:5 2:5 3:5 4:5
->>> operatorfunc
- g/w/b:1/0/0
- g/w/b (in):1/0/0
- p/gopts1: b''
- inv: 2! TypeError
- p/wopts1! KeyError
- inv: 2! KeyError
- wopts1! KeyError
- wopts2! KeyError
- wopts3! KeyError
- p/bopts1! KeyError
- inv: 2! KeyError
- bopts1! KeyError
- bopts2! KeyError
- bopts3! KeyError
- G: 'A'
- W: 1:'A' 2:'A' 3:'A' 4:'A'
- B: 1:'A' 2:'A' 3:'A' 4:'A'
- del wopts3! KeyError
- del bopts3! KeyError
- G: 'A'
- W: 1:'A' 2:'A' 3:'A' 4:'A'
- B: 1:'A' 2:'A' 3:'A' 4:'A'
->>> number
- g/w/b:0/1/0
- g/w/b (in):0/1/0
- p/gopts1! KeyError
- inv: 0! KeyError
- gopts1! KeyError
- p/wopts1: False
- p/bopts1! KeyError
- inv: 0! KeyError
- bopts1! KeyError
- bopts2! KeyError
- bopts3! KeyError
- G: 0
- W: 1:1 2:1 3:0 4:0
- B: 1:1 2:1 3:0 4:0
- del wopts3! ValueError
- del bopts3! KeyError
- G: 0
- W: 1:1 2:1 3:0 4:0
- B: 1:1 2:1 3:0 4:0
->>> numberwidth
- g/w/b:0/1/0
- g/w/b (in):0/1/0
- p/gopts1! KeyError
- inv: -100! KeyError
- gopts1! KeyError
- p/wopts1: 8
- inv: -100! error
- p/bopts1! KeyError
- inv: -100! KeyError
- bopts1! KeyError
- bopts2! KeyError
- bopts3! KeyError
- G: 8
- W: 1:3 2:5 3:2 4:8
- B: 1:3 2:5 3:2 4:8
- del wopts3! ValueError
- del bopts3! KeyError
- G: 8
- W: 1:3 2:5 3:2 4:8
- B: 1:3 2:5 3:2 4:8
->>> colorcolumn
- g/w/b:0/1/0
- g/w/b (in):0/1/0
- p/gopts1! KeyError
- inv: 'abc4'! KeyError
- gopts1! KeyError
- p/wopts1: b''
- inv: 'abc4'! error
- p/bopts1! KeyError
- inv: 'abc4'! KeyError
- bopts1! KeyError
- bopts2! KeyError
- bopts3! KeyError
- G: ''
- W: 1:'+2' 2:'+3' 3:'+1' 4:''
- B: 1:'+2' 2:'+3' 3:'+1' 4:''
- del wopts3! ValueError
- del bopts3! KeyError
- G: ''
- W: 1:'+2' 2:'+3' 3:'+1' 4:''
- B: 1:'+2' 2:'+3' 3:'+1' 4:''
->>> statusline
- g/w/b:1/1/0
- g/w/b (in):1/1/0
- p/gopts1: b''
- inv: 0! TypeError
- p/wopts1: None
- inv: 0! TypeError
- p/bopts1! KeyError
- inv: 0! KeyError
- bopts1! KeyError
- bopts2! KeyError
- bopts3! KeyError
- G: '1'
- W: 1:'2' 2:'4' 3:'1' 4:'1'
- B: 1:'2' 2:'4' 3:'1' 4:'1'
- del bopts3! KeyError
- G: '1'
- W: 1:'2' 2:'1' 3:'1' 4:'1'
- B: 1:'2' 2:'1' 3:'1' 4:'1'
->>> autoindent
- g/w/b:0/0/1
- g/w/b (in):0/0/1
- p/gopts1! KeyError
- inv: 2! KeyError
- gopts1! KeyError
- p/wopts1! KeyError
- inv: 2! KeyError
- wopts1! KeyError
- wopts2! KeyError
- wopts3! KeyError
- p/bopts1: False
- G: 0
- W: 1:0 2:1 3:0 4:1
- B: 1:0 2:1 3:0 4:1
- del wopts3! KeyError
- del bopts3! ValueError
- G: 0
- W: 1:0 2:1 3:0 4:1
- B: 1:0 2:1 3:0 4:1
->>> shiftwidth
- g/w/b:0/0/1
- g/w/b (in):0/0/1
- p/gopts1! KeyError
- inv: 3! KeyError
- gopts1! KeyError
- p/wopts1! KeyError
- inv: 3! KeyError
- wopts1! KeyError
- wopts2! KeyError
- wopts3! KeyError
- p/bopts1: 8
- G: 8
- W: 1:0 2:2 3:8 4:1
- B: 1:0 2:2 3:8 4:1
- del wopts3! KeyError
- del bopts3! ValueError
- G: 8
- W: 1:0 2:2 3:8 4:1
- B: 1:0 2:2 3:8 4:1
->>> omnifunc
- g/w/b:0/0/1
- g/w/b (in):0/0/1
- p/gopts1! KeyError
- inv: 1! KeyError
- gopts1! KeyError
- p/wopts1! KeyError
- inv: 1! KeyError
- wopts1! KeyError
- wopts2! KeyError
- wopts3! KeyError
- p/bopts1: b''
- inv: 1! TypeError
- G: ''
- W: 1:'A' 2:'B' 3:'' 4:'C'
- B: 1:'A' 2:'B' 3:'' 4:'C'
- del wopts3! KeyError
- del bopts3! ValueError
- G: ''
- W: 1:'A' 2:'B' 3:'' 4:'C'
- B: 1:'A' 2:'B' 3:'' 4:'C'
->>> preserveindent
- g/w/b:0/0/1
- g/w/b (in):0/0/1
- p/gopts1! KeyError
- inv: 2! KeyError
- gopts1! KeyError
- p/wopts1! KeyError
- inv: 2! KeyError
- wopts1! KeyError
- wopts2! KeyError
- wopts3! KeyError
- p/bopts1: False
- G: 0
- W: 1:0 2:1 3:0 4:1
- B: 1:0 2:1 3:0 4:1
- del wopts3! KeyError
- del bopts3! ValueError
- G: 0
- W: 1:0 2:1 3:0 4:1
- B: 1:0 2:1 3:0 4:1
->>> path
- g/w/b:1/0/1
- g/w/b (in):1/0/1
- p/gopts1: b'.,..,,'
- inv: 0! TypeError
- p/wopts1! KeyError
- inv: 0! KeyError
- wopts1! KeyError
- wopts2! KeyError
- wopts3! KeyError
- p/bopts1: None
- inv: 0! TypeError
- G: '.,,'
- W: 1:'.,,' 2:',,' 3:'.,,' 4:'.'
- B: 1:'.,,' 2:',,' 3:'.,,' 4:'.'
- del wopts3! KeyError
- G: '.,,'
- W: 1:'.,,' 2:',,' 3:'.,,' 4:'.,,'
- B: 1:'.,,' 2:',,' 3:'.,,' 4:'.,,'
-First line
-First line
-def
-First line
-Second line
-Third line
-(7, 2)
-<buffer test87.in><buffer >
-baz
-bar
-Second line
-Third line
-foo
-1:BufFilePre:1
-1:BufFilePost:1
-testdir/foo
-5:BufFilePre:5
-5:BufFilePost:5
-testdir/bar
-1:BufFilePre:1
-1:BufFilePost:1
-testdir/test87.in
-valid: b:False, cb:True
-i:<buffer test87.in>
-i2:<buffer test87.in>
-i:<buffer a>
-i3:<buffer test87.in>
-1:<buffer test87.in>=<buffer test87.in>
-8:<buffer a>=<buffer a>
-9:<buffer b>=<buffer b>
-10:<buffer c>=<buffer c>
-4
-i4:<buffer test87.in>
-i4:<buffer test87.in>
-StopIteration
-Number of tabs: 4
-Current tab pages:
- <tabpage 0>(1): 1 windows, current is <window object (unknown)>
- Windows:
- <window object (unknown)>(1): displays buffer <buffer test87.in>; cursor is at (37, 0)
- <tabpage 1>(2): 1 windows, current is <window object (unknown)>
- Windows:
- <window object (unknown)>(1): displays buffer <buffer 0>; cursor is at (1, 0)
- <tabpage 2>(3): 2 windows, current is <window object (unknown)>
- Windows:
- <window object (unknown)>(1): displays buffer <buffer a.1>; cursor is at (1, 0)
- <window object (unknown)>(2): displays buffer <buffer 1>; cursor is at (1, 0)
- <tabpage 3>(4): 4 windows, current is <window 0>
- Windows:
- <window 0>(1): displays buffer <buffer c.2>; cursor is at (1, 0)
- <window 1>(2): displays buffer <buffer b.2>; cursor is at (1, 0)
- <window 2>(3): displays buffer <buffer a.2>; cursor is at (1, 0)
- <window 3>(4): displays buffer <buffer 2>; cursor is at (1, 0)
-Number of windows in current tab page: 4
-Current tab page: <tabpage 3>
-Current window: <window 0>: <window 0> is <window 0>
-Current buffer: <buffer c.2>: <buffer c.2> is <buffer c.2> is <buffer c.2>
-ValueError at assigning foreign tab window
-Type error at assigning None to vim.current.window
-Type error at assigning None to vim.current.tabpage
-Type error at assigning None to vim.current.buffer
-Current tab page: <tabpage 2>
-Current window: <window 0>
-Current buffer: <buffer test87.in>
-Current line: 'Type error at assigning None to vim.current.buffer'
-w.valid: [True, False]
-t.valid: [True, False, True, False]
-vim.vars:Dictionary:True
-vim.options:Options:True
-vim.bindeval("{}"):Dictionary:True
-vim.bindeval("[]"):List:True
-vim.bindeval("function('tr')"):Function:True
-vim.current.buffer:Buffer:True
-vim.current.range:Range:True
-vim.current.window:Window:True
-vim.current.tabpage:TabPage:True
-current:__dir__,buffer,line,range,tabpage,window
-buffer:__dir__,append,mark,name,number,options,range,valid,vars
-window:__dir__,buffer,col,cursor,height,number,options,row,tabpage,valid,vars
-tabpage:__dir__,number,valid,vars,window,windows
-range:__dir__,append,end,start
-dictionary:__dir__,get,has_key,items,keys,locked,pop,popitem,scope,update,values
-list:__dir__,extend,locked
-function:__dir__,softspace
-output:__dir__,flush,softspace,write,writelines
-{}
-{'a': 1}
-{'a': 1}
-[]
-['a', 'b', 'c', '7']
-function('tr')
-'
-abcdef
-line :
-abcdef
-abcA
-line :
-abcB'
-['a', 'dup_a']
-['a', 'a']
-['a', 'b', 'c', 'C']
-[2, 2]
-[2, 2]
-1
-1
-function('Put')
-b'testdir'
-test87.in
-b'src'
-testdir/test87.in
-b'testdir'
-test87.in
-> Output
->> OutputSetattr
-del sys.stdout.softspace:(<class 'AttributeError'>, AttributeError("can't delete OutputObject attributes",))
->>> Testing NumberToLong using sys.stdout.softspace = %s
-sys.stdout.softspace = []:(<class 'TypeError'>, TypeError('expected int() or something supporting coercing to int(), but got list',))
-sys.stdout.softspace = None:(<class 'TypeError'>, TypeError('expected int() or something supporting coercing to int(), but got NoneType',))
-sys.stdout.softspace = -1:(<class 'ValueError'>, ValueError('number must be greater or equal to zero',))
-<<< Finished
->>> Testing NumberToLong using sys.stderr.softspace = %s
-sys.stderr.softspace = []:(<class 'TypeError'>, TypeError('expected int() or something supporting coercing to int(), but got list',))
-sys.stderr.softspace = None:(<class 'TypeError'>, TypeError('expected int() or something supporting coercing to int(), but got NoneType',))
-sys.stderr.softspace = -1:(<class 'ValueError'>, ValueError('number must be greater or equal to zero',))
-<<< Finished
-sys.stdout.attr = None:(<class 'AttributeError'>, AttributeError('invalid attribute: attr',))
->> OutputWrite
-sys.stdout.write(None):(<class 'TypeError'>, TypeError("Can't convert 'NoneType' object to str implicitly",))
->> OutputWriteLines
-sys.stdout.writelines(None):(<class 'TypeError'>, TypeError("'NoneType' object is not iterable",))
-sys.stdout.writelines([1]):(<class 'TypeError'>, TypeError("Can't convert 'int' object to str implicitly",))
->>> Testing *Iter* using sys.stdout.writelines(%s)
-sys.stdout.writelines(FailingIter()):(<class 'NotImplementedError'>, NotImplementedError('iter',))
-sys.stdout.writelines(FailingIterNext()):(<class 'NotImplementedError'>, NotImplementedError('next',))
-<<< Finished
-> VimCommand
->>> Testing StringToChars using vim.command(%s)
-vim.command(1):(<class 'TypeError'>, TypeError('expected bytes() or str() instance, but got int',))
-vim.command(b"\0"):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-vim.command("\0"):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-<<< Finished
-vim.command("", 2):(<class 'TypeError'>, TypeError('command() takes exactly one argument (2 given)',))
-> VimToPython
-> VimEval
->>> Testing StringToChars using vim.eval(%s)
-vim.eval(1):(<class 'TypeError'>, TypeError('expected bytes() or str() instance, but got int',))
-vim.eval(b"\0"):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-vim.eval("\0"):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-<<< Finished
-vim.eval("", FailingTrue()):(<class 'TypeError'>, TypeError('function takes exactly 1 argument (2 given)',))
-> VimEvalPy
->>> Testing StringToChars using vim.bindeval(%s)
-vim.bindeval(1):(<class 'TypeError'>, TypeError('expected bytes() or str() instance, but got int',))
-vim.bindeval(b"\0"):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-vim.bindeval("\0"):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-<<< Finished
-vim.eval("", 2):(<class 'TypeError'>, TypeError('function takes exactly 1 argument (2 given)',))
-> VimStrwidth
->>> Testing StringToChars using vim.strwidth(%s)
-vim.strwidth(1):(<class 'TypeError'>, TypeError('expected bytes() or str() instance, but got int',))
-vim.strwidth(b"\0"):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-vim.strwidth("\0"):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-<<< Finished
-> VimForeachRTP
-vim.foreach_rtp(None):(<class 'TypeError'>, TypeError("'NoneType' object is not callable",))
-vim.foreach_rtp(NoArgsCall()):(<class 'TypeError'>, TypeError('__call__() takes exactly 1 positional argument (2 given)',))
-vim.foreach_rtp(FailingCall()):(<class 'NotImplementedError'>, NotImplementedError('call',))
-vim.foreach_rtp(int, 2):(<class 'TypeError'>, TypeError('foreach_rtp() takes exactly one argument (2 given)',))
-> import
-import xxx_no_such_module_xxx:(<class 'ImportError'>, ImportError('No module named xxx_no_such_module_xxx',))
-import failing_import:(<class 'ImportError'>, ImportError('No module named failing_import',))
-import failing:(<class 'NotImplementedError'>, NotImplementedError())
-> Options
->> OptionsItem
-vim.options["abcQ"]:(<class 'KeyError'>, KeyError('abcQ',))
-vim.options[""]:(<class 'ValueError'>, ValueError('empty keys are not allowed',))
->>> Testing StringToChars using vim.options[%s]
-vim.options[1]:(<class 'TypeError'>, TypeError('expected bytes() or str() instance, but got int',))
-vim.options[b"\0"]:(<class 'TypeError'>, TypeError('expected bytes with no null',))
-vim.options["\0"]:(<class 'TypeError'>, TypeError('expected bytes with no null',))
-<<< Finished
->> OptionsContains
->>> Testing StringToChars using %s in vim.options
-1 in vim.options:(<class 'TypeError'>, TypeError('expected bytes() or str() instance, but got int',))
-b"\0" in vim.options:(<class 'TypeError'>, TypeError('expected bytes with no null',))
-"\0" in vim.options:(<class 'TypeError'>, TypeError('expected bytes with no null',))
-<<< Finished
-> Dictionary
->> DictionaryConstructor
-vim.Dictionary("abcI"):(<class 'ValueError'>, ValueError('expected sequence element of size 2, but got sequence of size 1',))
->> DictionarySetattr
-del d.locked:(<class 'AttributeError'>, AttributeError('cannot delete vim.Dictionary attributes',))
-d.locked = FailingTrue():(<class 'NotImplementedError'>, NotImplementedError('bool',))
-vim.vvars.locked = False:(<class 'TypeError'>, TypeError('cannot modify fixed dictionary',))
-d.scope = True:(<class 'AttributeError'>, AttributeError('cannot set attribute scope',))
-d.xxx = True:(<class 'AttributeError'>, AttributeError('cannot set attribute xxx',))
->> _DictionaryItem
-d.get("a", 2, 3):(<class 'TypeError'>, TypeError('function takes at most 2 arguments (3 given)',))
->>> Testing StringToChars using d.get(%s)
-d.get(1):(<class 'TypeError'>, TypeError('expected bytes() or str() instance, but got int',))
-d.get(b"\0"):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-d.get("\0"):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-<<< Finished
-d.pop("a"):(<class 'KeyError'>, KeyError('a',))
-dl.pop("a"):(<class 'vim.error'>, error('dictionary is locked',))
->> DictionaryContains
-"" in d:(<class 'ValueError'>, ValueError('empty keys are not allowed',))
-0 in d:(<class 'TypeError'>, TypeError('expected bytes() or str() instance, but got int',))
->> DictionaryIterNext
-for i in ned: ned["a"] = 1:(<class 'RuntimeError'>, RuntimeError('hashtab changed during iteration',))
->> DictionaryAssItem
-dl["b"] = 1:(<class 'vim.error'>, error('dictionary is locked',))
->>> Testing StringToChars using d[%s] = 1
-d[1] = 1:(<class 'TypeError'>, TypeError('expected bytes() or str() instance, but got int',))
-d[b"\0"] = 1:(<class 'TypeError'>, TypeError('expected bytes with no null',))
-d["\0"] = 1:(<class 'TypeError'>, TypeError('expected bytes with no null',))
-<<< Finished
->>> Testing StringToChars using d["a"] = {%s : 1}
-d["a"] = {1 : 1}:(<class 'TypeError'>, TypeError('expected bytes() or str() instance, but got int',))
-d["a"] = {b"\0" : 1}:(<class 'TypeError'>, TypeError('expected bytes with no null',))
-d["a"] = {"\0" : 1}:(<class 'TypeError'>, TypeError('expected bytes with no null',))
-<<< Finished
->>> Testing StringToChars using d["a"] = {"abcF" : {%s : 1}}
-d["a"] = {"abcF" : {1 : 1}}:(<class 'TypeError'>, TypeError('expected bytes() or str() instance, but got int',))
-d["a"] = {"abcF" : {b"\0" : 1}}:(<class 'TypeError'>, TypeError('expected bytes with no null',))
-d["a"] = {"abcF" : {"\0" : 1}}:(<class 'TypeError'>, TypeError('expected bytes with no null',))
-<<< Finished
->>> Testing StringToChars using d["a"] = {"abcF" : Mapping({%s : 1})}
-d["a"] = {"abcF" : Mapping({1 : 1})}:(<class 'TypeError'>, TypeError('expected bytes() or str() instance, but got int',))
-d["a"] = {"abcF" : Mapping({b"\0" : 1})}:(<class 'TypeError'>, TypeError('expected bytes with no null',))
-d["a"] = {"abcF" : Mapping({"\0" : 1})}:(<class 'TypeError'>, TypeError('expected bytes with no null',))
-<<< Finished
->>> Testing *Iter* using d["a"] = {"abcF" : %s}
-d["a"] = {"abcF" : FailingIter()}:(<class 'TypeError'>, TypeError('unable to convert FailingIter to vim structure',))
-d["a"] = {"abcF" : FailingIterNext()}:(<class 'NotImplementedError'>, NotImplementedError('next',))
-<<< Finished
->>> Testing ConvertFromPyObject using d["a"] = {"abcF" : %s}
-d["a"] = {"abcF" : None}:(<class 'TypeError'>, TypeError('unable to convert NoneType to vim structure',))
-d["a"] = {"abcF" : {b"": 1}}:(<class 'ValueError'>, ValueError('empty keys are not allowed',))
-d["a"] = {"abcF" : {"": 1}}:(<class 'ValueError'>, ValueError('empty keys are not allowed',))
-d["a"] = {"abcF" : FailingMapping()}:(<class 'NotImplementedError'>, NotImplementedError('keys',))
-d["a"] = {"abcF" : FailingMappingKey()}:(<class 'NotImplementedError'>, NotImplementedError('getitem:mappingkey',))
-d["a"] = {"abcF" : FailingNumber()}:(<class 'NotImplementedError'>, NotImplementedError('int',))
-<<< Finished
->>> Testing StringToChars using d["a"] = Mapping({%s : 1})
-d["a"] = Mapping({1 : 1}):(<class 'TypeError'>, TypeError('expected bytes() or str() instance, but got int',))
-d["a"] = Mapping({b"\0" : 1}):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-d["a"] = Mapping({"\0" : 1}):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-<<< Finished
->>> Testing StringToChars using d["a"] = Mapping({"abcG" : {%s : 1}})
-d["a"] = Mapping({"abcG" : {1 : 1}}):(<class 'TypeError'>, TypeError('expected bytes() or str() instance, but got int',))
-d["a"] = Mapping({"abcG" : {b"\0" : 1}}):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-d["a"] = Mapping({"abcG" : {"\0" : 1}}):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-<<< Finished
->>> Testing StringToChars using d["a"] = Mapping({"abcG" : Mapping({%s : 1})})
-d["a"] = Mapping({"abcG" : Mapping({1 : 1})}):(<class 'TypeError'>, TypeError('expected bytes() or str() instance, but got int',))
-d["a"] = Mapping({"abcG" : Mapping({b"\0" : 1})}):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-d["a"] = Mapping({"abcG" : Mapping({"\0" : 1})}):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-<<< Finished
->>> Testing *Iter* using d["a"] = Mapping({"abcG" : %s})
-d["a"] = Mapping({"abcG" : FailingIter()}):(<class 'TypeError'>, TypeError('unable to convert FailingIter to vim structure',))
-d["a"] = Mapping({"abcG" : FailingIterNext()}):(<class 'NotImplementedError'>, NotImplementedError('next',))
-<<< Finished
->>> Testing ConvertFromPyObject using d["a"] = Mapping({"abcG" : %s})
-d["a"] = Mapping({"abcG" : None}):(<class 'TypeError'>, TypeError('unable to convert NoneType to vim structure',))
-d["a"] = Mapping({"abcG" : {b"": 1}}):(<class 'ValueError'>, ValueError('empty keys are not allowed',))
-d["a"] = Mapping({"abcG" : {"": 1}}):(<class 'ValueError'>, ValueError('empty keys are not allowed',))
-d["a"] = Mapping({"abcG" : FailingMapping()}):(<class 'NotImplementedError'>, NotImplementedError('keys',))
-d["a"] = Mapping({"abcG" : FailingMappingKey()}):(<class 'NotImplementedError'>, NotImplementedError('getitem:mappingkey',))
-d["a"] = Mapping({"abcG" : FailingNumber()}):(<class 'NotImplementedError'>, NotImplementedError('int',))
-<<< Finished
->>> Testing *Iter* using d["a"] = %s
-d["a"] = FailingIter():(<class 'TypeError'>, TypeError('unable to convert FailingIter to vim structure',))
-d["a"] = FailingIterNext():(<class 'NotImplementedError'>, NotImplementedError('next',))
-<<< Finished
->>> Testing ConvertFromPyObject using d["a"] = %s
-d["a"] = None:(<class 'TypeError'>, TypeError('unable to convert NoneType to vim structure',))
-d["a"] = {b"": 1}:(<class 'ValueError'>, ValueError('empty keys are not allowed',))
-d["a"] = {"": 1}:(<class 'ValueError'>, ValueError('empty keys are not allowed',))
-d["a"] = FailingMapping():(<class 'NotImplementedError'>, NotImplementedError('keys',))
-d["a"] = FailingMappingKey():(<class 'NotImplementedError'>, NotImplementedError('getitem:mappingkey',))
-d["a"] = FailingNumber():(<class 'NotImplementedError'>, NotImplementedError('int',))
-<<< Finished
->> DictionaryUpdate
->>> kwargs
->>> iter
-d.update(FailingMapping()):(<class 'NotImplementedError'>, NotImplementedError('keys',))
-d.update([FailingIterNext()]):(<class 'NotImplementedError'>, NotImplementedError('next',))
-d.update([FailingIterNextN(1)]):(<class 'NotImplementedError'>, NotImplementedError('next N',))
->>> Testing *Iter* using d.update(%s)
-d.update(FailingIter()):(<class 'NotImplementedError'>, NotImplementedError('iter',))
-d.update(FailingIterNext()):(<class 'NotImplementedError'>, NotImplementedError('next',))
-<<< Finished
->>> Testing StringToChars using d.update({%s : 1})
-d.update({1 : 1}):(<class 'TypeError'>, TypeError('expected bytes() or str() instance, but got int',))
-d.update({b"\0" : 1}):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-d.update({"\0" : 1}):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-<<< Finished
->>> Testing StringToChars using d.update({"abcF" : {%s : 1}})
-d.update({"abcF" : {1 : 1}}):(<class 'TypeError'>, TypeError('expected bytes() or str() instance, but got int',))
-d.update({"abcF" : {b"\0" : 1}}):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-d.update({"abcF" : {"\0" : 1}}):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-<<< Finished
->>> Testing StringToChars using d.update({"abcF" : Mapping({%s : 1})})
-d.update({"abcF" : Mapping({1 : 1})}):(<class 'TypeError'>, TypeError('expected bytes() or str() instance, but got int',))
-d.update({"abcF" : Mapping({b"\0" : 1})}):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-d.update({"abcF" : Mapping({"\0" : 1})}):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-<<< Finished
->>> Testing *Iter* using d.update({"abcF" : %s})
-d.update({"abcF" : FailingIter()}):(<class 'TypeError'>, TypeError('unable to convert FailingIter to vim structure',))
-d.update({"abcF" : FailingIterNext()}):(<class 'NotImplementedError'>, NotImplementedError('next',))
-<<< Finished
->>> Testing ConvertFromPyObject using d.update({"abcF" : %s})
-d.update({"abcF" : None}):(<class 'TypeError'>, TypeError('unable to convert NoneType to vim structure',))
-d.update({"abcF" : {b"": 1}}):(<class 'ValueError'>, ValueError('empty keys are not allowed',))
-d.update({"abcF" : {"": 1}}):(<class 'ValueError'>, ValueError('empty keys are not allowed',))
-d.update({"abcF" : FailingMapping()}):(<class 'NotImplementedError'>, NotImplementedError('keys',))
-d.update({"abcF" : FailingMappingKey()}):(<class 'NotImplementedError'>, NotImplementedError('getitem:mappingkey',))
-d.update({"abcF" : FailingNumber()}):(<class 'NotImplementedError'>, NotImplementedError('int',))
-<<< Finished
->>> Testing StringToChars using d.update(Mapping({%s : 1}))
-d.update(Mapping({1 : 1})):(<class 'TypeError'>, TypeError('expected bytes() or str() instance, but got int',))
-d.update(Mapping({b"\0" : 1})):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-d.update(Mapping({"\0" : 1})):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-<<< Finished
->>> Testing StringToChars using d.update(Mapping({"abcG" : {%s : 1}}))
-d.update(Mapping({"abcG" : {1 : 1}})):(<class 'TypeError'>, TypeError('expected bytes() or str() instance, but got int',))
-d.update(Mapping({"abcG" : {b"\0" : 1}})):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-d.update(Mapping({"abcG" : {"\0" : 1}})):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-<<< Finished
->>> Testing StringToChars using d.update(Mapping({"abcG" : Mapping({%s : 1})}))
-d.update(Mapping({"abcG" : Mapping({1 : 1})})):(<class 'TypeError'>, TypeError('expected bytes() or str() instance, but got int',))
-d.update(Mapping({"abcG" : Mapping({b"\0" : 1})})):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-d.update(Mapping({"abcG" : Mapping({"\0" : 1})})):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-<<< Finished
->>> Testing *Iter* using d.update(Mapping({"abcG" : %s}))
-d.update(Mapping({"abcG" : FailingIter()})):(<class 'TypeError'>, TypeError('unable to convert FailingIter to vim structure',))
-d.update(Mapping({"abcG" : FailingIterNext()})):(<class 'NotImplementedError'>, NotImplementedError('next',))
-<<< Finished
->>> Testing ConvertFromPyObject using d.update(Mapping({"abcG" : %s}))
-d.update(Mapping({"abcG" : None})):(<class 'TypeError'>, TypeError('unable to convert NoneType to vim structure',))
-d.update(Mapping({"abcG" : {b"": 1}})):(<class 'ValueError'>, ValueError('empty keys are not allowed',))
-d.update(Mapping({"abcG" : {"": 1}})):(<class 'ValueError'>, ValueError('empty keys are not allowed',))
-d.update(Mapping({"abcG" : FailingMapping()})):(<class 'NotImplementedError'>, NotImplementedError('keys',))
-d.update(Mapping({"abcG" : FailingMappingKey()})):(<class 'NotImplementedError'>, NotImplementedError('getitem:mappingkey',))
-d.update(Mapping({"abcG" : FailingNumber()})):(<class 'NotImplementedError'>, NotImplementedError('int',))
-<<< Finished
->>> Testing *Iter* using d.update(%s)
-d.update(FailingIter()):(<class 'NotImplementedError'>, NotImplementedError('iter',))
-d.update(FailingIterNext()):(<class 'NotImplementedError'>, NotImplementedError('next',))
-<<< Finished
->>> Testing ConvertFromPyObject using d.update(%s)
-d.update(None):(<class 'TypeError'>, TypeError("'NoneType' object is not iterable",))
-d.update({b"": 1}):(<class 'ValueError'>, ValueError('empty keys are not allowed',))
-d.update({"": 1}):(<class 'ValueError'>, ValueError('empty keys are not allowed',))
-d.update(FailingMapping()):(<class 'NotImplementedError'>, NotImplementedError('keys',))
-d.update(FailingMappingKey()):(<class 'NotImplementedError'>, NotImplementedError('getitem:mappingkey',))
-d.update(FailingNumber()):(<class 'TypeError'>, TypeError("'FailingNumber' object is not iterable",))
-<<< Finished
->>> Testing StringToChars using d.update(((%s, 0),))
-d.update(((1, 0),)):(<class 'TypeError'>, TypeError('expected bytes() or str() instance, but got int',))
-d.update(((b"\0", 0),)):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-d.update((("\0", 0),)):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-<<< Finished
->>> Testing StringToChars using d.update((("a", {%s : 1}),))
-d.update((("a", {1 : 1}),)):(<class 'TypeError'>, TypeError('expected bytes() or str() instance, but got int',))
-d.update((("a", {b"\0" : 1}),)):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-d.update((("a", {"\0" : 1}),)):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-<<< Finished
->>> Testing StringToChars using d.update((("a", {"abcF" : {%s : 1}}),))
-d.update((("a", {"abcF" : {1 : 1}}),)):(<class 'TypeError'>, TypeError('expected bytes() or str() instance, but got int',))
-d.update((("a", {"abcF" : {b"\0" : 1}}),)):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-d.update((("a", {"abcF" : {"\0" : 1}}),)):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-<<< Finished
->>> Testing StringToChars using d.update((("a", {"abcF" : Mapping({%s : 1})}),))
-d.update((("a", {"abcF" : Mapping({1 : 1})}),)):(<class 'TypeError'>, TypeError('expected bytes() or str() instance, but got int',))
-d.update((("a", {"abcF" : Mapping({b"\0" : 1})}),)):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-d.update((("a", {"abcF" : Mapping({"\0" : 1})}),)):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-<<< Finished
->>> Testing *Iter* using d.update((("a", {"abcF" : %s}),))
-d.update((("a", {"abcF" : FailingIter()}),)):(<class 'TypeError'>, TypeError('unable to convert FailingIter to vim structure',))
-d.update((("a", {"abcF" : FailingIterNext()}),)):(<class 'NotImplementedError'>, NotImplementedError('next',))
-<<< Finished
->>> Testing ConvertFromPyObject using d.update((("a", {"abcF" : %s}),))
-d.update((("a", {"abcF" : None}),)):(<class 'TypeError'>, TypeError('unable to convert NoneType to vim structure',))
-d.update((("a", {"abcF" : {b"": 1}}),)):(<class 'ValueError'>, ValueError('empty keys are not allowed',))
-d.update((("a", {"abcF" : {"": 1}}),)):(<class 'ValueError'>, ValueError('empty keys are not allowed',))
-d.update((("a", {"abcF" : FailingMapping()}),)):(<class 'NotImplementedError'>, NotImplementedError('keys',))
-d.update((("a", {"abcF" : FailingMappingKey()}),)):(<class 'NotImplementedError'>, NotImplementedError('getitem:mappingkey',))
-d.update((("a", {"abcF" : FailingNumber()}),)):(<class 'NotImplementedError'>, NotImplementedError('int',))
-<<< Finished
->>> Testing StringToChars using d.update((("a", Mapping({%s : 1})),))
-d.update((("a", Mapping({1 : 1})),)):(<class 'TypeError'>, TypeError('expected bytes() or str() instance, but got int',))
-d.update((("a", Mapping({b"\0" : 1})),)):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-d.update((("a", Mapping({"\0" : 1})),)):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-<<< Finished
->>> Testing StringToChars using d.update((("a", Mapping({"abcG" : {%s : 1}})),))
-d.update((("a", Mapping({"abcG" : {1 : 1}})),)):(<class 'TypeError'>, TypeError('expected bytes() or str() instance, but got int',))
-d.update((("a", Mapping({"abcG" : {b"\0" : 1}})),)):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-d.update((("a", Mapping({"abcG" : {"\0" : 1}})),)):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-<<< Finished
->>> Testing StringToChars using d.update((("a", Mapping({"abcG" : Mapping({%s : 1})})),))
-d.update((("a", Mapping({"abcG" : Mapping({1 : 1})})),)):(<class 'TypeError'>, TypeError('expected bytes() or str() instance, but got int',))
-d.update((("a", Mapping({"abcG" : Mapping({b"\0" : 1})})),)):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-d.update((("a", Mapping({"abcG" : Mapping({"\0" : 1})})),)):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-<<< Finished
->>> Testing *Iter* using d.update((("a", Mapping({"abcG" : %s})),))
-d.update((("a", Mapping({"abcG" : FailingIter()})),)):(<class 'TypeError'>, TypeError('unable to convert FailingIter to vim structure',))
-d.update((("a", Mapping({"abcG" : FailingIterNext()})),)):(<class 'NotImplementedError'>, NotImplementedError('next',))
-<<< Finished
->>> Testing ConvertFromPyObject using d.update((("a", Mapping({"abcG" : %s})),))
-d.update((("a", Mapping({"abcG" : None})),)):(<class 'TypeError'>, TypeError('unable to convert NoneType to vim structure',))
-d.update((("a", Mapping({"abcG" : {b"": 1}})),)):(<class 'ValueError'>, ValueError('empty keys are not allowed',))
-d.update((("a", Mapping({"abcG" : {"": 1}})),)):(<class 'ValueError'>, ValueError('empty keys are not allowed',))
-d.update((("a", Mapping({"abcG" : FailingMapping()})),)):(<class 'NotImplementedError'>, NotImplementedError('keys',))
-d.update((("a", Mapping({"abcG" : FailingMappingKey()})),)):(<class 'NotImplementedError'>, NotImplementedError('getitem:mappingkey',))
-d.update((("a", Mapping({"abcG" : FailingNumber()})),)):(<class 'NotImplementedError'>, NotImplementedError('int',))
-<<< Finished
->>> Testing *Iter* using d.update((("a", %s),))
-d.update((("a", FailingIter()),)):(<class 'TypeError'>, TypeError('unable to convert FailingIter to vim structure',))
-d.update((("a", FailingIterNext()),)):(<class 'NotImplementedError'>, NotImplementedError('next',))
-<<< Finished
->>> Testing ConvertFromPyObject using d.update((("a", %s),))
-d.update((("a", None),)):(<class 'TypeError'>, TypeError('unable to convert NoneType to vim structure',))
-d.update((("a", {b"": 1}),)):(<class 'ValueError'>, ValueError('empty keys are not allowed',))
-d.update((("a", {"": 1}),)):(<class 'ValueError'>, ValueError('empty keys are not allowed',))
-d.update((("a", FailingMapping()),)):(<class 'NotImplementedError'>, NotImplementedError('keys',))
-d.update((("a", FailingMappingKey()),)):(<class 'NotImplementedError'>, NotImplementedError('getitem:mappingkey',))
-d.update((("a", FailingNumber()),)):(<class 'NotImplementedError'>, NotImplementedError('int',))
-<<< Finished
->> DictionaryPopItem
-d.popitem(1, 2):(<class 'TypeError'>, TypeError('popitem() takes no arguments (2 given)',))
->> DictionaryHasKey
-d.has_key():(<class 'TypeError'>, TypeError('has_key() takes exactly one argument (0 given)',))
-> List
->> ListConstructor
-vim.List(1, 2):(<class 'TypeError'>, TypeError('function takes at most 1 argument (2 given)',))
-vim.List(a=1):(<class 'TypeError'>, TypeError('list constructor does not accept keyword arguments',))
->>> Testing *Iter* using vim.List(%s)
-vim.List(FailingIter()):(<class 'NotImplementedError'>, NotImplementedError('iter',))
-vim.List(FailingIterNext()):(<class 'NotImplementedError'>, NotImplementedError('next',))
-<<< Finished
->>> Testing StringToChars using vim.List([{%s : 1}])
-vim.List([{1 : 1}]):(<class 'TypeError'>, TypeError('expected bytes() or str() instance, but got int',))
-vim.List([{b"\0" : 1}]):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-vim.List([{"\0" : 1}]):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-<<< Finished
->>> Testing StringToChars using vim.List([{"abcF" : {%s : 1}}])
-vim.List([{"abcF" : {1 : 1}}]):(<class 'TypeError'>, TypeError('expected bytes() or str() instance, but got int',))
-vim.List([{"abcF" : {b"\0" : 1}}]):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-vim.List([{"abcF" : {"\0" : 1}}]):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-<<< Finished
->>> Testing StringToChars using vim.List([{"abcF" : Mapping({%s : 1})}])
-vim.List([{"abcF" : Mapping({1 : 1})}]):(<class 'TypeError'>, TypeError('expected bytes() or str() instance, but got int',))
-vim.List([{"abcF" : Mapping({b"\0" : 1})}]):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-vim.List([{"abcF" : Mapping({"\0" : 1})}]):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-<<< Finished
->>> Testing *Iter* using vim.List([{"abcF" : %s}])
-vim.List([{"abcF" : FailingIter()}]):(<class 'TypeError'>, TypeError('unable to convert FailingIter to vim structure',))
-vim.List([{"abcF" : FailingIterNext()}]):(<class 'NotImplementedError'>, NotImplementedError('next',))
-<<< Finished
->>> Testing ConvertFromPyObject using vim.List([{"abcF" : %s}])
-vim.List([{"abcF" : None}]):(<class 'TypeError'>, TypeError('unable to convert NoneType to vim structure',))
-vim.List([{"abcF" : {b"": 1}}]):(<class 'ValueError'>, ValueError('empty keys are not allowed',))
-vim.List([{"abcF" : {"": 1}}]):(<class 'ValueError'>, ValueError('empty keys are not allowed',))
-vim.List([{"abcF" : FailingMapping()}]):(<class 'NotImplementedError'>, NotImplementedError('keys',))
-vim.List([{"abcF" : FailingMappingKey()}]):(<class 'NotImplementedError'>, NotImplementedError('getitem:mappingkey',))
-vim.List([{"abcF" : FailingNumber()}]):(<class 'NotImplementedError'>, NotImplementedError('int',))
-<<< Finished
->>> Testing StringToChars using vim.List([Mapping({%s : 1})])
-vim.List([Mapping({1 : 1})]):(<class 'TypeError'>, TypeError('expected bytes() or str() instance, but got int',))
-vim.List([Mapping({b"\0" : 1})]):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-vim.List([Mapping({"\0" : 1})]):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-<<< Finished
->>> Testing StringToChars using vim.List([Mapping({"abcG" : {%s : 1}})])
-vim.List([Mapping({"abcG" : {1 : 1}})]):(<class 'TypeError'>, TypeError('expected bytes() or str() instance, but got int',))
-vim.List([Mapping({"abcG" : {b"\0" : 1}})]):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-vim.List([Mapping({"abcG" : {"\0" : 1}})]):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-<<< Finished
->>> Testing StringToChars using vim.List([Mapping({"abcG" : Mapping({%s : 1})})])
-vim.List([Mapping({"abcG" : Mapping({1 : 1})})]):(<class 'TypeError'>, TypeError('expected bytes() or str() instance, but got int',))
-vim.List([Mapping({"abcG" : Mapping({b"\0" : 1})})]):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-vim.List([Mapping({"abcG" : Mapping({"\0" : 1})})]):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-<<< Finished
->>> Testing *Iter* using vim.List([Mapping({"abcG" : %s})])
-vim.List([Mapping({"abcG" : FailingIter()})]):(<class 'TypeError'>, TypeError('unable to convert FailingIter to vim structure',))
-vim.List([Mapping({"abcG" : FailingIterNext()})]):(<class 'NotImplementedError'>, NotImplementedError('next',))
-<<< Finished
->>> Testing ConvertFromPyObject using vim.List([Mapping({"abcG" : %s})])
-vim.List([Mapping({"abcG" : None})]):(<class 'TypeError'>, TypeError('unable to convert NoneType to vim structure',))
-vim.List([Mapping({"abcG" : {b"": 1}})]):(<class 'ValueError'>, ValueError('empty keys are not allowed',))
-vim.List([Mapping({"abcG" : {"": 1}})]):(<class 'ValueError'>, ValueError('empty keys are not allowed',))
-vim.List([Mapping({"abcG" : FailingMapping()})]):(<class 'NotImplementedError'>, NotImplementedError('keys',))
-vim.List([Mapping({"abcG" : FailingMappingKey()})]):(<class 'NotImplementedError'>, NotImplementedError('getitem:mappingkey',))
-vim.List([Mapping({"abcG" : FailingNumber()})]):(<class 'NotImplementedError'>, NotImplementedError('int',))
-<<< Finished
->>> Testing *Iter* using vim.List([%s])
-vim.List([FailingIter()]):(<class 'TypeError'>, TypeError('unable to convert FailingIter to vim structure',))
-vim.List([FailingIterNext()]):(<class 'NotImplementedError'>, NotImplementedError('next',))
-<<< Finished
->>> Testing ConvertFromPyObject using vim.List([%s])
-vim.List([None]):(<class 'TypeError'>, TypeError('unable to convert NoneType to vim structure',))
-vim.List([{b"": 1}]):(<class 'ValueError'>, ValueError('empty keys are not allowed',))
-vim.List([{"": 1}]):(<class 'ValueError'>, ValueError('empty keys are not allowed',))
-vim.List([FailingMapping()]):(<class 'NotImplementedError'>, NotImplementedError('keys',))
-vim.List([FailingMappingKey()]):(<class 'NotImplementedError'>, NotImplementedError('getitem:mappingkey',))
-vim.List([FailingNumber()]):(<class 'NotImplementedError'>, NotImplementedError('int',))
-<<< Finished
->> ListItem
-l[1000]:(<class 'IndexError'>, IndexError('list index out of range',))
->> ListAssItem
-ll[1] = 2:(<class 'vim.error'>, error('list is locked',))
-l[1000] = 3:(<class 'IndexError'>, IndexError('list index out of range',))
->> ListAssSlice
-ll[1:100] = "abcJ":(<class 'vim.error'>, error('list is locked',))
->>> Testing *Iter* using l[:] = %s
-l[:] = FailingIter():(<class 'NotImplementedError'>, NotImplementedError('iter',))
-l[:] = FailingIterNext():(<class 'NotImplementedError'>, NotImplementedError('next',))
-<<< Finished
-nel[1:10:2] = "abcK":(<class 'ValueError'>, ValueError('attempt to assign sequence of size greater then 2 to extended slice',))
-(b'a', b'b', b'c', b'O')
-nel[1:10:2] = "a":(<class 'ValueError'>, ValueError('attempt to assign sequence of size 1 to extended slice of size 2',))
-(b'a', b'b', b'c', b'O')
-nel[1:1:-1] = "a":(<class 'ValueError'>, ValueError('attempt to assign sequence of size greater then 0 to extended slice',))
-(b'a', b'b', b'c', b'O')
-nel[:] = FailingIterNextN(2):(<class 'NotImplementedError'>, NotImplementedError('next N',))
-(b'a', b'b', b'c', b'O')
->>> Testing StringToChars using l[:] = [{%s : 1}]
-l[:] = [{1 : 1}]:(<class 'TypeError'>, TypeError('expected bytes() or str() instance, but got int',))
-l[:] = [{b"\0" : 1}]:(<class 'TypeError'>, TypeError('expected bytes with no null',))
-l[:] = [{"\0" : 1}]:(<class 'TypeError'>, TypeError('expected bytes with no null',))
-<<< Finished
->>> Testing StringToChars using l[:] = [{"abcF" : {%s : 1}}]
-l[:] = [{"abcF" : {1 : 1}}]:(<class 'TypeError'>, TypeError('expected bytes() or str() instance, but got int',))
-l[:] = [{"abcF" : {b"\0" : 1}}]:(<class 'TypeError'>, TypeError('expected bytes with no null',))
-l[:] = [{"abcF" : {"\0" : 1}}]:(<class 'TypeError'>, TypeError('expected bytes with no null',))
-<<< Finished
->>> Testing StringToChars using l[:] = [{"abcF" : Mapping({%s : 1})}]
-l[:] = [{"abcF" : Mapping({1 : 1})}]:(<class 'TypeError'>, TypeError('expected bytes() or str() instance, but got int',))
-l[:] = [{"abcF" : Mapping({b"\0" : 1})}]:(<class 'TypeError'>, TypeError('expected bytes with no null',))
-l[:] = [{"abcF" : Mapping({"\0" : 1})}]:(<class 'TypeError'>, TypeError('expected bytes with no null',))
-<<< Finished
->>> Testing *Iter* using l[:] = [{"abcF" : %s}]
-l[:] = [{"abcF" : FailingIter()}]:(<class 'TypeError'>, TypeError('unable to convert FailingIter to vim structure',))
-l[:] = [{"abcF" : FailingIterNext()}]:(<class 'NotImplementedError'>, NotImplementedError('next',))
-<<< Finished
->>> Testing ConvertFromPyObject using l[:] = [{"abcF" : %s}]
-l[:] = [{"abcF" : None}]:(<class 'TypeError'>, TypeError('unable to convert NoneType to vim structure',))
-l[:] = [{"abcF" : {b"": 1}}]:(<class 'ValueError'>, ValueError('empty keys are not allowed',))
-l[:] = [{"abcF" : {"": 1}}]:(<class 'ValueError'>, ValueError('empty keys are not allowed',))
-l[:] = [{"abcF" : FailingMapping()}]:(<class 'NotImplementedError'>, NotImplementedError('keys',))
-l[:] = [{"abcF" : FailingMappingKey()}]:(<class 'NotImplementedError'>, NotImplementedError('getitem:mappingkey',))
-l[:] = [{"abcF" : FailingNumber()}]:(<class 'NotImplementedError'>, NotImplementedError('int',))
-<<< Finished
->>> Testing StringToChars using l[:] = [Mapping({%s : 1})]
-l[:] = [Mapping({1 : 1})]:(<class 'TypeError'>, TypeError('expected bytes() or str() instance, but got int',))
-l[:] = [Mapping({b"\0" : 1})]:(<class 'TypeError'>, TypeError('expected bytes with no null',))
-l[:] = [Mapping({"\0" : 1})]:(<class 'TypeError'>, TypeError('expected bytes with no null',))
-<<< Finished
->>> Testing StringToChars using l[:] = [Mapping({"abcG" : {%s : 1}})]
-l[:] = [Mapping({"abcG" : {1 : 1}})]:(<class 'TypeError'>, TypeError('expected bytes() or str() instance, but got int',))
-l[:] = [Mapping({"abcG" : {b"\0" : 1}})]:(<class 'TypeError'>, TypeError('expected bytes with no null',))
-l[:] = [Mapping({"abcG" : {"\0" : 1}})]:(<class 'TypeError'>, TypeError('expected bytes with no null',))
-<<< Finished
->>> Testing StringToChars using l[:] = [Mapping({"abcG" : Mapping({%s : 1})})]
-l[:] = [Mapping({"abcG" : Mapping({1 : 1})})]:(<class 'TypeError'>, TypeError('expected bytes() or str() instance, but got int',))
-l[:] = [Mapping({"abcG" : Mapping({b"\0" : 1})})]:(<class 'TypeError'>, TypeError('expected bytes with no null',))
-l[:] = [Mapping({"abcG" : Mapping({"\0" : 1})})]:(<class 'TypeError'>, TypeError('expected bytes with no null',))
-<<< Finished
->>> Testing *Iter* using l[:] = [Mapping({"abcG" : %s})]
-l[:] = [Mapping({"abcG" : FailingIter()})]:(<class 'TypeError'>, TypeError('unable to convert FailingIter to vim structure',))
-l[:] = [Mapping({"abcG" : FailingIterNext()})]:(<class 'NotImplementedError'>, NotImplementedError('next',))
-<<< Finished
->>> Testing ConvertFromPyObject using l[:] = [Mapping({"abcG" : %s})]
-l[:] = [Mapping({"abcG" : None})]:(<class 'TypeError'>, TypeError('unable to convert NoneType to vim structure',))
-l[:] = [Mapping({"abcG" : {b"": 1}})]:(<class 'ValueError'>, ValueError('empty keys are not allowed',))
-l[:] = [Mapping({"abcG" : {"": 1}})]:(<class 'ValueError'>, ValueError('empty keys are not allowed',))
-l[:] = [Mapping({"abcG" : FailingMapping()})]:(<class 'NotImplementedError'>, NotImplementedError('keys',))
-l[:] = [Mapping({"abcG" : FailingMappingKey()})]:(<class 'NotImplementedError'>, NotImplementedError('getitem:mappingkey',))
-l[:] = [Mapping({"abcG" : FailingNumber()})]:(<class 'NotImplementedError'>, NotImplementedError('int',))
-<<< Finished
->>> Testing *Iter* using l[:] = [%s]
-l[:] = [FailingIter()]:(<class 'TypeError'>, TypeError('unable to convert FailingIter to vim structure',))
-l[:] = [FailingIterNext()]:(<class 'NotImplementedError'>, NotImplementedError('next',))
-<<< Finished
->>> Testing ConvertFromPyObject using l[:] = [%s]
-l[:] = [None]:(<class 'TypeError'>, TypeError('unable to convert NoneType to vim structure',))
-l[:] = [{b"": 1}]:(<class 'ValueError'>, ValueError('empty keys are not allowed',))
-l[:] = [{"": 1}]:(<class 'ValueError'>, ValueError('empty keys are not allowed',))
-l[:] = [FailingMapping()]:(<class 'NotImplementedError'>, NotImplementedError('keys',))
-l[:] = [FailingMappingKey()]:(<class 'NotImplementedError'>, NotImplementedError('getitem:mappingkey',))
-l[:] = [FailingNumber()]:(<class 'NotImplementedError'>, NotImplementedError('int',))
-<<< Finished
->> ListConcatInPlace
->>> Testing *Iter* using l.extend(%s)
-l.extend(FailingIter()):(<class 'NotImplementedError'>, NotImplementedError('iter',))
-l.extend(FailingIterNext()):(<class 'NotImplementedError'>, NotImplementedError('next',))
-<<< Finished
->>> Testing StringToChars using l.extend([{%s : 1}])
-l.extend([{1 : 1}]):(<class 'TypeError'>, TypeError('expected bytes() or str() instance, but got int',))
-l.extend([{b"\0" : 1}]):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-l.extend([{"\0" : 1}]):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-<<< Finished
->>> Testing StringToChars using l.extend([{"abcF" : {%s : 1}}])
-l.extend([{"abcF" : {1 : 1}}]):(<class 'TypeError'>, TypeError('expected bytes() or str() instance, but got int',))
-l.extend([{"abcF" : {b"\0" : 1}}]):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-l.extend([{"abcF" : {"\0" : 1}}]):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-<<< Finished
->>> Testing StringToChars using l.extend([{"abcF" : Mapping({%s : 1})}])
-l.extend([{"abcF" : Mapping({1 : 1})}]):(<class 'TypeError'>, TypeError('expected bytes() or str() instance, but got int',))
-l.extend([{"abcF" : Mapping({b"\0" : 1})}]):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-l.extend([{"abcF" : Mapping({"\0" : 1})}]):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-<<< Finished
->>> Testing *Iter* using l.extend([{"abcF" : %s}])
-l.extend([{"abcF" : FailingIter()}]):(<class 'TypeError'>, TypeError('unable to convert FailingIter to vim structure',))
-l.extend([{"abcF" : FailingIterNext()}]):(<class 'NotImplementedError'>, NotImplementedError('next',))
-<<< Finished
->>> Testing ConvertFromPyObject using l.extend([{"abcF" : %s}])
-l.extend([{"abcF" : None}]):(<class 'TypeError'>, TypeError('unable to convert NoneType to vim structure',))
-l.extend([{"abcF" : {b"": 1}}]):(<class 'ValueError'>, ValueError('empty keys are not allowed',))
-l.extend([{"abcF" : {"": 1}}]):(<class 'ValueError'>, ValueError('empty keys are not allowed',))
-l.extend([{"abcF" : FailingMapping()}]):(<class 'NotImplementedError'>, NotImplementedError('keys',))
-l.extend([{"abcF" : FailingMappingKey()}]):(<class 'NotImplementedError'>, NotImplementedError('getitem:mappingkey',))
-l.extend([{"abcF" : FailingNumber()}]):(<class 'NotImplementedError'>, NotImplementedError('int',))
-<<< Finished
->>> Testing StringToChars using l.extend([Mapping({%s : 1})])
-l.extend([Mapping({1 : 1})]):(<class 'TypeError'>, TypeError('expected bytes() or str() instance, but got int',))
-l.extend([Mapping({b"\0" : 1})]):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-l.extend([Mapping({"\0" : 1})]):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-<<< Finished
->>> Testing StringToChars using l.extend([Mapping({"abcG" : {%s : 1}})])
-l.extend([Mapping({"abcG" : {1 : 1}})]):(<class 'TypeError'>, TypeError('expected bytes() or str() instance, but got int',))
-l.extend([Mapping({"abcG" : {b"\0" : 1}})]):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-l.extend([Mapping({"abcG" : {"\0" : 1}})]):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-<<< Finished
->>> Testing StringToChars using l.extend([Mapping({"abcG" : Mapping({%s : 1})})])
-l.extend([Mapping({"abcG" : Mapping({1 : 1})})]):(<class 'TypeError'>, TypeError('expected bytes() or str() instance, but got int',))
-l.extend([Mapping({"abcG" : Mapping({b"\0" : 1})})]):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-l.extend([Mapping({"abcG" : Mapping({"\0" : 1})})]):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-<<< Finished
->>> Testing *Iter* using l.extend([Mapping({"abcG" : %s})])
-l.extend([Mapping({"abcG" : FailingIter()})]):(<class 'TypeError'>, TypeError('unable to convert FailingIter to vim structure',))
-l.extend([Mapping({"abcG" : FailingIterNext()})]):(<class 'NotImplementedError'>, NotImplementedError('next',))
-<<< Finished
->>> Testing ConvertFromPyObject using l.extend([Mapping({"abcG" : %s})])
-l.extend([Mapping({"abcG" : None})]):(<class 'TypeError'>, TypeError('unable to convert NoneType to vim structure',))
-l.extend([Mapping({"abcG" : {b"": 1}})]):(<class 'ValueError'>, ValueError('empty keys are not allowed',))
-l.extend([Mapping({"abcG" : {"": 1}})]):(<class 'ValueError'>, ValueError('empty keys are not allowed',))
-l.extend([Mapping({"abcG" : FailingMapping()})]):(<class 'NotImplementedError'>, NotImplementedError('keys',))
-l.extend([Mapping({"abcG" : FailingMappingKey()})]):(<class 'NotImplementedError'>, NotImplementedError('getitem:mappingkey',))
-l.extend([Mapping({"abcG" : FailingNumber()})]):(<class 'NotImplementedError'>, NotImplementedError('int',))
-<<< Finished
->>> Testing *Iter* using l.extend([%s])
-l.extend([FailingIter()]):(<class 'TypeError'>, TypeError('unable to convert FailingIter to vim structure',))
-l.extend([FailingIterNext()]):(<class 'NotImplementedError'>, NotImplementedError('next',))
-<<< Finished
->>> Testing ConvertFromPyObject using l.extend([%s])
-l.extend([None]):(<class 'TypeError'>, TypeError('unable to convert NoneType to vim structure',))
-l.extend([{b"": 1}]):(<class 'ValueError'>, ValueError('empty keys are not allowed',))
-l.extend([{"": 1}]):(<class 'ValueError'>, ValueError('empty keys are not allowed',))
-l.extend([FailingMapping()]):(<class 'NotImplementedError'>, NotImplementedError('keys',))
-l.extend([FailingMappingKey()]):(<class 'NotImplementedError'>, NotImplementedError('getitem:mappingkey',))
-l.extend([FailingNumber()]):(<class 'NotImplementedError'>, NotImplementedError('int',))
-<<< Finished
->> ListSetattr
-del l.locked:(<class 'AttributeError'>, AttributeError('cannot delete vim.List attributes',))
-l.locked = FailingTrue():(<class 'NotImplementedError'>, NotImplementedError('bool',))
-l.xxx = True:(<class 'AttributeError'>, AttributeError('cannot set attribute xxx',))
-> Function
->> FunctionConstructor
-vim.Function("123"):(<class 'ValueError'>, ValueError('unnamed function 123 does not exist',))
-vim.Function("xxx_non_existent_function_xxx"):(<class 'ValueError'>, ValueError('function xxx_non_existent_function_xxx does not exist',))
-vim.Function("xxx#non#existent#function#xxx"):NOT FAILED
->> FunctionCall
->>> Testing StringToChars using f({%s : 1})
-f({1 : 1}):(<class 'TypeError'>, TypeError('expected bytes() or str() instance, but got int',))
-f({b"\0" : 1}):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-f({"\0" : 1}):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-<<< Finished
->>> Testing StringToChars using f({"abcF" : {%s : 1}})
-f({"abcF" : {1 : 1}}):(<class 'TypeError'>, TypeError('expected bytes() or str() instance, but got int',))
-f({"abcF" : {b"\0" : 1}}):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-f({"abcF" : {"\0" : 1}}):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-<<< Finished
->>> Testing StringToChars using f({"abcF" : Mapping({%s : 1})})
-f({"abcF" : Mapping({1 : 1})}):(<class 'TypeError'>, TypeError('expected bytes() or str() instance, but got int',))
-f({"abcF" : Mapping({b"\0" : 1})}):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-f({"abcF" : Mapping({"\0" : 1})}):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-<<< Finished
->>> Testing *Iter* using f({"abcF" : %s})
-f({"abcF" : FailingIter()}):(<class 'TypeError'>, TypeError('unable to convert FailingIter to vim structure',))
-f({"abcF" : FailingIterNext()}):(<class 'NotImplementedError'>, NotImplementedError('next',))
-<<< Finished
->>> Testing ConvertFromPyObject using f({"abcF" : %s})
-f({"abcF" : None}):(<class 'TypeError'>, TypeError('unable to convert NoneType to vim structure',))
-f({"abcF" : {b"": 1}}):(<class 'ValueError'>, ValueError('empty keys are not allowed',))
-f({"abcF" : {"": 1}}):(<class 'ValueError'>, ValueError('empty keys are not allowed',))
-f({"abcF" : FailingMapping()}):(<class 'NotImplementedError'>, NotImplementedError('keys',))
-f({"abcF" : FailingMappingKey()}):(<class 'NotImplementedError'>, NotImplementedError('getitem:mappingkey',))
-f({"abcF" : FailingNumber()}):(<class 'NotImplementedError'>, NotImplementedError('int',))
-<<< Finished
->>> Testing StringToChars using f(Mapping({%s : 1}))
-f(Mapping({1 : 1})):(<class 'TypeError'>, TypeError('expected bytes() or str() instance, but got int',))
-f(Mapping({b"\0" : 1})):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-f(Mapping({"\0" : 1})):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-<<< Finished
->>> Testing StringToChars using f(Mapping({"abcG" : {%s : 1}}))
-f(Mapping({"abcG" : {1 : 1}})):(<class 'TypeError'>, TypeError('expected bytes() or str() instance, but got int',))
-f(Mapping({"abcG" : {b"\0" : 1}})):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-f(Mapping({"abcG" : {"\0" : 1}})):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-<<< Finished
->>> Testing StringToChars using f(Mapping({"abcG" : Mapping({%s : 1})}))
-f(Mapping({"abcG" : Mapping({1 : 1})})):(<class 'TypeError'>, TypeError('expected bytes() or str() instance, but got int',))
-f(Mapping({"abcG" : Mapping({b"\0" : 1})})):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-f(Mapping({"abcG" : Mapping({"\0" : 1})})):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-<<< Finished
->>> Testing *Iter* using f(Mapping({"abcG" : %s}))
-f(Mapping({"abcG" : FailingIter()})):(<class 'TypeError'>, TypeError('unable to convert FailingIter to vim structure',))
-f(Mapping({"abcG" : FailingIterNext()})):(<class 'NotImplementedError'>, NotImplementedError('next',))
-<<< Finished
->>> Testing ConvertFromPyObject using f(Mapping({"abcG" : %s}))
-f(Mapping({"abcG" : None})):(<class 'TypeError'>, TypeError('unable to convert NoneType to vim structure',))
-f(Mapping({"abcG" : {b"": 1}})):(<class 'ValueError'>, ValueError('empty keys are not allowed',))
-f(Mapping({"abcG" : {"": 1}})):(<class 'ValueError'>, ValueError('empty keys are not allowed',))
-f(Mapping({"abcG" : FailingMapping()})):(<class 'NotImplementedError'>, NotImplementedError('keys',))
-f(Mapping({"abcG" : FailingMappingKey()})):(<class 'NotImplementedError'>, NotImplementedError('getitem:mappingkey',))
-f(Mapping({"abcG" : FailingNumber()})):(<class 'NotImplementedError'>, NotImplementedError('int',))
-<<< Finished
->>> Testing *Iter* using f(%s)
-f(FailingIter()):(<class 'TypeError'>, TypeError('unable to convert FailingIter to vim structure',))
-f(FailingIterNext()):(<class 'NotImplementedError'>, NotImplementedError('next',))
-<<< Finished
->>> Testing ConvertFromPyObject using f(%s)
-f(None):(<class 'TypeError'>, TypeError('unable to convert NoneType to vim structure',))
-f({b"": 1}):(<class 'ValueError'>, ValueError('empty keys are not allowed',))
-f({"": 1}):(<class 'ValueError'>, ValueError('empty keys are not allowed',))
-f(FailingMapping()):(<class 'NotImplementedError'>, NotImplementedError('keys',))
-f(FailingMappingKey()):(<class 'NotImplementedError'>, NotImplementedError('getitem:mappingkey',))
-f(FailingNumber()):(<class 'NotImplementedError'>, NotImplementedError('int',))
-<<< Finished
->>> Testing StringToChars using fd(self={%s : 1})
-fd(self={1 : 1}):(<class 'TypeError'>, TypeError('expected bytes() or str() instance, but got int',))
-fd(self={b"\0" : 1}):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-fd(self={"\0" : 1}):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-<<< Finished
->>> Testing StringToChars using fd(self={"abcF" : {%s : 1}})
-fd(self={"abcF" : {1 : 1}}):(<class 'TypeError'>, TypeError('expected bytes() or str() instance, but got int',))
-fd(self={"abcF" : {b"\0" : 1}}):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-fd(self={"abcF" : {"\0" : 1}}):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-<<< Finished
->>> Testing StringToChars using fd(self={"abcF" : Mapping({%s : 1})})
-fd(self={"abcF" : Mapping({1 : 1})}):(<class 'TypeError'>, TypeError('expected bytes() or str() instance, but got int',))
-fd(self={"abcF" : Mapping({b"\0" : 1})}):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-fd(self={"abcF" : Mapping({"\0" : 1})}):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-<<< Finished
->>> Testing *Iter* using fd(self={"abcF" : %s})
-fd(self={"abcF" : FailingIter()}):(<class 'TypeError'>, TypeError('unable to convert FailingIter to vim structure',))
-fd(self={"abcF" : FailingIterNext()}):(<class 'NotImplementedError'>, NotImplementedError('next',))
-<<< Finished
->>> Testing ConvertFromPyObject using fd(self={"abcF" : %s})
-fd(self={"abcF" : None}):(<class 'TypeError'>, TypeError('unable to convert NoneType to vim structure',))
-fd(self={"abcF" : {b"": 1}}):(<class 'ValueError'>, ValueError('empty keys are not allowed',))
-fd(self={"abcF" : {"": 1}}):(<class 'ValueError'>, ValueError('empty keys are not allowed',))
-fd(self={"abcF" : FailingMapping()}):(<class 'NotImplementedError'>, NotImplementedError('keys',))
-fd(self={"abcF" : FailingMappingKey()}):(<class 'NotImplementedError'>, NotImplementedError('getitem:mappingkey',))
-fd(self={"abcF" : FailingNumber()}):(<class 'NotImplementedError'>, NotImplementedError('int',))
-<<< Finished
->>> Testing StringToChars using fd(self=Mapping({%s : 1}))
-fd(self=Mapping({1 : 1})):(<class 'TypeError'>, TypeError('expected bytes() or str() instance, but got int',))
-fd(self=Mapping({b"\0" : 1})):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-fd(self=Mapping({"\0" : 1})):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-<<< Finished
->>> Testing StringToChars using fd(self=Mapping({"abcG" : {%s : 1}}))
-fd(self=Mapping({"abcG" : {1 : 1}})):(<class 'TypeError'>, TypeError('expected bytes() or str() instance, but got int',))
-fd(self=Mapping({"abcG" : {b"\0" : 1}})):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-fd(self=Mapping({"abcG" : {"\0" : 1}})):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-<<< Finished
->>> Testing StringToChars using fd(self=Mapping({"abcG" : Mapping({%s : 1})}))
-fd(self=Mapping({"abcG" : Mapping({1 : 1})})):(<class 'TypeError'>, TypeError('expected bytes() or str() instance, but got int',))
-fd(self=Mapping({"abcG" : Mapping({b"\0" : 1})})):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-fd(self=Mapping({"abcG" : Mapping({"\0" : 1})})):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-<<< Finished
->>> Testing *Iter* using fd(self=Mapping({"abcG" : %s}))
-fd(self=Mapping({"abcG" : FailingIter()})):(<class 'TypeError'>, TypeError('unable to convert FailingIter to vim structure',))
-fd(self=Mapping({"abcG" : FailingIterNext()})):(<class 'NotImplementedError'>, NotImplementedError('next',))
-<<< Finished
->>> Testing ConvertFromPyObject using fd(self=Mapping({"abcG" : %s}))
-fd(self=Mapping({"abcG" : None})):(<class 'TypeError'>, TypeError('unable to convert NoneType to vim structure',))
-fd(self=Mapping({"abcG" : {b"": 1}})):(<class 'ValueError'>, ValueError('empty keys are not allowed',))
-fd(self=Mapping({"abcG" : {"": 1}})):(<class 'ValueError'>, ValueError('empty keys are not allowed',))
-fd(self=Mapping({"abcG" : FailingMapping()})):(<class 'NotImplementedError'>, NotImplementedError('keys',))
-fd(self=Mapping({"abcG" : FailingMappingKey()})):(<class 'NotImplementedError'>, NotImplementedError('getitem:mappingkey',))
-fd(self=Mapping({"abcG" : FailingNumber()})):(<class 'NotImplementedError'>, NotImplementedError('int',))
-<<< Finished
->>> Testing *Iter* using fd(self=%s)
-fd(self=FailingIter()):(<class 'TypeError'>, TypeError('unable to convert FailingIter to vim dictionary',))
-fd(self=FailingIterNext()):(<class 'TypeError'>, TypeError('unable to convert FailingIterNext to vim dictionary',))
-<<< Finished
->>> Testing ConvertFromPyObject using fd(self=%s)
-fd(self=None):(<class 'TypeError'>, TypeError('unable to convert NoneType to vim dictionary',))
-fd(self={b"": 1}):(<class 'ValueError'>, ValueError('empty keys are not allowed',))
-fd(self={"": 1}):(<class 'ValueError'>, ValueError('empty keys are not allowed',))
-fd(self=FailingMapping()):(<class 'NotImplementedError'>, NotImplementedError('keys',))
-fd(self=FailingMappingKey()):(<class 'NotImplementedError'>, NotImplementedError('getitem:mappingkey',))
-fd(self=FailingNumber()):(<class 'TypeError'>, TypeError('unable to convert FailingNumber to vim dictionary',))
-<<< Finished
->>> Testing ConvertFromPyMapping using fd(self=%s)
-fd(self=[]):(<class 'AttributeError'>, AttributeError('keys',))
-<<< Finished
-> TabPage
->> TabPageAttr
-vim.current.tabpage.xxx:(<class 'AttributeError'>, AttributeError("'vim.tabpage' object has no attribute 'xxx'",))
-> TabList
->> TabListItem
-vim.tabpages[1000]:(<class 'IndexError'>, IndexError('no such tab page',))
-> Window
->> WindowAttr
-vim.current.window.xxx:(<class 'AttributeError'>, AttributeError("'vim.window' object has no attribute 'xxx'",))
->> WindowSetattr
-vim.current.window.buffer = 0:(<class 'TypeError'>, TypeError('readonly attribute: buffer',))
-vim.current.window.cursor = (100000000, 100000000):(<class 'vim.error'>, error('cursor position outside buffer',))
-vim.current.window.cursor = True:(<class 'TypeError'>, TypeError('argument must be 2-item sequence, not bool',))
->>> Testing NumberToLong using vim.current.window.height = %s
-vim.current.window.height = []:(<class 'TypeError'>, TypeError('expected int() or something supporting coercing to int(), but got list',))
-vim.current.window.height = None:(<class 'TypeError'>, TypeError('expected int() or something supporting coercing to int(), but got NoneType',))
-vim.current.window.height = -1:(<class 'ValueError'>, ValueError('number must be greater or equal to zero',))
-<<< Finished
->>> Testing NumberToLong using vim.current.window.width = %s
-vim.current.window.width = []:(<class 'TypeError'>, TypeError('expected int() or something supporting coercing to int(), but got list',))
-vim.current.window.width = None:(<class 'TypeError'>, TypeError('expected int() or something supporting coercing to int(), but got NoneType',))
-vim.current.window.width = -1:(<class 'ValueError'>, ValueError('number must be greater or equal to zero',))
-<<< Finished
-vim.current.window.xxxxxx = True:(<class 'AttributeError'>, AttributeError('xxxxxx',))
-> WinList
->> WinListItem
-vim.windows[1000]:(<class 'IndexError'>, IndexError('no such window',))
-> Buffer
->> StringToLine (indirect)
-vim.current.buffer[0] = "\na":(<class 'vim.error'>, error('string cannot contain newlines',))
-vim.current.buffer[0] = b"\na":(<class 'vim.error'>, error('string cannot contain newlines',))
->> SetBufferLine (indirect)
-vim.current.buffer[0] = True:(<class 'TypeError'>, TypeError('bad argument type for built-in operation',))
->> SetBufferLineList (indirect)
-vim.current.buffer[:] = True:(<class 'TypeError'>, TypeError('bad argument type for built-in operation',))
-vim.current.buffer[:] = ["\na", "bc"]:(<class 'vim.error'>, error('string cannot contain newlines',))
->> InsertBufferLines (indirect)
-vim.current.buffer.append(None):(<class 'TypeError'>, TypeError('bad argument type for built-in operation',))
-vim.current.buffer.append(["\na", "bc"]):(<class 'vim.error'>, error('string cannot contain newlines',))
-vim.current.buffer.append("\nbc"):(<class 'vim.error'>, error('string cannot contain newlines',))
->> RBItem
-vim.current.buffer[100000000]:(<class 'IndexError'>, IndexError('line number out of range',))
->> RBAsItem
-vim.current.buffer[100000000] = "":(<class 'IndexError'>, IndexError('line number out of range',))
->> BufferAttr
-vim.current.buffer.xxx:(<class 'AttributeError'>, AttributeError("'vim.buffer' object has no attribute 'xxx'",))
->> BufferSetattr
-vim.current.buffer.name = True:(<class 'TypeError'>, TypeError('expected bytes() or str() instance, but got bool',))
-vim.current.buffer.xxx = True:(<class 'AttributeError'>, AttributeError('xxx',))
->> BufferMark
-vim.current.buffer.mark(0):(<class 'TypeError'>, TypeError('expected bytes() or str() instance, but got int',))
-vim.current.buffer.mark("abcM"):(<class 'ValueError'>, ValueError('mark name must be a single character',))
-vim.current.buffer.mark("!"):(<class 'vim.error'>, error('invalid mark name',))
->> BufferRange
-vim.current.buffer.range(1, 2, 3):(<class 'TypeError'>, TypeError('function takes exactly 2 arguments (3 given)',))
-> BufMap
->> BufMapItem
-vim.buffers[100000000]:(<class 'KeyError'>, KeyError(100000000,))
->>> Testing NumberToLong using vim.buffers[%s]
-vim.buffers[[]]:(<class 'TypeError'>, TypeError('expected int() or something supporting coercing to int(), but got list',))
-vim.buffers[None]:(<class 'TypeError'>, TypeError('expected int() or something supporting coercing to int(), but got NoneType',))
-vim.buffers[-1]:(<class 'ValueError'>, ValueError('number must be greater then zero',))
-vim.buffers[0]:(<class 'ValueError'>, ValueError('number must be greater then zero',))
-<<< Finished
-> Current
->> CurrentGetattr
-vim.current.xxx:(<class 'AttributeError'>, AttributeError("'vim.currentdata' object has no attribute 'xxx'",))
->> CurrentSetattr
-vim.current.line = True:(<class 'TypeError'>, TypeError('bad argument type for built-in operation',))
-vim.current.buffer = True:(<class 'TypeError'>, TypeError('expected vim.Buffer object, but got bool',))
-vim.current.window = True:(<class 'TypeError'>, TypeError('expected vim.Window object, but got bool',))
-vim.current.tabpage = True:(<class 'TypeError'>, TypeError('expected vim.TabPage object, but got bool',))
-vim.current.xxx = True:(<class 'AttributeError'>, AttributeError('xxx',))
-['.']
-'.'
-3,xx
-before
-after
-pythonx/topmodule/__init__.py
-pythonx/topmodule/submodule/__init__.py
-pythonx/topmodule/submodule/subsubmodule/subsubsubmodule.py
-vim.command("throw 'abcN'"):(<class 'vim.error'>, error('abcN',))
-Exe("throw 'def'"):(<class 'vim.error'>, error('def',))
-vim.eval("Exe('throw ''ghi''')"):(<class 'vim.error'>, error('ghi',))
-vim.eval("Exe('echoerr ''jkl''')"):(<class 'vim.error'>, error('Vim(echoerr):jkl',))
-vim.eval("Exe('xxx_non_existent_command_xxx')"):(<class 'vim.error'>, error('Vim:E492: Not an editor command: xxx_non_existent_command_xxx',))
-vim.eval("xxx_unknown_function_xxx()"):(<class 'vim.error'>, error('Vim:E117: Unknown function: xxx_unknown_function_xxx',))
-vim.bindeval("Exe('xxx_non_existent_command_xxx')"):(<class 'vim.error'>, error('Vim:E492: Not an editor command: xxx_non_existent_command_xxx',))
-Caught KeyboardInterrupt
-Running :put
-No exception
-
diff --git a/src/nvim/tui/tui.c b/src/nvim/tui/tui.c
index a12ee880d6..2659125d2d 100644
--- a/src/nvim/tui/tui.c
+++ b/src/nvim/tui/tui.c
@@ -1,6 +1,7 @@
#include <assert.h>
#include <stdbool.h>
#include <stdio.h>
+#include <limits.h>
#include <uv.h>
#include <unibilium.h>
@@ -56,10 +57,11 @@ typedef struct {
bool busy;
HlAttrs attrs, print_attrs;
Cell **screen;
+ int showing_mode;
struct {
int enable_mouse, disable_mouse;
int enable_bracketed_paste, disable_bracketed_paste;
- int enter_insert_mode, exit_insert_mode;
+ int enter_insert_mode, enter_replace_mode, exit_insert_mode;
int set_rgb_foreground, set_rgb_background;
} unibi_ext;
} TUIData;
@@ -97,11 +99,13 @@ UI *tui_start(void)
data->can_use_terminal_scroll = true;
data->bufpos = 0;
data->bufsize = sizeof(data->buf) - CNORM_COMMAND_MAX_SIZE;
+ data->showing_mode = 0;
data->unibi_ext.enable_mouse = -1;
data->unibi_ext.disable_mouse = -1;
data->unibi_ext.enable_bracketed_paste = -1;
data->unibi_ext.disable_bracketed_paste = -1;
data->unibi_ext.enter_insert_mode = -1;
+ data->unibi_ext.enter_replace_mode = -1;
data->unibi_ext.exit_insert_mode = -1;
// write output to stderr if stdout is not a tty
@@ -147,8 +151,7 @@ UI *tui_start(void)
ui->busy_stop = tui_busy_stop;
ui->mouse_on = tui_mouse_on;
ui->mouse_off = tui_mouse_off;
- ui->insert_mode = tui_insert_mode;
- ui->normal_mode = tui_normal_mode;
+ ui->mode_change = tui_mode_change;
ui->set_scroll_region = tui_set_scroll_region;
ui->scroll = tui_scroll;
ui->highlight_set = tui_highlight_set;
@@ -177,7 +180,7 @@ static void tui_stop(UI *ui)
// Destroy input stuff
term_input_destroy(data->input);
// Destroy output stuff
- tui_normal_mode(ui);
+ tui_mode_change(ui, NORMAL);
tui_mouse_off(ui);
unibi_out(ui, unibi_exit_attribute_mode);
// cursor should be set to normal before exiting alternate screen
@@ -350,6 +353,11 @@ static void tui_resize(UI *ui, int width, int height)
data->scroll_region.left = 0;
data->scroll_region.right = width - 1;
data->row = data->col = 0;
+
+ // try to resize the terminal window
+ char r[16]; // enough for 9999x9999
+ snprintf(r, sizeof(r), "\x1b[8;%d;%dt", height, width);
+ out(ui, r, strlen(r));
}
static void tui_clear(UI *ui)
@@ -398,16 +406,25 @@ static void tui_mouse_off(UI *ui)
data->mouse_enabled = false;
}
-static void tui_insert_mode(UI *ui)
+static void tui_mode_change(UI *ui, int mode)
{
TUIData *data = ui->data;
- unibi_out(ui, data->unibi_ext.enter_insert_mode);
-}
-static void tui_normal_mode(UI *ui)
-{
- TUIData *data = ui->data;
- unibi_out(ui, data->unibi_ext.exit_insert_mode);
+ if (mode == INSERT) {
+ if (data->showing_mode != INSERT) {
+ unibi_out(ui, data->unibi_ext.enter_insert_mode);
+ }
+ } else if (mode == REPLACE) {
+ if (data->showing_mode != REPLACE) {
+ unibi_out(ui, data->unibi_ext.enter_replace_mode);
+ }
+ } else {
+ assert(mode == NORMAL);
+ if (data->showing_mode != NORMAL) {
+ unibi_out(ui, data->unibi_ext.exit_insert_mode);
+ }
+ }
+ data->showing_mode = mode;
}
static void tui_set_scroll_region(UI *ui, int top, int bot, int left,
@@ -641,12 +658,22 @@ static void update_size(UI *ui)
{
TUIData *data = ui->data;
int width = 0, height = 0;
- // 1 - try from a system call(ioctl/TIOCGWINSZ on unix)
+
+ // 1 - look for non-default 'columns' and 'lines' options during startup
+ if (starting != 0 && (Columns != DFLT_COLS || Rows != DFLT_ROWS)) {
+ assert(Columns >= INT_MIN && Columns <= INT_MAX);
+ assert(Rows >= INT_MIN && Rows <= INT_MAX);
+ width = (int)Columns;
+ height = (int)Rows;
+ goto end;
+ }
+
+ // 2 - try from a system call(ioctl/TIOCGWINSZ on unix)
if (!uv_tty_get_winsize(&data->output_handle, &width, &height)) {
goto end;
}
- // 2 - use $LINES/$COLUMNS if available
+ // 3 - use $LINES/$COLUMNS if available
const char *val;
int advance;
if ((val = os_getenv("LINES"))
@@ -656,15 +683,15 @@ static void update_size(UI *ui)
goto end;
}
- // 3- read from terminfo if available
+ // 4 - read from terminfo if available
height = unibi_get_num(data->ut, unibi_lines);
width = unibi_get_num(data->ut, unibi_columns);
end:
if (width <= 0 || height <= 0) {
- // use a default of 80x24
- width = 80;
- height = 24;
+ // use the defaults
+ width = DFLT_COLS;
+ height = DFLT_ROWS;
}
ui->width = width;
@@ -756,12 +783,10 @@ static void fix_terminfo(TUIData *data)
unibi_set_if_empty(ut, unibi_from_status_line, "\x07");
}
- if (STARTS_WITH(term, "xterm") || STARTS_WITH(term, "rxvt") || inside_tmux) {
- data->unibi_ext.enable_bracketed_paste = (int)unibi_add_ext_str(ut, NULL,
- "\x1b[?2004h");
- data->unibi_ext.disable_bracketed_paste = (int)unibi_add_ext_str(ut, NULL,
- "\x1b[?2004l");
- }
+ data->unibi_ext.enable_bracketed_paste = (int)unibi_add_ext_str(ut, NULL,
+ "\x1b[?2004h");
+ data->unibi_ext.disable_bracketed_paste = (int)unibi_add_ext_str(ut, NULL,
+ "\x1b[?2004l");
#define XTERM_SETAF \
"\x1b[%?%p1%{8}%<%t3%p1%d%e%p1%{16}%<%t9%p1%{8}%-%d%e38;5;%p1%d%;m"
@@ -790,12 +815,16 @@ static void fix_terminfo(TUIData *data)
// iterm
data->unibi_ext.enter_insert_mode = (int)unibi_add_ext_str(ut, NULL,
TMUX_WRAP("\x1b]50;CursorShape=1;BlinkingCursorEnabled=1\x07"));
+ data->unibi_ext.enter_replace_mode = (int)unibi_add_ext_str(ut, NULL,
+ TMUX_WRAP("\x1b]50;CursorShape=2;BlinkingCursorEnabled=1\x07"));
data->unibi_ext.exit_insert_mode = (int)unibi_add_ext_str(ut, NULL,
TMUX_WRAP("\x1b]50;CursorShape=0;BlinkingCursorEnabled=0\x07"));
} else {
// xterm-like sequences for blinking bar and solid block
data->unibi_ext.enter_insert_mode = (int)unibi_add_ext_str(ut, NULL,
TMUX_WRAP("\x1b[5 q"));
+ data->unibi_ext.enter_replace_mode = (int)unibi_add_ext_str(ut, NULL,
+ TMUX_WRAP("\x1b[3 q"));
data->unibi_ext.exit_insert_mode = (int)unibi_add_ext_str(ut, NULL,
TMUX_WRAP("\x1b[2 q"));
}
diff --git a/src/nvim/ui.c b/src/nvim/ui.c
index dc2bc0898c..7e155f9b4f 100644
--- a/src/nvim/ui.c
+++ b/src/nvim/ui.c
@@ -121,7 +121,7 @@ void ui_update_encoding(void)
// May update the shape of the cursor.
void ui_cursor_shape(void)
{
- ui_change_mode();
+ ui_mode_change();
}
void ui_refresh(void)
@@ -469,25 +469,20 @@ static void flush_cursor_update(void)
// Notify that the current mode has changed. Can be used to change cursor
// shape, for example.
-static void ui_change_mode(void)
+static void ui_mode_change(void)
{
- static int showing_insert_mode = MAYBE;
-
+ int mode;
if (!full_screen) {
return;
}
-
- if (State & INSERT) {
- if (showing_insert_mode != TRUE) {
- UI_CALL(insert_mode);
- }
- showing_insert_mode = TRUE;
- } else {
- if (showing_insert_mode != FALSE) {
- UI_CALL(normal_mode);
- }
- showing_insert_mode = FALSE;
- }
+ /* Get a simple UI mode out of State. */
+ if ((State & REPLACE) == REPLACE)
+ mode = REPLACE;
+ else if (State & INSERT)
+ mode = INSERT;
+ else
+ mode = NORMAL;
+ UI_CALL(mode_change, mode);
conceal_check_cursur_line();
}
diff --git a/src/nvim/ui.h b/src/nvim/ui.h
index 76ceec7775..9cfd99c096 100644
--- a/src/nvim/ui.h
+++ b/src/nvim/ui.h
@@ -24,8 +24,7 @@ struct ui_t {
void (*busy_stop)(UI *ui);
void (*mouse_on)(UI *ui);
void (*mouse_off)(UI *ui);
- void (*insert_mode)(UI *ui);
- void (*normal_mode)(UI *ui);
+ void (*mode_change)(UI *ui, int mode);
void (*set_scroll_region)(UI *ui, int top, int bot, int left, int right);
void (*scroll)(UI *ui, int count);
void (*highlight_set)(UI *ui, HlAttrs attrs);
diff --git a/src/nvim/version.c b/src/nvim/version.c
index c7523bbdc7..3962cb7729 100644
--- a/src/nvim/version.c
+++ b/src/nvim/version.c
@@ -71,11 +71,23 @@ static char *features[] = {
// clang-format off
static int included_patches[] = {
+ //790,
+ //789,
+ //788,
+ //787,
+ //786,
+ //785,
+ 784,
+ //783,
+ //782,
+ //781,
+ //780,
+ //779,
//778,
//777,
//776,
- //775,
- //774,
+ 775,
+ 774,
//773,
//772,
//771,
@@ -182,7 +194,7 @@ static int included_patches[] = {
//670,
//669 NA
668,
- //667,
+ 667,
//666 NA
//665,
//664 NA
@@ -249,7 +261,7 @@ static int included_patches[] = {
//603,
//602,
601,
- //600,
+ 600,
599,
//598,
597,
diff --git a/src/nvim/vim.h b/src/nvim/vim.h
index c88a8872f3..17f9cbc310 100644
--- a/src/nvim/vim.h
+++ b/src/nvim/vim.h
@@ -332,20 +332,15 @@ enum {
/* Maximum number of bytes in a multi-byte character. It can be one 32-bit
* character of up to 6 bytes, or one 16-bit character of up to three bytes
* plus six following composing characters of three bytes each. */
-# define MB_MAXBYTES 21
+#define MB_MAXBYTES 21
/* This has to go after the include of proto.h, as proto/gui.pro declares
* functions of these names. The declarations would break if the defines had
* been seen at that stage. But it must be before globals.h, where error_ga
* is declared. */
-#if !defined(FEAT_GUI_W32) && !defined(FEAT_GUI_X11) \
- && !defined(FEAT_GUI_GTK) && !defined(FEAT_GUI_MAC)
-# define mch_errmsg(str) fprintf(stderr, "%s", (str))
-# define display_errors() fflush(stderr)
-# define mch_msg(str) printf("%s", (str))
-#else
-# define USE_MCH_ERRMSG
-#endif
+#define mch_errmsg(str) fprintf(stderr, "%s", (str))
+#define display_errors() fflush(stderr)
+#define mch_msg(str) printf("%s", (str))
#include "nvim/globals.h" /* global variables and messages */
#include "nvim/buffer_defs.h" /* buffer and windows */