|
Karsten Hopp |
ed761c |
To: vim_dev@googlegroups.com
|
|
Karsten Hopp |
ed761c |
Subject: Patch 7.3.1003
|
|
Karsten Hopp |
ed761c |
Fcc: outbox
|
|
Karsten Hopp |
ed761c |
From: Bram Moolenaar <Bram@moolenaar.net>
|
|
Karsten Hopp |
ed761c |
Mime-Version: 1.0
|
|
Karsten Hopp |
ed761c |
Content-Type: text/plain; charset=UTF-8
|
|
Karsten Hopp |
ed761c |
Content-Transfer-Encoding: 8bit
|
|
Karsten Hopp |
ed761c |
------------
|
|
Karsten Hopp |
ed761c |
|
|
Karsten Hopp |
ed761c |
Patch 7.3.1003
|
|
Karsten Hopp |
ed761c |
Problem: Python interface does not compile with Python 2.2
|
|
Karsten Hopp |
ed761c |
Solution: Fix thread issues and True/False. (ZyX)
|
|
Karsten Hopp |
ed761c |
Files: src/if_py_both.h, src/if_python3.c, src/if_python.c,
|
|
Karsten Hopp |
ed761c |
src/testdir/test86.in, src/testdir/test86.ok,
|
|
Karsten Hopp |
ed761c |
src/testdir/test87.in, src/testdir/test87.ok
|
|
Karsten Hopp |
ed761c |
|
|
Karsten Hopp |
ed761c |
|
|
Karsten Hopp |
ed761c |
*** ../vim-7.3.1002/src/if_py_both.h 2013-05-21 22:13:36.000000000 +0200
|
|
Karsten Hopp |
ed761c |
--- src/if_py_both.h 2013-05-21 22:16:58.000000000 +0200
|
|
Karsten Hopp |
ed761c |
***************
|
|
Karsten Hopp |
ed761c |
*** 31,37 ****
|
|
Karsten Hopp |
ed761c |
#define INVALID_TABPAGE_VALUE ((tabpage_T *)(-1))
|
|
Karsten Hopp |
ed761c |
|
|
Karsten Hopp |
ed761c |
typedef void (*rangeinitializer)(void *);
|
|
Karsten Hopp |
ed761c |
! typedef void (*runner)(const char *, void *, PyGILState_STATE *);
|
|
Karsten Hopp |
ed761c |
|
|
Karsten Hopp |
ed761c |
static int ConvertFromPyObject(PyObject *, typval_T *);
|
|
Karsten Hopp |
ed761c |
static int _ConvertFromPyObject(PyObject *, typval_T *, PyObject *);
|
|
Karsten Hopp |
ed761c |
--- 31,41 ----
|
|
Karsten Hopp |
ed761c |
#define INVALID_TABPAGE_VALUE ((tabpage_T *)(-1))
|
|
Karsten Hopp |
ed761c |
|
|
Karsten Hopp |
ed761c |
typedef void (*rangeinitializer)(void *);
|
|
Karsten Hopp |
ed761c |
! typedef void (*runner)(const char *, void *
|
|
Karsten Hopp |
ed761c |
! #ifdef PY_CAN_RECURSE
|
|
Karsten Hopp |
ed761c |
! , PyGILState_STATE *
|
|
Karsten Hopp |
ed761c |
! #endif
|
|
Karsten Hopp |
ed761c |
! );
|
|
Karsten Hopp |
ed761c |
|
|
Karsten Hopp |
ed761c |
static int ConvertFromPyObject(PyObject *, typval_T *);
|
|
Karsten Hopp |
ed761c |
static int _ConvertFromPyObject(PyObject *, typval_T *, PyObject *);
|
|
Karsten Hopp |
ed761c |
***************
|
|
Karsten Hopp |
ed761c |
*** 3489,3495 ****
|
|
Karsten Hopp |
ed761c |
}
|
|
Karsten Hopp |
ed761c |
|
|
Karsten Hopp |
ed761c |
static void
|
|
Karsten Hopp |
ed761c |
! run_cmd(const char *cmd, void *arg UNUSED, PyGILState_STATE *pygilstate UNUSED)
|
|
Karsten Hopp |
ed761c |
{
|
|
Karsten Hopp |
ed761c |
PyRun_SimpleString((char *) cmd);
|
|
Karsten Hopp |
ed761c |
}
|
|
Karsten Hopp |
ed761c |
--- 3493,3503 ----
|
|
Karsten Hopp |
ed761c |
}
|
|
Karsten Hopp |
ed761c |
|
|
Karsten Hopp |
ed761c |
static void
|
|
Karsten Hopp |
ed761c |
! run_cmd(const char *cmd, void *arg UNUSED
|
|
Karsten Hopp |
ed761c |
! #ifdef PY_CAN_RECURSE
|
|
Karsten Hopp |
ed761c |
! , PyGILState_STATE *pygilstate UNUSED
|
|
Karsten Hopp |
ed761c |
! #endif
|
|
Karsten Hopp |
ed761c |
! )
|
|
Karsten Hopp |
ed761c |
{
|
|
Karsten Hopp |
ed761c |
PyRun_SimpleString((char *) cmd);
|
|
Karsten Hopp |
ed761c |
}
|
|
Karsten Hopp |
ed761c |
***************
|
|
Karsten Hopp |
ed761c |
*** 3498,3504 ****
|
|
Karsten Hopp |
ed761c |
static int code_hdr_len = 30;
|
|
Karsten Hopp |
ed761c |
|
|
Karsten Hopp |
ed761c |
static void
|
|
Karsten Hopp |
ed761c |
! run_do(const char *cmd, void *arg UNUSED, PyGILState_STATE *pygilstate)
|
|
Karsten Hopp |
ed761c |
{
|
|
Karsten Hopp |
ed761c |
PyInt lnum;
|
|
Karsten Hopp |
ed761c |
size_t len;
|
|
Karsten Hopp |
ed761c |
--- 3506,3516 ----
|
|
Karsten Hopp |
ed761c |
static int code_hdr_len = 30;
|
|
Karsten Hopp |
ed761c |
|
|
Karsten Hopp |
ed761c |
static void
|
|
Karsten Hopp |
ed761c |
! run_do(const char *cmd, void *arg UNUSED
|
|
Karsten Hopp |
ed761c |
! #ifdef PY_CAN_RECURSE
|
|
Karsten Hopp |
ed761c |
! , PyGILState_STATE *pygilstate
|
|
Karsten Hopp |
ed761c |
! #endif
|
|
Karsten Hopp |
ed761c |
! )
|
|
Karsten Hopp |
ed761c |
{
|
|
Karsten Hopp |
ed761c |
PyInt lnum;
|
|
Karsten Hopp |
ed761c |
size_t len;
|
|
Karsten Hopp |
ed761c |
***************
|
|
Karsten Hopp |
ed761c |
*** 3528,3540 ****
|
|
Karsten Hopp |
ed761c |
--- 3540,3556 ----
|
|
Karsten Hopp |
ed761c |
status = 0;
|
|
Karsten Hopp |
ed761c |
pymain = PyImport_AddModule("__main__");
|
|
Karsten Hopp |
ed761c |
pyfunc = PyObject_GetAttrString(pymain, DOPY_FUNC);
|
|
Karsten Hopp |
ed761c |
+ #ifdef PY_CAN_RECURSE
|
|
Karsten Hopp |
ed761c |
PyGILState_Release(*pygilstate);
|
|
Karsten Hopp |
ed761c |
+ #endif
|
|
Karsten Hopp |
ed761c |
|
|
Karsten Hopp |
ed761c |
for (lnum = RangeStart; lnum <= RangeEnd; ++lnum)
|
|
Karsten Hopp |
ed761c |
{
|
|
Karsten Hopp |
ed761c |
PyObject *line, *linenr, *ret;
|
|
Karsten Hopp |
ed761c |
|
|
Karsten Hopp |
ed761c |
+ #ifdef PY_CAN_RECURSE
|
|
Karsten Hopp |
ed761c |
*pygilstate = PyGILState_Ensure();
|
|
Karsten Hopp |
ed761c |
+ #endif
|
|
Karsten Hopp |
ed761c |
if (!(line = GetBufferLine(curbuf, lnum)))
|
|
Karsten Hopp |
ed761c |
goto err;
|
|
Karsten Hopp |
ed761c |
if (!(linenr = PyInt_FromLong((long) lnum)))
|
|
Karsten Hopp |
ed761c |
***************
|
|
Karsten Hopp |
ed761c |
*** 3554,3570 ****
|
|
Karsten Hopp |
ed761c |
--- 3570,3592 ----
|
|
Karsten Hopp |
ed761c |
|
|
Karsten Hopp |
ed761c |
Py_XDECREF(ret);
|
|
Karsten Hopp |
ed761c |
PythonIO_Flush();
|
|
Karsten Hopp |
ed761c |
+ #ifdef PY_CAN_RECURSE
|
|
Karsten Hopp |
ed761c |
PyGILState_Release(*pygilstate);
|
|
Karsten Hopp |
ed761c |
+ #endif
|
|
Karsten Hopp |
ed761c |
}
|
|
Karsten Hopp |
ed761c |
goto out;
|
|
Karsten Hopp |
ed761c |
err:
|
|
Karsten Hopp |
ed761c |
+ #ifdef PY_CAN_RECURSE
|
|
Karsten Hopp |
ed761c |
*pygilstate = PyGILState_Ensure();
|
|
Karsten Hopp |
ed761c |
+ #endif
|
|
Karsten Hopp |
ed761c |
PyErr_PrintEx(0);
|
|
Karsten Hopp |
ed761c |
PythonIO_Flush();
|
|
Karsten Hopp |
ed761c |
status = 1;
|
|
Karsten Hopp |
ed761c |
out:
|
|
Karsten Hopp |
ed761c |
+ #ifdef PY_CAN_RECURSE
|
|
Karsten Hopp |
ed761c |
if (!status)
|
|
Karsten Hopp |
ed761c |
*pygilstate = PyGILState_Ensure();
|
|
Karsten Hopp |
ed761c |
+ #endif
|
|
Karsten Hopp |
ed761c |
Py_DECREF(pyfunc);
|
|
Karsten Hopp |
ed761c |
PyObject_SetAttrString(pymain, DOPY_FUNC, NULL);
|
|
Karsten Hopp |
ed761c |
if (status)
|
|
Karsten Hopp |
ed761c |
***************
|
|
Karsten Hopp |
ed761c |
*** 3574,3580 ****
|
|
Karsten Hopp |
ed761c |
}
|
|
Karsten Hopp |
ed761c |
|
|
Karsten Hopp |
ed761c |
static void
|
|
Karsten Hopp |
ed761c |
! run_eval(const char *cmd, typval_T *rettv, PyGILState_STATE *pygilstate UNUSED)
|
|
Karsten Hopp |
ed761c |
{
|
|
Karsten Hopp |
ed761c |
PyObject *r;
|
|
Karsten Hopp |
ed761c |
|
|
Karsten Hopp |
ed761c |
--- 3596,3606 ----
|
|
Karsten Hopp |
ed761c |
}
|
|
Karsten Hopp |
ed761c |
|
|
Karsten Hopp |
ed761c |
static void
|
|
Karsten Hopp |
ed761c |
! run_eval(const char *cmd, typval_T *rettv
|
|
Karsten Hopp |
ed761c |
! #ifdef PY_CAN_RECURSE
|
|
Karsten Hopp |
ed761c |
! , PyGILState_STATE *pygilstate UNUSED
|
|
Karsten Hopp |
ed761c |
! #endif
|
|
Karsten Hopp |
ed761c |
! )
|
|
Karsten Hopp |
ed761c |
{
|
|
Karsten Hopp |
ed761c |
PyObject *r;
|
|
Karsten Hopp |
ed761c |
|
|
Karsten Hopp |
ed761c |
*** ../vim-7.3.1002/src/if_python3.c 2013-05-21 20:51:55.000000000 +0200
|
|
Karsten Hopp |
ed761c |
--- src/if_python3.c 2013-05-21 22:16:58.000000000 +0200
|
|
Karsten Hopp |
ed761c |
***************
|
|
Karsten Hopp |
ed761c |
*** 693,698 ****
|
|
Karsten Hopp |
ed761c |
--- 693,700 ----
|
|
Karsten Hopp |
ed761c |
|
|
Karsten Hopp |
ed761c |
static struct PyModuleDef vimmodule;
|
|
Karsten Hopp |
ed761c |
|
|
Karsten Hopp |
ed761c |
+ #define PY_CAN_RECURSE
|
|
Karsten Hopp |
ed761c |
+
|
|
Karsten Hopp |
ed761c |
/*
|
|
Karsten Hopp |
ed761c |
* Include the code shared with if_python.c
|
|
Karsten Hopp |
ed761c |
*/
|
|
Karsten Hopp |
ed761c |
*** ../vim-7.3.1002/src/if_python.c 2013-05-21 20:51:55.000000000 +0200
|
|
Karsten Hopp |
ed761c |
--- src/if_python.c 2013-05-21 22:16:58.000000000 +0200
|
|
Karsten Hopp |
ed761c |
***************
|
|
Karsten Hopp |
ed761c |
*** 641,647 ****
|
|
Karsten Hopp |
ed761c |
#define DICTKEY_UNREF
|
|
Karsten Hopp |
ed761c |
#define DICTKEY_DECL
|
|
Karsten Hopp |
ed761c |
|
|
Karsten Hopp |
ed761c |
! #define DESTRUCTOR_FINISH(self) Py_TYPE(self)->tp_free((PyObject*)self);
|
|
Karsten Hopp |
ed761c |
|
|
Karsten Hopp |
ed761c |
#define WIN_PYTHON_REF(win) win->w_python_ref
|
|
Karsten Hopp |
ed761c |
#define BUF_PYTHON_REF(buf) buf->b_python_ref
|
|
Karsten Hopp |
ed761c |
--- 641,647 ----
|
|
Karsten Hopp |
ed761c |
#define DICTKEY_UNREF
|
|
Karsten Hopp |
ed761c |
#define DICTKEY_DECL
|
|
Karsten Hopp |
ed761c |
|
|
Karsten Hopp |
ed761c |
! #define DESTRUCTOR_FINISH(self) self->ob_type->tp_free((PyObject*)self);
|
|
Karsten Hopp |
ed761c |
|
|
Karsten Hopp |
ed761c |
#define WIN_PYTHON_REF(win) win->w_python_ref
|
|
Karsten Hopp |
ed761c |
#define BUF_PYTHON_REF(buf) buf->b_python_ref
|
|
Karsten Hopp |
ed761c |
***************
|
|
Karsten Hopp |
ed761c |
*** 656,661 ****
|
|
Karsten Hopp |
ed761c |
--- 656,670 ----
|
|
Karsten Hopp |
ed761c |
static PyObject *ListGetattr(PyObject *, char *);
|
|
Karsten Hopp |
ed761c |
static PyObject *FunctionGetattr(PyObject *, char *);
|
|
Karsten Hopp |
ed761c |
|
|
Karsten Hopp |
ed761c |
+ #ifndef Py_VISIT
|
|
Karsten Hopp |
ed761c |
+ # define Py_VISIT(obj) visit(obj, arg)
|
|
Karsten Hopp |
ed761c |
+ #endif
|
|
Karsten Hopp |
ed761c |
+ #ifndef Py_CLEAR
|
|
Karsten Hopp |
ed761c |
+ # define Py_CLEAR(obj) \
|
|
Karsten Hopp |
ed761c |
+ Py_XDECREF(obj); \
|
|
Karsten Hopp |
ed761c |
+ obj = NULL;
|
|
Karsten Hopp |
ed761c |
+ #endif
|
|
Karsten Hopp |
ed761c |
+
|
|
Karsten Hopp |
ed761c |
/*
|
|
Karsten Hopp |
ed761c |
* Include the code shared with if_python3.c
|
|
Karsten Hopp |
ed761c |
*/
|
|
Karsten Hopp |
ed761c |
***************
|
|
Karsten Hopp |
ed761c |
*** 881,887 ****
|
|
Karsten Hopp |
ed761c |
Python_RestoreThread(); /* enter python */
|
|
Karsten Hopp |
ed761c |
#endif
|
|
Karsten Hopp |
ed761c |
|
|
Karsten Hopp |
ed761c |
! run((char *) cmd, arg, &pygilstate);
|
|
Karsten Hopp |
ed761c |
|
|
Karsten Hopp |
ed761c |
#ifdef PY_CAN_RECURSE
|
|
Karsten Hopp |
ed761c |
PyGILState_Release(pygilstate);
|
|
Karsten Hopp |
ed761c |
--- 890,900 ----
|
|
Karsten Hopp |
ed761c |
Python_RestoreThread(); /* enter python */
|
|
Karsten Hopp |
ed761c |
#endif
|
|
Karsten Hopp |
ed761c |
|
|
Karsten Hopp |
ed761c |
! run((char *) cmd, arg
|
|
Karsten Hopp |
ed761c |
! #ifdef PY_CAN_RECURSE
|
|
Karsten Hopp |
ed761c |
! , &pygilstate
|
|
Karsten Hopp |
ed761c |
! #endif
|
|
Karsten Hopp |
ed761c |
! );
|
|
Karsten Hopp |
ed761c |
|
|
Karsten Hopp |
ed761c |
#ifdef PY_CAN_RECURSE
|
|
Karsten Hopp |
ed761c |
PyGILState_Release(pygilstate);
|
|
Karsten Hopp |
ed761c |
*** ../vim-7.3.1002/src/testdir/test86.in 2013-05-21 20:40:35.000000000 +0200
|
|
Karsten Hopp |
ed761c |
--- src/testdir/test86.in 2013-05-21 22:16:58.000000000 +0200
|
|
Karsten Hopp |
ed761c |
***************
|
|
Karsten Hopp |
ed761c |
*** 518,523 ****
|
|
Karsten Hopp |
ed761c |
--- 518,527 ----
|
|
Karsten Hopp |
ed761c |
:edit c
|
|
Karsten Hopp |
ed761c |
:buffer #
|
|
Karsten Hopp |
ed761c |
py << EOF
|
|
Karsten Hopp |
ed761c |
+ try:
|
|
Karsten Hopp |
ed761c |
+ from __builtin__ import next
|
|
Karsten Hopp |
ed761c |
+ except ImportError:
|
|
Karsten Hopp |
ed761c |
+ next = lambda o: o.next()
|
|
Karsten Hopp |
ed761c |
# Check GCing iterator that was not fully exhausted
|
|
Karsten Hopp |
ed761c |
i = iter(vim.buffers)
|
|
Karsten Hopp |
ed761c |
cb.append('i:' + str(next(i)))
|
|
Karsten Hopp |
ed761c |
***************
|
|
Karsten Hopp |
ed761c |
*** 577,591 ****
|
|
Karsten Hopp |
ed761c |
cb.append('Number of tabs: ' + str(len(vim.tabpages)))
|
|
Karsten Hopp |
ed761c |
cb.append('Current tab pages:')
|
|
Karsten Hopp |
ed761c |
def W(w):
|
|
Karsten Hopp |
ed761c |
! if '(unknown)' in repr(w):
|
|
Karsten Hopp |
ed761c |
return '<window object (unknown)>'
|
|
Karsten Hopp |
ed761c |
else:
|
|
Karsten Hopp |
ed761c |
return repr(w)
|
|
Karsten Hopp |
ed761c |
for t in vim.tabpages:
|
|
Karsten Hopp |
ed761c |
cb.append(' ' + repr(t) + '(' + str(t.number) + ')' + ': ' + str(len(t.windows)) + ' windows, current is ' + W(t.window))
|
|
Karsten Hopp |
ed761c |
cb.append(' Windows:')
|
|
Karsten Hopp |
ed761c |
for w in t.windows:
|
|
Karsten Hopp |
ed761c |
! cb.append(' ' + W(w) + '(' + str(w.number) + ')' + ': displays buffer ' + repr(w.buffer) + '; cursor is at ' + repr(w.cursor))
|
|
Karsten Hopp |
ed761c |
# Other values depend on the size of the terminal, so they are checked partly:
|
|
Karsten Hopp |
ed761c |
for attr in ('height', 'row', 'width', 'col'):
|
|
Karsten Hopp |
ed761c |
try:
|
|
Karsten Hopp |
ed761c |
--- 581,602 ----
|
|
Karsten Hopp |
ed761c |
cb.append('Number of tabs: ' + str(len(vim.tabpages)))
|
|
Karsten Hopp |
ed761c |
cb.append('Current tab pages:')
|
|
Karsten Hopp |
ed761c |
def W(w):
|
|
Karsten Hopp |
ed761c |
! if repr(w).find('(unknown)') != -1:
|
|
Karsten Hopp |
ed761c |
return '<window object (unknown)>'
|
|
Karsten Hopp |
ed761c |
else:
|
|
Karsten Hopp |
ed761c |
return repr(w)
|
|
Karsten Hopp |
ed761c |
+
|
|
Karsten Hopp |
ed761c |
+ def Cursor(w, start=len(cb)):
|
|
Karsten Hopp |
ed761c |
+ if w.buffer is cb:
|
|
Karsten Hopp |
ed761c |
+ return repr((start - w.cursor[0], w.cursor[1]))
|
|
Karsten Hopp |
ed761c |
+ else:
|
|
Karsten Hopp |
ed761c |
+ return repr(w.cursor)
|
|
Karsten Hopp |
ed761c |
+
|
|
Karsten Hopp |
ed761c |
for t in vim.tabpages:
|
|
Karsten Hopp |
ed761c |
cb.append(' ' + repr(t) + '(' + str(t.number) + ')' + ': ' + str(len(t.windows)) + ' windows, current is ' + W(t.window))
|
|
Karsten Hopp |
ed761c |
cb.append(' Windows:')
|
|
Karsten Hopp |
ed761c |
for w in t.windows:
|
|
Karsten Hopp |
ed761c |
! cb.append(' ' + W(w) + '(' + str(w.number) + ')' + ': displays buffer ' + repr(w.buffer) + '; cursor is at ' + Cursor(w))
|
|
Karsten Hopp |
ed761c |
# Other values depend on the size of the terminal, so they are checked partly:
|
|
Karsten Hopp |
ed761c |
for attr in ('height', 'row', 'width', 'col'):
|
|
Karsten Hopp |
ed761c |
try:
|
|
Karsten Hopp |
ed761c |
*** ../vim-7.3.1002/src/testdir/test86.ok 2013-05-21 20:40:35.000000000 +0200
|
|
Karsten Hopp |
ed761c |
--- src/testdir/test86.ok 2013-05-21 22:18:02.000000000 +0200
|
|
Karsten Hopp |
ed761c |
***************
|
|
Karsten Hopp |
ed761c |
*** 333,339 ****
|
|
Karsten Hopp |
ed761c |
Current tab pages:
|
|
Karsten Hopp |
ed761c |
<tabpage 0>(1): 1 windows, current is <window object (unknown)>
|
|
Karsten Hopp |
ed761c |
Windows:
|
|
Karsten Hopp |
ed761c |
! <window object (unknown)>(1): displays buffer <buffer test86.in>; cursor is at (990, 0)
|
|
Karsten Hopp |
ed761c |
<tabpage 1>(2): 1 windows, current is <window object (unknown)>
|
|
Karsten Hopp |
ed761c |
Windows:
|
|
Karsten Hopp |
ed761c |
<window object (unknown)>(1): displays buffer <buffer 0>; cursor is at (1, 0)
|
|
Karsten Hopp |
ed761c |
--- 333,339 ----
|
|
Karsten Hopp |
ed761c |
Current tab pages:
|
|
Karsten Hopp |
ed761c |
<tabpage 0>(1): 1 windows, current is <window object (unknown)>
|
|
Karsten Hopp |
ed761c |
Windows:
|
|
Karsten Hopp |
ed761c |
! <window object (unknown)>(1): displays buffer <buffer test86.in>; cursor is at (27, 0)
|
|
Karsten Hopp |
ed761c |
<tabpage 1>(2): 1 windows, current is <window object (unknown)>
|
|
Karsten Hopp |
ed761c |
Windows:
|
|
Karsten Hopp |
ed761c |
<window object (unknown)>(1): displays buffer <buffer 0>; cursor is at (1, 0)
|
|
Karsten Hopp |
ed761c |
*** ../vim-7.3.1002/src/testdir/test87.in 2013-05-21 20:40:35.000000000 +0200
|
|
Karsten Hopp |
ed761c |
--- src/testdir/test87.in 2013-05-21 22:16:58.000000000 +0200
|
|
Karsten Hopp |
ed761c |
***************
|
|
Karsten Hopp |
ed761c |
*** 561,578 ****
|
|
Karsten Hopp |
ed761c |
:vnew b.2
|
|
Karsten Hopp |
ed761c |
:vnew c.2
|
|
Karsten Hopp |
ed761c |
py3 << EOF
|
|
Karsten Hopp |
ed761c |
def W(w):
|
|
Karsten Hopp |
ed761c |
if '(unknown)' in repr(w):
|
|
Karsten Hopp |
ed761c |
return '<window object (unknown)>'
|
|
Karsten Hopp |
ed761c |
else:
|
|
Karsten Hopp |
ed761c |
return repr(w)
|
|
Karsten Hopp |
ed761c |
! cb.append('Number of tabs: ' + str(len(vim.tabpages)))
|
|
Karsten Hopp |
ed761c |
! cb.append('Current tab pages:')
|
|
Karsten Hopp |
ed761c |
for t in vim.tabpages:
|
|
Karsten Hopp |
ed761c |
cb.append(' ' + repr(t) + '(' + str(t.number) + ')' + ': ' + str(len(t.windows)) + ' windows, current is ' + W(t.window))
|
|
Karsten Hopp |
ed761c |
cb.append(' Windows:')
|
|
Karsten Hopp |
ed761c |
for w in t.windows:
|
|
Karsten Hopp |
ed761c |
! cb.append(' ' + W(w) + '(' + str(w.number) + ')' + ': displays buffer ' + repr(w.buffer) + '; cursor is at ' + repr(w.cursor))
|
|
Karsten Hopp |
ed761c |
# Other values depend on the size of the terminal, so they are checked partly:
|
|
Karsten Hopp |
ed761c |
for attr in ('height', 'row', 'width', 'col'):
|
|
Karsten Hopp |
ed761c |
try:
|
|
Karsten Hopp |
ed761c |
--- 561,586 ----
|
|
Karsten Hopp |
ed761c |
:vnew b.2
|
|
Karsten Hopp |
ed761c |
:vnew c.2
|
|
Karsten Hopp |
ed761c |
py3 << EOF
|
|
Karsten Hopp |
ed761c |
+ cb.append('Number of tabs: ' + str(len(vim.tabpages)))
|
|
Karsten Hopp |
ed761c |
+ cb.append('Current tab pages:')
|
|
Karsten Hopp |
ed761c |
+
|
|
Karsten Hopp |
ed761c |
def W(w):
|
|
Karsten Hopp |
ed761c |
if '(unknown)' in repr(w):
|
|
Karsten Hopp |
ed761c |
return '<window object (unknown)>'
|
|
Karsten Hopp |
ed761c |
else:
|
|
Karsten Hopp |
ed761c |
return repr(w)
|
|
Karsten Hopp |
ed761c |
!
|
|
Karsten Hopp |
ed761c |
! def Cursor(w, start=len(cb)):
|
|
Karsten Hopp |
ed761c |
! if w.buffer is cb:
|
|
Karsten Hopp |
ed761c |
! return repr((start - w.cursor[0], w.cursor[1]))
|
|
Karsten Hopp |
ed761c |
! else:
|
|
Karsten Hopp |
ed761c |
! return repr(w.cursor)
|
|
Karsten Hopp |
ed761c |
!
|
|
Karsten Hopp |
ed761c |
for t in vim.tabpages:
|
|
Karsten Hopp |
ed761c |
cb.append(' ' + repr(t) + '(' + str(t.number) + ')' + ': ' + str(len(t.windows)) + ' windows, current is ' + W(t.window))
|
|
Karsten Hopp |
ed761c |
cb.append(' Windows:')
|
|
Karsten Hopp |
ed761c |
for w in t.windows:
|
|
Karsten Hopp |
ed761c |
! cb.append(' ' + W(w) + '(' + str(w.number) + ')' + ': displays buffer ' + repr(w.buffer) + '; cursor is at ' + Cursor(w))
|
|
Karsten Hopp |
ed761c |
# Other values depend on the size of the terminal, so they are checked partly:
|
|
Karsten Hopp |
ed761c |
for attr in ('height', 'row', 'width', 'col'):
|
|
Karsten Hopp |
ed761c |
try:
|
|
Karsten Hopp |
ed761c |
*** ../vim-7.3.1002/src/testdir/test87.ok 2013-05-21 20:40:35.000000000 +0200
|
|
Karsten Hopp |
ed761c |
--- src/testdir/test87.ok 2013-05-21 22:18:31.000000000 +0200
|
|
Karsten Hopp |
ed761c |
***************
|
|
Karsten Hopp |
ed761c |
*** 322,328 ****
|
|
Karsten Hopp |
ed761c |
Current tab pages:
|
|
Karsten Hopp |
ed761c |
<tabpage 0>(1): 1 windows, current is <window object (unknown)>
|
|
Karsten Hopp |
ed761c |
Windows:
|
|
Karsten Hopp |
ed761c |
! <window object (unknown)>(1): displays buffer <buffer test87.in>; cursor is at (966, 0)
|
|
Karsten Hopp |
ed761c |
<tabpage 1>(2): 1 windows, current is <window object (unknown)>
|
|
Karsten Hopp |
ed761c |
Windows:
|
|
Karsten Hopp |
ed761c |
<window object (unknown)>(1): displays buffer <buffer 0>; cursor is at (1, 0)
|
|
Karsten Hopp |
ed761c |
--- 322,328 ----
|
|
Karsten Hopp |
ed761c |
Current tab pages:
|
|
Karsten Hopp |
ed761c |
<tabpage 0>(1): 1 windows, current is <window object (unknown)>
|
|
Karsten Hopp |
ed761c |
Windows:
|
|
Karsten Hopp |
ed761c |
! <window object (unknown)>(1): displays buffer <buffer test87.in>; cursor is at (27, 0)
|
|
Karsten Hopp |
ed761c |
<tabpage 1>(2): 1 windows, current is <window object (unknown)>
|
|
Karsten Hopp |
ed761c |
Windows:
|
|
Karsten Hopp |
ed761c |
<window object (unknown)>(1): displays buffer <buffer 0>; cursor is at (1, 0)
|
|
Karsten Hopp |
ed761c |
*** ../vim-7.3.1002/src/version.c 2013-05-21 22:13:36.000000000 +0200
|
|
Karsten Hopp |
ed761c |
--- src/version.c 2013-05-21 22:19:01.000000000 +0200
|
|
Karsten Hopp |
ed761c |
***************
|
|
Karsten Hopp |
ed761c |
*** 730,731 ****
|
|
Karsten Hopp |
ed761c |
--- 730,733 ----
|
|
Karsten Hopp |
ed761c |
{ /* Add new patch number below this line */
|
|
Karsten Hopp |
ed761c |
+ /**/
|
|
Karsten Hopp |
ed761c |
+ 1003,
|
|
Karsten Hopp |
ed761c |
/**/
|
|
Karsten Hopp |
ed761c |
|
|
Karsten Hopp |
ed761c |
--
|
|
Karsten Hopp |
ed761c |
./configure
|
|
Karsten Hopp |
ed761c |
Checking whether build environment is sane ...
|
|
Karsten Hopp |
ed761c |
build environment is grinning and holding a spatula. Guess not.
|
|
Karsten Hopp |
ed761c |
|
|
Karsten Hopp |
ed761c |
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
|
|
Karsten Hopp |
ed761c |
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
|
|
Karsten Hopp |
ed761c |
\\\ an exciting new programming language -- http://www.Zimbu.org ///
|
|
Karsten Hopp |
ed761c |
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
|