|
Karsten Hopp |
f0cc65 |
To: vim_dev@googlegroups.com
|
|
Karsten Hopp |
f0cc65 |
Subject: Patch 7.3.911
|
|
Karsten Hopp |
f0cc65 |
Fcc: outbox
|
|
Karsten Hopp |
f0cc65 |
From: Bram Moolenaar <Bram@moolenaar.net>
|
|
Karsten Hopp |
f0cc65 |
Mime-Version: 1.0
|
|
Karsten Hopp |
f0cc65 |
Content-Type: text/plain; charset=UTF-8
|
|
Karsten Hopp |
f0cc65 |
Content-Transfer-Encoding: 8bit
|
|
Karsten Hopp |
f0cc65 |
------------
|
|
Karsten Hopp |
f0cc65 |
|
|
Karsten Hopp |
f0cc65 |
Patch 7.3.911
|
|
Karsten Hopp |
f0cc65 |
Problem: Python: Access to Vim variables is not so easy.
|
|
Karsten Hopp |
f0cc65 |
Solution: Define vim.vars and vim.vvars. (ZyX)
|
|
Karsten Hopp |
f0cc65 |
Files: runtime/doc/if_pyth.txt, src/eval.c, src/globals.h,
|
|
Karsten Hopp |
f0cc65 |
src/if_py_both.h, src/if_python3.c, src/if_python.c,
|
|
Karsten Hopp |
f0cc65 |
src/testdir/test86.in, src/testdir/test86.ok,
|
|
Karsten Hopp |
f0cc65 |
src/testdir/test87.in, src/testdir/test87.ok
|
|
Karsten Hopp |
f0cc65 |
|
|
Karsten Hopp |
f0cc65 |
|
|
Karsten Hopp |
f0cc65 |
*** ../vim-7.3.910/runtime/doc/if_pyth.txt 2012-09-21 14:00:05.000000000 +0200
|
|
Karsten Hopp |
f0cc65 |
--- runtime/doc/if_pyth.txt 2013-04-24 13:54:23.000000000 +0200
|
|
Karsten Hopp |
f0cc65 |
***************
|
|
Karsten Hopp |
f0cc65 |
*** 54,61 ****
|
|
Karsten Hopp |
f0cc65 |
EOF
|
|
Karsten Hopp |
f0cc65 |
endfunction
|
|
Karsten Hopp |
f0cc65 |
<
|
|
Karsten Hopp |
f0cc65 |
! Note: Python is very sensitive to the indenting. Also make sure the "class"
|
|
Karsten Hopp |
f0cc65 |
! line and "EOF" do not have any indent.
|
|
Karsten Hopp |
f0cc65 |
|
|
Karsten Hopp |
f0cc65 |
*:pyfile* *:pyf*
|
|
Karsten Hopp |
f0cc65 |
:[range]pyf[ile] {file}
|
|
Karsten Hopp |
f0cc65 |
--- 54,61 ----
|
|
Karsten Hopp |
f0cc65 |
EOF
|
|
Karsten Hopp |
f0cc65 |
endfunction
|
|
Karsten Hopp |
f0cc65 |
<
|
|
Karsten Hopp |
f0cc65 |
! Note: Python is very sensitive to the indenting. Make sure the "class" line
|
|
Karsten Hopp |
f0cc65 |
! and "EOF" do not have any indent.
|
|
Karsten Hopp |
f0cc65 |
|
|
Karsten Hopp |
f0cc65 |
*:pyfile* *:pyf*
|
|
Karsten Hopp |
f0cc65 |
:[range]pyf[ile] {file}
|
|
Karsten Hopp |
f0cc65 |
***************
|
|
Karsten Hopp |
f0cc65 |
*** 165,171 ****
|
|
Karsten Hopp |
f0cc65 |
Value Meaning ~
|
|
Karsten Hopp |
f0cc65 |
zero Variable is not locked
|
|
Karsten Hopp |
f0cc65 |
vim.VAR_LOCKED Variable is locked, but can be unlocked
|
|
Karsten Hopp |
f0cc65 |
! vim.VAR_FIXED Variable is locked and can’t be unlocked
|
|
Karsten Hopp |
f0cc65 |
integer constants. If variable is not fixed, you can do
|
|
Karsten Hopp |
f0cc65 |
`var.locked=True` to lock it and `var.locked=False` to unlock.
|
|
Karsten Hopp |
f0cc65 |
There is no recursive locking like |:lockvar|! does. There is also
|
|
Karsten Hopp |
f0cc65 |
--- 165,171 ----
|
|
Karsten Hopp |
f0cc65 |
Value Meaning ~
|
|
Karsten Hopp |
f0cc65 |
zero Variable is not locked
|
|
Karsten Hopp |
f0cc65 |
vim.VAR_LOCKED Variable is locked, but can be unlocked
|
|
Karsten Hopp |
f0cc65 |
! vim.VAR_FIXED Variable is locked and can't be unlocked
|
|
Karsten Hopp |
f0cc65 |
integer constants. If variable is not fixed, you can do
|
|
Karsten Hopp |
f0cc65 |
`var.locked=True` to lock it and `var.locked=False` to unlock.
|
|
Karsten Hopp |
f0cc65 |
There is no recursive locking like |:lockvar|! does. There is also
|
|
Karsten Hopp |
f0cc65 |
***************
|
|
Karsten Hopp |
f0cc65 |
*** 237,242 ****
|
|
Karsten Hopp |
f0cc65 |
--- 237,247 ----
|
|
Karsten Hopp |
f0cc65 |
"current range". A range is a bit like a buffer, but with all access
|
|
Karsten Hopp |
f0cc65 |
restricted to a subset of lines. See |python-range| for more details.
|
|
Karsten Hopp |
f0cc65 |
|
|
Karsten Hopp |
f0cc65 |
+ vim.vars *python-vars*
|
|
Karsten Hopp |
f0cc65 |
+ vim.vvars *python-vvars*
|
|
Karsten Hopp |
f0cc65 |
+ Dictionary-like objects holding dictionaries with global (|g:|) and
|
|
Karsten Hopp |
f0cc65 |
+ vim (|v:|) variables respectively. Identical to `vim.bindeval("g:")`,
|
|
Karsten Hopp |
f0cc65 |
+ but faster.
|
|
Karsten Hopp |
f0cc65 |
|
|
Karsten Hopp |
f0cc65 |
Output from Python *python-output*
|
|
Karsten Hopp |
f0cc65 |
Vim displays all Python code output in the Vim message area. Normal
|
|
Karsten Hopp |
f0cc65 |
***************
|
|
Karsten Hopp |
f0cc65 |
*** 307,312 ****
|
|
Karsten Hopp |
f0cc65 |
--- 312,318 ----
|
|
Karsten Hopp |
f0cc65 |
:py n = len(b) # number of lines
|
|
Karsten Hopp |
f0cc65 |
:py (row,col) = b.mark('a') # named mark
|
|
Karsten Hopp |
f0cc65 |
:py r = b.range(1,5) # a sub-range of the buffer
|
|
Karsten Hopp |
f0cc65 |
+ :py b.vars["foo"] = "bar" # assign b:foo variable
|
|
Karsten Hopp |
f0cc65 |
|
|
Karsten Hopp |
f0cc65 |
==============================================================================
|
|
Karsten Hopp |
f0cc65 |
4. Range objects *python-range*
|
|
Karsten Hopp |
f0cc65 |
***************
|
|
Karsten Hopp |
f0cc65 |
*** 354,359 ****
|
|
Karsten Hopp |
f0cc65 |
--- 360,368 ----
|
|
Karsten Hopp |
f0cc65 |
This is a tuple, (row,col).
|
|
Karsten Hopp |
f0cc65 |
height (read-write) The window height, in rows
|
|
Karsten Hopp |
f0cc65 |
width (read-write) The window width, in columns
|
|
Karsten Hopp |
f0cc65 |
+ vars (read-only) The window |w:| variables. Attribute is
|
|
Karsten Hopp |
f0cc65 |
+ unassignable, but you can change window
|
|
Karsten Hopp |
f0cc65 |
+ variables this way
|
|
Karsten Hopp |
f0cc65 |
The height attribute is writable only if the screen is split horizontally.
|
|
Karsten Hopp |
f0cc65 |
The width attribute is writable only if the screen is split vertically.
|
|
Karsten Hopp |
f0cc65 |
|
|
Karsten Hopp |
f0cc65 |
***************
|
|
Karsten Hopp |
f0cc65 |
*** 385,391 ****
|
|
Karsten Hopp |
f0cc65 |
|
|
Karsten Hopp |
f0cc65 |
*:py3* *:python3*
|
|
Karsten Hopp |
f0cc65 |
The |:py3| and |:python3| commands work similar to |:python|. A simple check
|
|
Karsten Hopp |
f0cc65 |
! if the `:py3` command is wrong: >
|
|
Karsten Hopp |
f0cc65 |
:py3 print("Hello")
|
|
Karsten Hopp |
f0cc65 |
< *:py3file*
|
|
Karsten Hopp |
f0cc65 |
The |:py3file| command works similar to |:pyfile|.
|
|
Karsten Hopp |
f0cc65 |
--- 394,400 ----
|
|
Karsten Hopp |
f0cc65 |
|
|
Karsten Hopp |
f0cc65 |
*:py3* *:python3*
|
|
Karsten Hopp |
f0cc65 |
The |:py3| and |:python3| commands work similar to |:python|. A simple check
|
|
Karsten Hopp |
f0cc65 |
! if the `:py3` command is working: >
|
|
Karsten Hopp |
f0cc65 |
:py3 print("Hello")
|
|
Karsten Hopp |
f0cc65 |
< *:py3file*
|
|
Karsten Hopp |
f0cc65 |
The |:py3file| command works similar to |:pyfile|.
|
|
Karsten Hopp |
f0cc65 |
*** ../vim-7.3.910/src/eval.c 2013-04-15 18:25:55.000000000 +0200
|
|
Karsten Hopp |
f0cc65 |
--- src/eval.c 2013-04-24 14:02:45.000000000 +0200
|
|
Karsten Hopp |
f0cc65 |
***************
|
|
Karsten Hopp |
f0cc65 |
*** 113,124 ****
|
|
Karsten Hopp |
f0cc65 |
static char *e_nofunc = N_("E130: Unknown function: %s");
|
|
Karsten Hopp |
f0cc65 |
static char *e_illvar = N_("E461: Illegal variable name: %s");
|
|
Karsten Hopp |
f0cc65 |
|
|
Karsten Hopp |
f0cc65 |
! /*
|
|
Karsten Hopp |
f0cc65 |
! * All user-defined global variables are stored in dictionary "globvardict".
|
|
Karsten Hopp |
f0cc65 |
! * "globvars_var" is the variable that is used for "g:".
|
|
Karsten Hopp |
f0cc65 |
! */
|
|
Karsten Hopp |
f0cc65 |
! static dict_T globvardict;
|
|
Karsten Hopp |
f0cc65 |
! static dictitem_T globvars_var;
|
|
Karsten Hopp |
f0cc65 |
#define globvarht globvardict.dv_hashtab
|
|
Karsten Hopp |
f0cc65 |
|
|
Karsten Hopp |
f0cc65 |
/*
|
|
Karsten Hopp |
f0cc65 |
--- 113,119 ----
|
|
Karsten Hopp |
f0cc65 |
static char *e_nofunc = N_("E130: Unknown function: %s");
|
|
Karsten Hopp |
f0cc65 |
static char *e_illvar = N_("E461: Illegal variable name: %s");
|
|
Karsten Hopp |
f0cc65 |
|
|
Karsten Hopp |
f0cc65 |
! static dictitem_T globvars_var; /* variable used for g: */
|
|
Karsten Hopp |
f0cc65 |
#define globvarht globvardict.dv_hashtab
|
|
Karsten Hopp |
f0cc65 |
|
|
Karsten Hopp |
f0cc65 |
/*
|
|
Karsten Hopp |
f0cc65 |
***************
|
|
Karsten Hopp |
f0cc65 |
*** 370,381 ****
|
|
Karsten Hopp |
f0cc65 |
#define vv_list vv_di.di_tv.vval.v_list
|
|
Karsten Hopp |
f0cc65 |
#define vv_tv vv_di.di_tv
|
|
Karsten Hopp |
f0cc65 |
|
|
Karsten Hopp |
f0cc65 |
! /*
|
|
Karsten Hopp |
f0cc65 |
! * The v: variables are stored in dictionary "vimvardict".
|
|
Karsten Hopp |
f0cc65 |
! * "vimvars_var" is the variable that is used for the "l:" scope.
|
|
Karsten Hopp |
f0cc65 |
! */
|
|
Karsten Hopp |
f0cc65 |
! static dict_T vimvardict;
|
|
Karsten Hopp |
f0cc65 |
! static dictitem_T vimvars_var;
|
|
Karsten Hopp |
f0cc65 |
#define vimvarht vimvardict.dv_hashtab
|
|
Karsten Hopp |
f0cc65 |
|
|
Karsten Hopp |
f0cc65 |
static void prepare_vimvar __ARGS((int idx, typval_T *save_tv));
|
|
Karsten Hopp |
f0cc65 |
--- 365,371 ----
|
|
Karsten Hopp |
f0cc65 |
#define vv_list vv_di.di_tv.vval.v_list
|
|
Karsten Hopp |
f0cc65 |
#define vv_tv vv_di.di_tv
|
|
Karsten Hopp |
f0cc65 |
|
|
Karsten Hopp |
f0cc65 |
! static dictitem_T vimvars_var; /* variable used for v: */
|
|
Karsten Hopp |
f0cc65 |
#define vimvarht vimvardict.dv_hashtab
|
|
Karsten Hopp |
f0cc65 |
|
|
Karsten Hopp |
f0cc65 |
static void prepare_vimvar __ARGS((int idx, typval_T *save_tv));
|
|
Karsten Hopp |
f0cc65 |
*** ../vim-7.3.910/src/globals.h 2013-03-19 13:33:18.000000000 +0100
|
|
Karsten Hopp |
f0cc65 |
--- src/globals.h 2013-04-24 13:57:51.000000000 +0200
|
|
Karsten Hopp |
f0cc65 |
***************
|
|
Karsten Hopp |
f0cc65 |
*** 180,185 ****
|
|
Karsten Hopp |
f0cc65 |
--- 180,187 ----
|
|
Karsten Hopp |
f0cc65 |
EXTERN int emsg_severe INIT(= FALSE); /* use message of next of several
|
|
Karsten Hopp |
f0cc65 |
emsg() calls for throw */
|
|
Karsten Hopp |
f0cc65 |
EXTERN int did_endif INIT(= FALSE); /* just had ":endif" */
|
|
Karsten Hopp |
f0cc65 |
+ EXTERN dict_T vimvardict; /* Dictionary with v: variables */
|
|
Karsten Hopp |
f0cc65 |
+ EXTERN dict_T globvardict; /* Dictionary with g: variables */
|
|
Karsten Hopp |
f0cc65 |
#endif
|
|
Karsten Hopp |
f0cc65 |
EXTERN int did_emsg; /* set by emsg() when the message
|
|
Karsten Hopp |
f0cc65 |
is displayed or thrown */
|
|
Karsten Hopp |
f0cc65 |
*** ../vim-7.3.910/src/if_py_both.h 2013-04-24 13:47:36.000000000 +0200
|
|
Karsten Hopp |
f0cc65 |
--- src/if_py_both.h 2013-04-24 13:54:23.000000000 +0200
|
|
Karsten Hopp |
f0cc65 |
***************
|
|
Karsten Hopp |
f0cc65 |
*** 1532,1539 ****
|
|
Karsten Hopp |
f0cc65 |
else if (strcmp(name, "width") == 0)
|
|
Karsten Hopp |
f0cc65 |
return Py_BuildValue("l", (long)(W_WIDTH(this->win)));
|
|
Karsten Hopp |
f0cc65 |
#endif
|
|
Karsten Hopp |
f0cc65 |
else if (strcmp(name,"__members__") == 0)
|
|
Karsten Hopp |
f0cc65 |
! return Py_BuildValue("[sss]", "buffer", "cursor", "height");
|
|
Karsten Hopp |
f0cc65 |
else
|
|
Karsten Hopp |
f0cc65 |
return NULL;
|
|
Karsten Hopp |
f0cc65 |
}
|
|
Karsten Hopp |
f0cc65 |
--- 1532,1541 ----
|
|
Karsten Hopp |
f0cc65 |
else if (strcmp(name, "width") == 0)
|
|
Karsten Hopp |
f0cc65 |
return Py_BuildValue("l", (long)(W_WIDTH(this->win)));
|
|
Karsten Hopp |
f0cc65 |
#endif
|
|
Karsten Hopp |
f0cc65 |
+ else if (strcmp(name, "vars") == 0)
|
|
Karsten Hopp |
f0cc65 |
+ return DictionaryNew(this->win->w_vars);
|
|
Karsten Hopp |
f0cc65 |
else if (strcmp(name,"__members__") == 0)
|
|
Karsten Hopp |
f0cc65 |
! return Py_BuildValue("[ssss]", "buffer", "cursor", "height", "vars");
|
|
Karsten Hopp |
f0cc65 |
else
|
|
Karsten Hopp |
f0cc65 |
return NULL;
|
|
Karsten Hopp |
f0cc65 |
}
|
|
Karsten Hopp |
f0cc65 |
***************
|
|
Karsten Hopp |
f0cc65 |
*** 2495,2502 ****
|
|
Karsten Hopp |
f0cc65 |
return Py_BuildValue("s", this->buf->b_ffname);
|
|
Karsten Hopp |
f0cc65 |
else if (strcmp(name, "number") == 0)
|
|
Karsten Hopp |
f0cc65 |
return Py_BuildValue(Py_ssize_t_fmt, this->buf->b_fnum);
|
|
Karsten Hopp |
f0cc65 |
else if (strcmp(name,"__members__") == 0)
|
|
Karsten Hopp |
f0cc65 |
! return Py_BuildValue("[ss]", "name", "number");
|
|
Karsten Hopp |
f0cc65 |
else
|
|
Karsten Hopp |
f0cc65 |
return NULL;
|
|
Karsten Hopp |
f0cc65 |
}
|
|
Karsten Hopp |
f0cc65 |
--- 2497,2506 ----
|
|
Karsten Hopp |
f0cc65 |
return Py_BuildValue("s", this->buf->b_ffname);
|
|
Karsten Hopp |
f0cc65 |
else if (strcmp(name, "number") == 0)
|
|
Karsten Hopp |
f0cc65 |
return Py_BuildValue(Py_ssize_t_fmt, this->buf->b_fnum);
|
|
Karsten Hopp |
f0cc65 |
+ else if (strcmp(name, "vars") == 0)
|
|
Karsten Hopp |
f0cc65 |
+ return DictionaryNew(this->buf->b_vars);
|
|
Karsten Hopp |
f0cc65 |
else if (strcmp(name,"__members__") == 0)
|
|
Karsten Hopp |
f0cc65 |
! return Py_BuildValue("[sss]", "name", "number", "vars");
|
|
Karsten Hopp |
f0cc65 |
else
|
|
Karsten Hopp |
f0cc65 |
return NULL;
|
|
Karsten Hopp |
f0cc65 |
}
|
|
Karsten Hopp |
f0cc65 |
*** ../vim-7.3.910/src/if_python3.c 2013-04-24 13:39:11.000000000 +0200
|
|
Karsten Hopp |
f0cc65 |
--- src/if_python3.c 2013-04-24 13:54:23.000000000 +0200
|
|
Karsten Hopp |
f0cc65 |
***************
|
|
Karsten Hopp |
f0cc65 |
*** 1647,1652 ****
|
|
Karsten Hopp |
f0cc65 |
--- 1647,1655 ----
|
|
Karsten Hopp |
f0cc65 |
Py_INCREF((PyObject *)(void *)&TheWindowList);
|
|
Karsten Hopp |
f0cc65 |
PyModule_AddObject(mod, "windows", (PyObject *)(void *)&TheWindowList);
|
|
Karsten Hopp |
f0cc65 |
|
|
Karsten Hopp |
f0cc65 |
+ PyModule_AddObject(mod, "vars", DictionaryNew(&globvardict));
|
|
Karsten Hopp |
f0cc65 |
+ PyModule_AddObject(mod, "vvars", DictionaryNew(&vimvardict));
|
|
Karsten Hopp |
f0cc65 |
+
|
|
Karsten Hopp |
f0cc65 |
#define ADD_INT_CONSTANT(name, value) \
|
|
Karsten Hopp |
f0cc65 |
tmp = PyLong_FromLong(value); \
|
|
Karsten Hopp |
f0cc65 |
Py_INCREF(tmp); \
|
|
Karsten Hopp |
f0cc65 |
*** ../vim-7.3.910/src/if_python.c 2013-04-24 13:47:36.000000000 +0200
|
|
Karsten Hopp |
f0cc65 |
--- src/if_python.c 2013-04-24 13:54:33.000000000 +0200
|
|
Karsten Hopp |
f0cc65 |
***************
|
|
Karsten Hopp |
f0cc65 |
*** 1330,1335 ****
|
|
Karsten Hopp |
f0cc65 |
--- 1330,1336 ----
|
|
Karsten Hopp |
f0cc65 |
{
|
|
Karsten Hopp |
f0cc65 |
PyObject *mod;
|
|
Karsten Hopp |
f0cc65 |
PyObject *dict;
|
|
Karsten Hopp |
f0cc65 |
+ PyObject *tmp;
|
|
Karsten Hopp |
f0cc65 |
/* The special value is removed from sys.path in Python_Init(). */
|
|
Karsten Hopp |
f0cc65 |
static char *(argv[2]) = {"/must>not&exist/foo", NULL};
|
|
Karsten Hopp |
f0cc65 |
|
|
Karsten Hopp |
f0cc65 |
***************
|
|
Karsten Hopp |
f0cc65 |
*** 1353,1358 ****
|
|
Karsten Hopp |
f0cc65 |
--- 1354,1365 ----
|
|
Karsten Hopp |
f0cc65 |
PyDict_SetItemString(dict, "buffers", (PyObject *)(void *)&TheBufferList);
|
|
Karsten Hopp |
f0cc65 |
PyDict_SetItemString(dict, "current", (PyObject *)(void *)&TheCurrent);
|
|
Karsten Hopp |
f0cc65 |
PyDict_SetItemString(dict, "windows", (PyObject *)(void *)&TheWindowList);
|
|
Karsten Hopp |
f0cc65 |
+ tmp = DictionaryNew(&globvardict);
|
|
Karsten Hopp |
f0cc65 |
+ PyDict_SetItemString(dict, "vars", tmp);
|
|
Karsten Hopp |
f0cc65 |
+ Py_DECREF(tmp);
|
|
Karsten Hopp |
f0cc65 |
+ tmp = DictionaryNew(&vimvardict);
|
|
Karsten Hopp |
f0cc65 |
+ PyDict_SetItemString(dict, "vvars", tmp);
|
|
Karsten Hopp |
f0cc65 |
+ Py_DECREF(tmp);
|
|
Karsten Hopp |
f0cc65 |
PyDict_SetItemString(dict, "VAR_LOCKED", PyInt_FromLong(VAR_LOCKED));
|
|
Karsten Hopp |
f0cc65 |
PyDict_SetItemString(dict, "VAR_FIXED", PyInt_FromLong(VAR_FIXED));
|
|
Karsten Hopp |
f0cc65 |
PyDict_SetItemString(dict, "VAR_SCOPE", PyInt_FromLong(VAR_SCOPE));
|
|
Karsten Hopp |
f0cc65 |
*** ../vim-7.3.910/src/testdir/test86.in 2013-04-05 19:32:30.000000000 +0200
|
|
Karsten Hopp |
f0cc65 |
--- src/testdir/test86.in 2013-04-24 13:54:33.000000000 +0200
|
|
Karsten Hopp |
f0cc65 |
***************
|
|
Karsten Hopp |
f0cc65 |
*** 346,351 ****
|
|
Karsten Hopp |
f0cc65 |
--- 346,364 ----
|
|
Karsten Hopp |
f0cc65 |
:$put =string(pyeval('l'))
|
|
Karsten Hopp |
f0cc65 |
:py l = ll[-10:10]
|
|
Karsten Hopp |
f0cc65 |
:$put =string(pyeval('l'))
|
|
Karsten Hopp |
f0cc65 |
+ :"
|
|
Karsten Hopp |
f0cc65 |
+ :" Vars
|
|
Karsten Hopp |
f0cc65 |
+ :let g:foo = 'bac'
|
|
Karsten Hopp |
f0cc65 |
+ :let w:abc = 'def'
|
|
Karsten Hopp |
f0cc65 |
+ :let b:baz = 'bar'
|
|
Karsten Hopp |
f0cc65 |
+ :try
|
|
Karsten Hopp |
f0cc65 |
+ : throw "Abc"
|
|
Karsten Hopp |
f0cc65 |
+ :catch
|
|
Karsten Hopp |
f0cc65 |
+ : put =pyeval('vim.vvars[''exception'']')
|
|
Karsten Hopp |
f0cc65 |
+ :endtry
|
|
Karsten Hopp |
f0cc65 |
+ :put =pyeval('vim.vars[''foo'']')
|
|
Karsten Hopp |
f0cc65 |
+ :put =pyeval('vim.current.window.vars[''abc'']')
|
|
Karsten Hopp |
f0cc65 |
+ :put =pyeval('vim.current.buffer.vars[''baz'']')
|
|
Karsten Hopp |
f0cc65 |
:endfun
|
|
Karsten Hopp |
f0cc65 |
:"
|
|
Karsten Hopp |
f0cc65 |
:call Test()
|
|
Karsten Hopp |
f0cc65 |
*** ../vim-7.3.910/src/testdir/test86.ok 2013-04-24 13:04:21.000000000 +0200
|
|
Karsten Hopp |
f0cc65 |
--- src/testdir/test86.ok 2013-04-24 13:54:33.000000000 +0200
|
|
Karsten Hopp |
f0cc65 |
***************
|
|
Karsten Hopp |
f0cc65 |
*** 76,78 ****
|
|
Karsten Hopp |
f0cc65 |
--- 76,82 ----
|
|
Karsten Hopp |
f0cc65 |
[0, 1, 2, 3, 4, 5]
|
|
Karsten Hopp |
f0cc65 |
[0, 1, 2, 3, 4, 5]
|
|
Karsten Hopp |
f0cc65 |
[0, 1, 2, 3, 4, 5]
|
|
Karsten Hopp |
f0cc65 |
+ Abc
|
|
Karsten Hopp |
f0cc65 |
+ bac
|
|
Karsten Hopp |
f0cc65 |
+ def
|
|
Karsten Hopp |
f0cc65 |
+ bar
|
|
Karsten Hopp |
f0cc65 |
*** ../vim-7.3.910/src/testdir/test87.in 2013-02-13 14:17:00.000000000 +0100
|
|
Karsten Hopp |
f0cc65 |
--- src/testdir/test87.in 2013-04-24 13:54:33.000000000 +0200
|
|
Karsten Hopp |
f0cc65 |
***************
|
|
Karsten Hopp |
f0cc65 |
*** 315,320 ****
|
|
Karsten Hopp |
f0cc65 |
--- 315,333 ----
|
|
Karsten Hopp |
f0cc65 |
:py3 trace_main()
|
|
Karsten Hopp |
f0cc65 |
:py3 sys.settrace(None)
|
|
Karsten Hopp |
f0cc65 |
:$put =string(l)
|
|
Karsten Hopp |
f0cc65 |
+ :"
|
|
Karsten Hopp |
f0cc65 |
+ :" Vars
|
|
Karsten Hopp |
f0cc65 |
+ :let g:foo = 'bac'
|
|
Karsten Hopp |
f0cc65 |
+ :let w:abc = 'def'
|
|
Karsten Hopp |
f0cc65 |
+ :let b:baz = 'bar'
|
|
Karsten Hopp |
f0cc65 |
+ :try
|
|
Karsten Hopp |
f0cc65 |
+ : throw "Abc"
|
|
Karsten Hopp |
f0cc65 |
+ :catch
|
|
Karsten Hopp |
f0cc65 |
+ : put =py3eval('vim.vvars[''exception'']')
|
|
Karsten Hopp |
f0cc65 |
+ :endtry
|
|
Karsten Hopp |
f0cc65 |
+ :put =py3eval('vim.vars[''foo'']')
|
|
Karsten Hopp |
f0cc65 |
+ :put =py3eval('vim.current.window.vars[''abc'']')
|
|
Karsten Hopp |
f0cc65 |
+ :put =py3eval('vim.current.buffer.vars[''baz'']')
|
|
Karsten Hopp |
f0cc65 |
:endfun
|
|
Karsten Hopp |
f0cc65 |
:"
|
|
Karsten Hopp |
f0cc65 |
:call Test()
|
|
Karsten Hopp |
f0cc65 |
*** ../vim-7.3.910/src/testdir/test87.ok 2013-04-24 13:04:21.000000000 +0200
|
|
Karsten Hopp |
f0cc65 |
--- src/testdir/test87.ok 2013-04-24 13:54:33.000000000 +0200
|
|
Karsten Hopp |
f0cc65 |
***************
|
|
Karsten Hopp |
f0cc65 |
*** 65,67 ****
|
|
Karsten Hopp |
f0cc65 |
--- 65,71 ----
|
|
Karsten Hopp |
f0cc65 |
vim: Vim(let):E861:
|
|
Karsten Hopp |
f0cc65 |
[1]
|
|
Karsten Hopp |
f0cc65 |
[1, 10, 11, 10, 11, 10, 11, 10, 11, 10, 11, 10, 1]
|
|
Karsten Hopp |
f0cc65 |
+ Abc
|
|
Karsten Hopp |
f0cc65 |
+ bac
|
|
Karsten Hopp |
f0cc65 |
+ def
|
|
Karsten Hopp |
f0cc65 |
+ bar
|
|
Karsten Hopp |
f0cc65 |
*** ../vim-7.3.910/src/version.c 2013-04-24 13:47:36.000000000 +0200
|
|
Karsten Hopp |
f0cc65 |
--- src/version.c 2013-04-24 13:54:00.000000000 +0200
|
|
Karsten Hopp |
f0cc65 |
***************
|
|
Karsten Hopp |
f0cc65 |
*** 730,731 ****
|
|
Karsten Hopp |
f0cc65 |
--- 730,733 ----
|
|
Karsten Hopp |
f0cc65 |
{ /* Add new patch number below this line */
|
|
Karsten Hopp |
f0cc65 |
+ /**/
|
|
Karsten Hopp |
f0cc65 |
+ 911,
|
|
Karsten Hopp |
f0cc65 |
/**/
|
|
Karsten Hopp |
f0cc65 |
|
|
Karsten Hopp |
f0cc65 |
--
|
|
Karsten Hopp |
f0cc65 |
hundred-and-one symptoms of being an internet addict:
|
|
Karsten Hopp |
f0cc65 |
222. You send more than 20 personal e-mails a day.
|
|
Karsten Hopp |
f0cc65 |
|
|
Karsten Hopp |
f0cc65 |
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
|
|
Karsten Hopp |
f0cc65 |
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
|
|
Karsten Hopp |
f0cc65 |
\\\ an exciting new programming language -- http://www.Zimbu.org ///
|
|
Karsten Hopp |
f0cc65 |
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
|