|
Karsten Hopp |
84ff6f |
To: vim_dev@googlegroups.com
|
|
Karsten Hopp |
84ff6f |
Subject: Patch 7.3.1042
|
|
Karsten Hopp |
84ff6f |
Fcc: outbox
|
|
Karsten Hopp |
84ff6f |
From: Bram Moolenaar <Bram@moolenaar.net>
|
|
Karsten Hopp |
84ff6f |
Mime-Version: 1.0
|
|
Karsten Hopp |
84ff6f |
Content-Type: text/plain; charset=UTF-8
|
|
Karsten Hopp |
84ff6f |
Content-Transfer-Encoding: 8bit
|
|
Karsten Hopp |
84ff6f |
------------
|
|
Karsten Hopp |
84ff6f |
|
|
Karsten Hopp |
84ff6f |
Patch 7.3.1042
|
|
Karsten Hopp |
84ff6f |
Problem: Python: can't assign to vim.Buffer.name.
|
|
Karsten Hopp |
84ff6f |
Solution: Python patch 3. (ZyX)
|
|
Karsten Hopp |
84ff6f |
Files: runtime/doc/if_pyth.txt, src/ex_cmds.c, src/if_py_both.h,
|
|
Karsten Hopp |
84ff6f |
src/if_python3.c, src/if_python.c, src/proto/ex_cmds.pro,
|
|
Karsten Hopp |
84ff6f |
src/testdir/test86.in, src/testdir/test86.ok,
|
|
Karsten Hopp |
84ff6f |
src/testdir/test87.in, src/testdir/test87.ok
|
|
Karsten Hopp |
84ff6f |
|
|
Karsten Hopp |
84ff6f |
|
|
Karsten Hopp |
84ff6f |
*** ../vim-7.3.1041/runtime/doc/if_pyth.txt 2013-05-21 19:49:58.000000000 +0200
|
|
Karsten Hopp |
84ff6f |
--- runtime/doc/if_pyth.txt 2013-05-29 21:40:05.000000000 +0200
|
|
Karsten Hopp |
84ff6f |
***************
|
|
Karsten Hopp |
84ff6f |
*** 250,256 ****
|
|
Karsten Hopp |
84ff6f |
object and always use windows from that tab page (or throw vim.error
|
|
Karsten Hopp |
84ff6f |
in case tab page was deleted). You can keep a reference to both
|
|
Karsten Hopp |
84ff6f |
without keeping a reference to vim module object or |python-tabpage|,
|
|
Karsten Hopp |
84ff6f |
! they will not loose their properties in this case.
|
|
Karsten Hopp |
84ff6f |
|
|
Karsten Hopp |
84ff6f |
vim.tabpages *python-tabpages*
|
|
Karsten Hopp |
84ff6f |
A sequence object providing access to the list of vim tab pages. The
|
|
Karsten Hopp |
84ff6f |
--- 250,256 ----
|
|
Karsten Hopp |
84ff6f |
object and always use windows from that tab page (or throw vim.error
|
|
Karsten Hopp |
84ff6f |
in case tab page was deleted). You can keep a reference to both
|
|
Karsten Hopp |
84ff6f |
without keeping a reference to vim module object or |python-tabpage|,
|
|
Karsten Hopp |
84ff6f |
! they will not lose their properties in this case.
|
|
Karsten Hopp |
84ff6f |
|
|
Karsten Hopp |
84ff6f |
vim.tabpages *python-tabpages*
|
|
Karsten Hopp |
84ff6f |
A sequence object providing access to the list of vim tab pages. The
|
|
Karsten Hopp |
84ff6f |
***************
|
|
Karsten Hopp |
84ff6f |
*** 361,366 ****
|
|
Karsten Hopp |
84ff6f |
--- 361,371 ----
|
|
Karsten Hopp |
84ff6f |
this object will raise KeyError. If option is
|
|
Karsten Hopp |
84ff6f |
|global-local| and local value is missing getting it
|
|
Karsten Hopp |
84ff6f |
will return None.
|
|
Karsten Hopp |
84ff6f |
+ b.name String, RW. Contains buffer name (full path).
|
|
Karsten Hopp |
84ff6f |
+ Note: when assigning to b.name |BufFilePre| and
|
|
Karsten Hopp |
84ff6f |
+ |BufFilePost| autocommands are launched.
|
|
Karsten Hopp |
84ff6f |
+ b.number Buffer number. Can be used as |python-buffers| key.
|
|
Karsten Hopp |
84ff6f |
+ Read-only.
|
|
Karsten Hopp |
84ff6f |
|
|
Karsten Hopp |
84ff6f |
The buffer object methods are:
|
|
Karsten Hopp |
84ff6f |
b.append(str) Append a line to the buffer
|
|
Karsten Hopp |
84ff6f |
*** ../vim-7.3.1041/src/ex_cmds.c 2013-04-14 23:19:32.000000000 +0200
|
|
Karsten Hopp |
84ff6f |
--- src/ex_cmds.c 2013-05-29 21:44:19.000000000 +0200
|
|
Karsten Hopp |
84ff6f |
***************
|
|
Karsten Hopp |
84ff6f |
*** 784,789 ****
|
|
Karsten Hopp |
84ff6f |
--- 784,790 ----
|
|
Karsten Hopp |
84ff6f |
*/
|
|
Karsten Hopp |
84ff6f |
last_line = curbuf->b_ml.ml_line_count;
|
|
Karsten Hopp |
84ff6f |
mark_adjust(line1, line2, last_line - line2, 0L);
|
|
Karsten Hopp |
84ff6f |
+ changed_lines(last_line - num_lines + 1, 0, last_line + 1, num_lines);
|
|
Karsten Hopp |
84ff6f |
if (dest >= line2)
|
|
Karsten Hopp |
84ff6f |
{
|
|
Karsten Hopp |
84ff6f |
mark_adjust(line2 + 1, dest, -num_lines, 0L);
|
|
Karsten Hopp |
84ff6f |
***************
|
|
Karsten Hopp |
84ff6f |
*** 799,804 ****
|
|
Karsten Hopp |
84ff6f |
--- 800,806 ----
|
|
Karsten Hopp |
84ff6f |
curbuf->b_op_start.col = curbuf->b_op_end.col = 0;
|
|
Karsten Hopp |
84ff6f |
mark_adjust(last_line - num_lines + 1, last_line,
|
|
Karsten Hopp |
84ff6f |
-(last_line - dest - extra), 0L);
|
|
Karsten Hopp |
84ff6f |
+ changed_lines(last_line - num_lines + 1, 0, last_line + 1, -extra);
|
|
Karsten Hopp |
84ff6f |
|
|
Karsten Hopp |
84ff6f |
/*
|
|
Karsten Hopp |
84ff6f |
* Now we delete the original text -- webb
|
|
Karsten Hopp |
84ff6f |
***************
|
|
Karsten Hopp |
84ff6f |
*** 2414,2419 ****
|
|
Karsten Hopp |
84ff6f |
--- 2416,2473 ----
|
|
Karsten Hopp |
84ff6f |
info_message = FALSE;
|
|
Karsten Hopp |
84ff6f |
}
|
|
Karsten Hopp |
84ff6f |
|
|
Karsten Hopp |
84ff6f |
+ int
|
|
Karsten Hopp |
84ff6f |
+ rename_buffer(new_fname)
|
|
Karsten Hopp |
84ff6f |
+ char_u *new_fname;
|
|
Karsten Hopp |
84ff6f |
+ {
|
|
Karsten Hopp |
84ff6f |
+ char_u *fname, *sfname, *xfname;
|
|
Karsten Hopp |
84ff6f |
+ #ifdef FEAT_AUTOCMD
|
|
Karsten Hopp |
84ff6f |
+ buf_T *buf = curbuf;
|
|
Karsten Hopp |
84ff6f |
+
|
|
Karsten Hopp |
84ff6f |
+ apply_autocmds(EVENT_BUFFILEPRE, NULL, NULL, FALSE, buf);
|
|
Karsten Hopp |
84ff6f |
+ /* buffer changed, don't change name now */
|
|
Karsten Hopp |
84ff6f |
+ if (buf != curbuf)
|
|
Karsten Hopp |
84ff6f |
+ return FAIL;
|
|
Karsten Hopp |
84ff6f |
+ # ifdef FEAT_EVAL
|
|
Karsten Hopp |
84ff6f |
+ if (aborting()) /* autocmds may abort script processing */
|
|
Karsten Hopp |
84ff6f |
+ return FAIL;
|
|
Karsten Hopp |
84ff6f |
+ # endif
|
|
Karsten Hopp |
84ff6f |
+ #endif
|
|
Karsten Hopp |
84ff6f |
+ /*
|
|
Karsten Hopp |
84ff6f |
+ * The name of the current buffer will be changed.
|
|
Karsten Hopp |
84ff6f |
+ * A new (unlisted) buffer entry needs to be made to hold the old file
|
|
Karsten Hopp |
84ff6f |
+ * name, which will become the alternate file name.
|
|
Karsten Hopp |
84ff6f |
+ * But don't set the alternate file name if the buffer didn't have a
|
|
Karsten Hopp |
84ff6f |
+ * name.
|
|
Karsten Hopp |
84ff6f |
+ */
|
|
Karsten Hopp |
84ff6f |
+ fname = buf->b_ffname;
|
|
Karsten Hopp |
84ff6f |
+ sfname = buf->b_sfname;
|
|
Karsten Hopp |
84ff6f |
+ xfname = buf->b_fname;
|
|
Karsten Hopp |
84ff6f |
+ buf->b_ffname = NULL;
|
|
Karsten Hopp |
84ff6f |
+ buf->b_sfname = NULL;
|
|
Karsten Hopp |
84ff6f |
+ if (setfname(buf, new_fname, NULL, TRUE) == FAIL)
|
|
Karsten Hopp |
84ff6f |
+ {
|
|
Karsten Hopp |
84ff6f |
+ buf->b_ffname = fname;
|
|
Karsten Hopp |
84ff6f |
+ buf->b_sfname = sfname;
|
|
Karsten Hopp |
84ff6f |
+ return FAIL;
|
|
Karsten Hopp |
84ff6f |
+ }
|
|
Karsten Hopp |
84ff6f |
+ buf->b_flags |= BF_NOTEDITED;
|
|
Karsten Hopp |
84ff6f |
+ if (xfname != NULL && *xfname != NUL)
|
|
Karsten Hopp |
84ff6f |
+ {
|
|
Karsten Hopp |
84ff6f |
+ buf = buflist_new(fname, xfname, curwin->w_cursor.lnum, 0);
|
|
Karsten Hopp |
84ff6f |
+ if (buf != NULL && !cmdmod.keepalt)
|
|
Karsten Hopp |
84ff6f |
+ curwin->w_alt_fnum = buf->b_fnum;
|
|
Karsten Hopp |
84ff6f |
+ }
|
|
Karsten Hopp |
84ff6f |
+ vim_free(fname);
|
|
Karsten Hopp |
84ff6f |
+ vim_free(sfname);
|
|
Karsten Hopp |
84ff6f |
+ #ifdef FEAT_AUTOCMD
|
|
Karsten Hopp |
84ff6f |
+ apply_autocmds(EVENT_BUFFILEPOST, NULL, NULL, FALSE, buf);
|
|
Karsten Hopp |
84ff6f |
+ #endif
|
|
Karsten Hopp |
84ff6f |
+ /* Change directories when the 'acd' option is set. */
|
|
Karsten Hopp |
84ff6f |
+ DO_AUTOCHDIR
|
|
Karsten Hopp |
84ff6f |
+ return OK;
|
|
Karsten Hopp |
84ff6f |
+ }
|
|
Karsten Hopp |
84ff6f |
+
|
|
Karsten Hopp |
84ff6f |
/*
|
|
Karsten Hopp |
84ff6f |
* ":file[!] [fname]".
|
|
Karsten Hopp |
84ff6f |
*/
|
|
Karsten Hopp |
84ff6f |
***************
|
|
Karsten Hopp |
84ff6f |
*** 2421,2429 ****
|
|
Karsten Hopp |
84ff6f |
ex_file(eap)
|
|
Karsten Hopp |
84ff6f |
exarg_T *eap;
|
|
Karsten Hopp |
84ff6f |
{
|
|
Karsten Hopp |
84ff6f |
- char_u *fname, *sfname, *xfname;
|
|
Karsten Hopp |
84ff6f |
- buf_T *buf;
|
|
Karsten Hopp |
84ff6f |
-
|
|
Karsten Hopp |
84ff6f |
/* ":0file" removes the file name. Check for illegal uses ":3file",
|
|
Karsten Hopp |
84ff6f |
* "0file name", etc. */
|
|
Karsten Hopp |
84ff6f |
if (eap->addr_count > 0
|
|
Karsten Hopp |
84ff6f |
--- 2475,2480 ----
|
|
Karsten Hopp |
84ff6f |
***************
|
|
Karsten Hopp |
84ff6f |
*** 2437,2485 ****
|
|
Karsten Hopp |
84ff6f |
|
|
Karsten Hopp |
84ff6f |
if (*eap->arg != NUL || eap->addr_count == 1)
|
|
Karsten Hopp |
84ff6f |
{
|
|
Karsten Hopp |
84ff6f |
! #ifdef FEAT_AUTOCMD
|
|
Karsten Hopp |
84ff6f |
! buf = curbuf;
|
|
Karsten Hopp |
84ff6f |
! apply_autocmds(EVENT_BUFFILEPRE, NULL, NULL, FALSE, curbuf);
|
|
Karsten Hopp |
84ff6f |
! /* buffer changed, don't change name now */
|
|
Karsten Hopp |
84ff6f |
! if (buf != curbuf)
|
|
Karsten Hopp |
84ff6f |
! return;
|
|
Karsten Hopp |
84ff6f |
! # ifdef FEAT_EVAL
|
|
Karsten Hopp |
84ff6f |
! if (aborting()) /* autocmds may abort script processing */
|
|
Karsten Hopp |
84ff6f |
! return;
|
|
Karsten Hopp |
84ff6f |
! # endif
|
|
Karsten Hopp |
84ff6f |
! #endif
|
|
Karsten Hopp |
84ff6f |
! /*
|
|
Karsten Hopp |
84ff6f |
! * The name of the current buffer will be changed.
|
|
Karsten Hopp |
84ff6f |
! * A new (unlisted) buffer entry needs to be made to hold the old file
|
|
Karsten Hopp |
84ff6f |
! * name, which will become the alternate file name.
|
|
Karsten Hopp |
84ff6f |
! * But don't set the alternate file name if the buffer didn't have a
|
|
Karsten Hopp |
84ff6f |
! * name.
|
|
Karsten Hopp |
84ff6f |
! */
|
|
Karsten Hopp |
84ff6f |
! fname = curbuf->b_ffname;
|
|
Karsten Hopp |
84ff6f |
! sfname = curbuf->b_sfname;
|
|
Karsten Hopp |
84ff6f |
! xfname = curbuf->b_fname;
|
|
Karsten Hopp |
84ff6f |
! curbuf->b_ffname = NULL;
|
|
Karsten Hopp |
84ff6f |
! curbuf->b_sfname = NULL;
|
|
Karsten Hopp |
84ff6f |
! if (setfname(curbuf, eap->arg, NULL, TRUE) == FAIL)
|
|
Karsten Hopp |
84ff6f |
! {
|
|
Karsten Hopp |
84ff6f |
! curbuf->b_ffname = fname;
|
|
Karsten Hopp |
84ff6f |
! curbuf->b_sfname = sfname;
|
|
Karsten Hopp |
84ff6f |
return;
|
|
Karsten Hopp |
84ff6f |
- }
|
|
Karsten Hopp |
84ff6f |
- curbuf->b_flags |= BF_NOTEDITED;
|
|
Karsten Hopp |
84ff6f |
- if (xfname != NULL && *xfname != NUL)
|
|
Karsten Hopp |
84ff6f |
- {
|
|
Karsten Hopp |
84ff6f |
- buf = buflist_new(fname, xfname, curwin->w_cursor.lnum, 0);
|
|
Karsten Hopp |
84ff6f |
- if (buf != NULL && !cmdmod.keepalt)
|
|
Karsten Hopp |
84ff6f |
- curwin->w_alt_fnum = buf->b_fnum;
|
|
Karsten Hopp |
84ff6f |
- }
|
|
Karsten Hopp |
84ff6f |
- vim_free(fname);
|
|
Karsten Hopp |
84ff6f |
- vim_free(sfname);
|
|
Karsten Hopp |
84ff6f |
- #ifdef FEAT_AUTOCMD
|
|
Karsten Hopp |
84ff6f |
- apply_autocmds(EVENT_BUFFILEPOST, NULL, NULL, FALSE, curbuf);
|
|
Karsten Hopp |
84ff6f |
- #endif
|
|
Karsten Hopp |
84ff6f |
- /* Change directories when the 'acd' option is set. */
|
|
Karsten Hopp |
84ff6f |
- DO_AUTOCHDIR
|
|
Karsten Hopp |
84ff6f |
}
|
|
Karsten Hopp |
84ff6f |
/* print full file name if :cd used */
|
|
Karsten Hopp |
84ff6f |
fileinfo(FALSE, FALSE, eap->forceit);
|
|
Karsten Hopp |
84ff6f |
--- 2488,2495 ----
|
|
Karsten Hopp |
84ff6f |
|
|
Karsten Hopp |
84ff6f |
if (*eap->arg != NUL || eap->addr_count == 1)
|
|
Karsten Hopp |
84ff6f |
{
|
|
Karsten Hopp |
84ff6f |
! if (rename_buffer(eap->arg) == FAIL)
|
|
Karsten Hopp |
84ff6f |
return;
|
|
Karsten Hopp |
84ff6f |
}
|
|
Karsten Hopp |
84ff6f |
/* print full file name if :cd used */
|
|
Karsten Hopp |
84ff6f |
fileinfo(FALSE, FALSE, eap->forceit);
|
|
Karsten Hopp |
84ff6f |
*** ../vim-7.3.1041/src/if_py_both.h 2013-05-29 21:37:29.000000000 +0200
|
|
Karsten Hopp |
84ff6f |
--- src/if_py_both.h 2013-05-29 21:47:35.000000000 +0200
|
|
Karsten Hopp |
84ff6f |
***************
|
|
Karsten Hopp |
84ff6f |
*** 30,35 ****
|
|
Karsten Hopp |
84ff6f |
--- 30,43 ----
|
|
Karsten Hopp |
84ff6f |
#define INVALID_WINDOW_VALUE ((win_T *)(-1))
|
|
Karsten Hopp |
84ff6f |
#define INVALID_TABPAGE_VALUE ((tabpage_T *)(-1))
|
|
Karsten Hopp |
84ff6f |
|
|
Karsten Hopp |
84ff6f |
+ #define DICTKEY_DECL \
|
|
Karsten Hopp |
84ff6f |
+ PyObject *dictkey_todecref;
|
|
Karsten Hopp |
84ff6f |
+ #define DICTKEY_GET(err) \
|
|
Karsten Hopp |
84ff6f |
+ if (!(key = StringToChars(keyObject, &dictkey_todecref))) \
|
|
Karsten Hopp |
84ff6f |
+ return err;
|
|
Karsten Hopp |
84ff6f |
+ #define DICTKEY_UNREF \
|
|
Karsten Hopp |
84ff6f |
+ Py_XDECREF(dictkey_todecref);
|
|
Karsten Hopp |
84ff6f |
+
|
|
Karsten Hopp |
84ff6f |
typedef void (*rangeinitializer)(void *);
|
|
Karsten Hopp |
84ff6f |
typedef void (*runner)(const char *, void *
|
|
Karsten Hopp |
84ff6f |
#ifdef PY_CAN_RECURSE
|
|
Karsten Hopp |
84ff6f |
***************
|
|
Karsten Hopp |
84ff6f |
*** 64,69 ****
|
|
Karsten Hopp |
84ff6f |
--- 72,122 ----
|
|
Karsten Hopp |
84ff6f |
{
|
|
Karsten Hopp |
84ff6f |
}
|
|
Karsten Hopp |
84ff6f |
|
|
Karsten Hopp |
84ff6f |
+ /*
|
|
Karsten Hopp |
84ff6f |
+ * The "todecref" argument holds a pointer to PyObject * that must be
|
|
Karsten Hopp |
84ff6f |
+ * DECREF'ed after returned char_u * is no longer needed or NULL if all what
|
|
Karsten Hopp |
84ff6f |
+ * was needed to generate returned value is object.
|
|
Karsten Hopp |
84ff6f |
+ *
|
|
Karsten Hopp |
84ff6f |
+ * Use Py_XDECREF to decrement reference count.
|
|
Karsten Hopp |
84ff6f |
+ */
|
|
Karsten Hopp |
84ff6f |
+ static char_u *
|
|
Karsten Hopp |
84ff6f |
+ StringToChars(PyObject *object, PyObject **todecref)
|
|
Karsten Hopp |
84ff6f |
+ {
|
|
Karsten Hopp |
84ff6f |
+ char_u *p;
|
|
Karsten Hopp |
84ff6f |
+ PyObject *bytes = NULL;
|
|
Karsten Hopp |
84ff6f |
+
|
|
Karsten Hopp |
84ff6f |
+ if (PyBytes_Check(object))
|
|
Karsten Hopp |
84ff6f |
+ {
|
|
Karsten Hopp |
84ff6f |
+
|
|
Karsten Hopp |
84ff6f |
+ if (PyString_AsStringAndSize(object, (char **) &p, NULL) == -1)
|
|
Karsten Hopp |
84ff6f |
+ return NULL;
|
|
Karsten Hopp |
84ff6f |
+ if (p == NULL)
|
|
Karsten Hopp |
84ff6f |
+ return NULL;
|
|
Karsten Hopp |
84ff6f |
+
|
|
Karsten Hopp |
84ff6f |
+ *todecref = NULL;
|
|
Karsten Hopp |
84ff6f |
+ }
|
|
Karsten Hopp |
84ff6f |
+ else if (PyUnicode_Check(object))
|
|
Karsten Hopp |
84ff6f |
+ {
|
|
Karsten Hopp |
84ff6f |
+ bytes = PyUnicode_AsEncodedString(object, (char *)ENC_OPT, NULL);
|
|
Karsten Hopp |
84ff6f |
+ if (bytes == NULL)
|
|
Karsten Hopp |
84ff6f |
+ return NULL;
|
|
Karsten Hopp |
84ff6f |
+
|
|
Karsten Hopp |
84ff6f |
+ if(PyString_AsStringAndSize(bytes, (char **) &p, NULL) == -1)
|
|
Karsten Hopp |
84ff6f |
+ return NULL;
|
|
Karsten Hopp |
84ff6f |
+ if (p == NULL)
|
|
Karsten Hopp |
84ff6f |
+ return NULL;
|
|
Karsten Hopp |
84ff6f |
+
|
|
Karsten Hopp |
84ff6f |
+ *todecref = bytes;
|
|
Karsten Hopp |
84ff6f |
+ }
|
|
Karsten Hopp |
84ff6f |
+ else
|
|
Karsten Hopp |
84ff6f |
+ {
|
|
Karsten Hopp |
84ff6f |
+ PyErr_SetString(PyExc_TypeError, _("object must be string"));
|
|
Karsten Hopp |
84ff6f |
+ return NULL;
|
|
Karsten Hopp |
84ff6f |
+ }
|
|
Karsten Hopp |
84ff6f |
+
|
|
Karsten Hopp |
84ff6f |
+ return (char_u *) p;
|
|
Karsten Hopp |
84ff6f |
+ }
|
|
Karsten Hopp |
84ff6f |
+
|
|
Karsten Hopp |
84ff6f |
/* Output buffer management
|
|
Karsten Hopp |
84ff6f |
*/
|
|
Karsten Hopp |
84ff6f |
|
|
Karsten Hopp |
84ff6f |
***************
|
|
Karsten Hopp |
84ff6f |
*** 1586,1591 ****
|
|
Karsten Hopp |
84ff6f |
--- 1639,1656 ----
|
|
Karsten Hopp |
84ff6f |
return VimTryEnd();
|
|
Karsten Hopp |
84ff6f |
}
|
|
Karsten Hopp |
84ff6f |
|
|
Karsten Hopp |
84ff6f |
+ static void *
|
|
Karsten Hopp |
84ff6f |
+ py_memsave(void *p, size_t len)
|
|
Karsten Hopp |
84ff6f |
+ {
|
|
Karsten Hopp |
84ff6f |
+ void *r;
|
|
Karsten Hopp |
84ff6f |
+ if (!(r = PyMem_Malloc(len)))
|
|
Karsten Hopp |
84ff6f |
+ return NULL;
|
|
Karsten Hopp |
84ff6f |
+ mch_memmove(r, p, len);
|
|
Karsten Hopp |
84ff6f |
+ return r;
|
|
Karsten Hopp |
84ff6f |
+ }
|
|
Karsten Hopp |
84ff6f |
+
|
|
Karsten Hopp |
84ff6f |
+ #define PY_STRSAVE(s) ((char_u *) py_memsave(s, STRLEN(s) + 1))
|
|
Karsten Hopp |
84ff6f |
+
|
|
Karsten Hopp |
84ff6f |
static int
|
|
Karsten Hopp |
84ff6f |
OptionsAssItem(OptionsObject *self, PyObject *keyObject, PyObject *valObject)
|
|
Karsten Hopp |
84ff6f |
{
|
|
Karsten Hopp |
84ff6f |
***************
|
|
Karsten Hopp |
84ff6f |
*** 1670,1726 ****
|
|
Karsten Hopp |
84ff6f |
else
|
|
Karsten Hopp |
84ff6f |
{
|
|
Karsten Hopp |
84ff6f |
char_u *val;
|
|
Karsten Hopp |
84ff6f |
! if (PyBytes_Check(valObject))
|
|
Karsten Hopp |
84ff6f |
! {
|
|
Karsten Hopp |
84ff6f |
|
|
Karsten Hopp |
84ff6f |
! if (PyString_AsStringAndSize(valObject, (char **) &val, NULL) == -1)
|
|
Karsten Hopp |
84ff6f |
! {
|
|
Karsten Hopp |
84ff6f |
! DICTKEY_UNREF
|
|
Karsten Hopp |
84ff6f |
! return -1;
|
|
Karsten Hopp |
84ff6f |
! }
|
|
Karsten Hopp |
84ff6f |
! if (val == NULL)
|
|
Karsten Hopp |
84ff6f |
! {
|
|
Karsten Hopp |
84ff6f |
! DICTKEY_UNREF
|
|
Karsten Hopp |
84ff6f |
! return -1;
|
|
Karsten Hopp |
84ff6f |
! }
|
|
Karsten Hopp |
84ff6f |
!
|
|
Karsten Hopp |
84ff6f |
! val = vim_strsave(val);
|
|
Karsten Hopp |
84ff6f |
! }
|
|
Karsten Hopp |
84ff6f |
! else if (PyUnicode_Check(valObject))
|
|
Karsten Hopp |
84ff6f |
{
|
|
Karsten Hopp |
84ff6f |
! PyObject *bytes;
|
|
Karsten Hopp |
84ff6f |
!
|
|
Karsten Hopp |
84ff6f |
! bytes = PyUnicode_AsEncodedString(valObject, (char *)ENC_OPT, NULL);
|
|
Karsten Hopp |
84ff6f |
! if (bytes == NULL)
|
|
Karsten Hopp |
84ff6f |
! {
|
|
Karsten Hopp |
84ff6f |
! DICTKEY_UNREF
|
|
Karsten Hopp |
84ff6f |
! return -1;
|
|
Karsten Hopp |
84ff6f |
! }
|
|
Karsten Hopp |
84ff6f |
!
|
|
Karsten Hopp |
84ff6f |
! if(PyString_AsStringAndSize(bytes, (char **) &val, NULL) == -1)
|
|
Karsten Hopp |
84ff6f |
! {
|
|
Karsten Hopp |
84ff6f |
! DICTKEY_UNREF
|
|
Karsten Hopp |
84ff6f |
! return -1;
|
|
Karsten Hopp |
84ff6f |
! }
|
|
Karsten Hopp |
84ff6f |
! if (val == NULL)
|
|
Karsten Hopp |
84ff6f |
! {
|
|
Karsten Hopp |
84ff6f |
! DICTKEY_UNREF
|
|
Karsten Hopp |
84ff6f |
! return -1;
|
|
Karsten Hopp |
84ff6f |
! }
|
|
Karsten Hopp |
84ff6f |
!
|
|
Karsten Hopp |
84ff6f |
! val = vim_strsave(val);
|
|
Karsten Hopp |
84ff6f |
! Py_XDECREF(bytes);
|
|
Karsten Hopp |
84ff6f |
}
|
|
Karsten Hopp |
84ff6f |
else
|
|
Karsten Hopp |
84ff6f |
! {
|
|
Karsten Hopp |
84ff6f |
! PyErr_SetString(PyExc_TypeError, _("object must be string"));
|
|
Karsten Hopp |
84ff6f |
! DICTKEY_UNREF
|
|
Karsten Hopp |
84ff6f |
! return -1;
|
|
Karsten Hopp |
84ff6f |
! }
|
|
Karsten Hopp |
84ff6f |
!
|
|
Karsten Hopp |
84ff6f |
! r = set_option_value_for(key, 0, val, opt_flags,
|
|
Karsten Hopp |
84ff6f |
! self->opt_type, self->from);
|
|
Karsten Hopp |
84ff6f |
! vim_free(val);
|
|
Karsten Hopp |
84ff6f |
}
|
|
Karsten Hopp |
84ff6f |
|
|
Karsten Hopp |
84ff6f |
DICTKEY_UNREF
|
|
Karsten Hopp |
84ff6f |
--- 1735,1750 ----
|
|
Karsten Hopp |
84ff6f |
else
|
|
Karsten Hopp |
84ff6f |
{
|
|
Karsten Hopp |
84ff6f |
char_u *val;
|
|
Karsten Hopp |
84ff6f |
! PyObject *todecref;
|
|
Karsten Hopp |
84ff6f |
|
|
Karsten Hopp |
84ff6f |
! if ((val = StringToChars(valObject, &todecref)))
|
|
Karsten Hopp |
84ff6f |
{
|
|
Karsten Hopp |
84ff6f |
! r = set_option_value_for(key, 0, val, opt_flags,
|
|
Karsten Hopp |
84ff6f |
! self->opt_type, self->from);
|
|
Karsten Hopp |
84ff6f |
! Py_XDECREF(todecref);
|
|
Karsten Hopp |
84ff6f |
}
|
|
Karsten Hopp |
84ff6f |
else
|
|
Karsten Hopp |
84ff6f |
! r = -1;
|
|
Karsten Hopp |
84ff6f |
}
|
|
Karsten Hopp |
84ff6f |
|
|
Karsten Hopp |
84ff6f |
DICTKEY_UNREF
|
|
Karsten Hopp |
84ff6f |
***************
|
|
Karsten Hopp |
84ff6f |
*** 2541,2547 ****
|
|
Karsten Hopp |
84ff6f |
array = NULL;
|
|
Karsten Hopp |
84ff6f |
else
|
|
Karsten Hopp |
84ff6f |
{
|
|
Karsten Hopp |
84ff6f |
! array = (char **)alloc((unsigned)(new_len * sizeof(char *)));
|
|
Karsten Hopp |
84ff6f |
if (array == NULL)
|
|
Karsten Hopp |
84ff6f |
{
|
|
Karsten Hopp |
84ff6f |
PyErr_NoMemory();
|
|
Karsten Hopp |
84ff6f |
--- 2565,2571 ----
|
|
Karsten Hopp |
84ff6f |
array = NULL;
|
|
Karsten Hopp |
84ff6f |
else
|
|
Karsten Hopp |
84ff6f |
{
|
|
Karsten Hopp |
84ff6f |
! array = PyMem_New(char *, new_len);
|
|
Karsten Hopp |
84ff6f |
if (array == NULL)
|
|
Karsten Hopp |
84ff6f |
{
|
|
Karsten Hopp |
84ff6f |
PyErr_NoMemory();
|
|
Karsten Hopp |
84ff6f |
***************
|
|
Karsten Hopp |
84ff6f |
*** 2558,2564 ****
|
|
Karsten Hopp |
84ff6f |
{
|
|
Karsten Hopp |
84ff6f |
while (i)
|
|
Karsten Hopp |
84ff6f |
vim_free(array[--i]);
|
|
Karsten Hopp |
84ff6f |
! vim_free(array);
|
|
Karsten Hopp |
84ff6f |
return FAIL;
|
|
Karsten Hopp |
84ff6f |
}
|
|
Karsten Hopp |
84ff6f |
}
|
|
Karsten Hopp |
84ff6f |
--- 2582,2588 ----
|
|
Karsten Hopp |
84ff6f |
{
|
|
Karsten Hopp |
84ff6f |
while (i)
|
|
Karsten Hopp |
84ff6f |
vim_free(array[--i]);
|
|
Karsten Hopp |
84ff6f |
! PyMem_Free(array);
|
|
Karsten Hopp |
84ff6f |
return FAIL;
|
|
Karsten Hopp |
84ff6f |
}
|
|
Karsten Hopp |
84ff6f |
}
|
|
Karsten Hopp |
84ff6f |
***************
|
|
Karsten Hopp |
84ff6f |
*** 2635,2641 ****
|
|
Karsten Hopp |
84ff6f |
* been dealt with (either freed, or the responsibility passed
|
|
Karsten Hopp |
84ff6f |
* to vim.
|
|
Karsten Hopp |
84ff6f |
*/
|
|
Karsten Hopp |
84ff6f |
! vim_free(array);
|
|
Karsten Hopp |
84ff6f |
|
|
Karsten Hopp |
84ff6f |
/* Adjust marks. Invalidate any which lie in the
|
|
Karsten Hopp |
84ff6f |
* changed range, and move any in the remainder of the buffer.
|
|
Karsten Hopp |
84ff6f |
--- 2659,2665 ----
|
|
Karsten Hopp |
84ff6f |
* been dealt with (either freed, or the responsibility passed
|
|
Karsten Hopp |
84ff6f |
* to vim.
|
|
Karsten Hopp |
84ff6f |
*/
|
|
Karsten Hopp |
84ff6f |
! PyMem_Free(array);
|
|
Karsten Hopp |
84ff6f |
|
|
Karsten Hopp |
84ff6f |
/* Adjust marks. Invalidate any which lie in the
|
|
Karsten Hopp |
84ff6f |
* changed range, and move any in the remainder of the buffer.
|
|
Karsten Hopp |
84ff6f |
***************
|
|
Karsten Hopp |
84ff6f |
*** 2717,2723 ****
|
|
Karsten Hopp |
84ff6f |
char **array;
|
|
Karsten Hopp |
84ff6f |
buf_T *savebuf;
|
|
Karsten Hopp |
84ff6f |
|
|
Karsten Hopp |
84ff6f |
! array = (char **)alloc((unsigned)(size * sizeof(char *)));
|
|
Karsten Hopp |
84ff6f |
if (array == NULL)
|
|
Karsten Hopp |
84ff6f |
{
|
|
Karsten Hopp |
84ff6f |
PyErr_NoMemory();
|
|
Karsten Hopp |
84ff6f |
--- 2741,2747 ----
|
|
Karsten Hopp |
84ff6f |
char **array;
|
|
Karsten Hopp |
84ff6f |
buf_T *savebuf;
|
|
Karsten Hopp |
84ff6f |
|
|
Karsten Hopp |
84ff6f |
! array = PyMem_New(char *, size);
|
|
Karsten Hopp |
84ff6f |
if (array == NULL)
|
|
Karsten Hopp |
84ff6f |
{
|
|
Karsten Hopp |
84ff6f |
PyErr_NoMemory();
|
|
Karsten Hopp |
84ff6f |
***************
|
|
Karsten Hopp |
84ff6f |
*** 2733,2739 ****
|
|
Karsten Hopp |
84ff6f |
{
|
|
Karsten Hopp |
84ff6f |
while (i)
|
|
Karsten Hopp |
84ff6f |
vim_free(array[--i]);
|
|
Karsten Hopp |
84ff6f |
! vim_free(array);
|
|
Karsten Hopp |
84ff6f |
return FAIL;
|
|
Karsten Hopp |
84ff6f |
}
|
|
Karsten Hopp |
84ff6f |
}
|
|
Karsten Hopp |
84ff6f |
--- 2757,2763 ----
|
|
Karsten Hopp |
84ff6f |
{
|
|
Karsten Hopp |
84ff6f |
while (i)
|
|
Karsten Hopp |
84ff6f |
vim_free(array[--i]);
|
|
Karsten Hopp |
84ff6f |
! PyMem_Free(array);
|
|
Karsten Hopp |
84ff6f |
return FAIL;
|
|
Karsten Hopp |
84ff6f |
}
|
|
Karsten Hopp |
84ff6f |
}
|
|
Karsten Hopp |
84ff6f |
***************
|
|
Karsten Hopp |
84ff6f |
*** 2768,2774 ****
|
|
Karsten Hopp |
84ff6f |
/* Free the array of lines. All of its contents have now
|
|
Karsten Hopp |
84ff6f |
* been freed.
|
|
Karsten Hopp |
84ff6f |
*/
|
|
Karsten Hopp |
84ff6f |
! vim_free(array);
|
|
Karsten Hopp |
84ff6f |
|
|
Karsten Hopp |
84ff6f |
restore_buffer(savebuf);
|
|
Karsten Hopp |
84ff6f |
update_screen(VALID);
|
|
Karsten Hopp |
84ff6f |
--- 2792,2798 ----
|
|
Karsten Hopp |
84ff6f |
/* Free the array of lines. All of its contents have now
|
|
Karsten Hopp |
84ff6f |
* been freed.
|
|
Karsten Hopp |
84ff6f |
*/
|
|
Karsten Hopp |
84ff6f |
! PyMem_Free(array);
|
|
Karsten Hopp |
84ff6f |
|
|
Karsten Hopp |
84ff6f |
restore_buffer(savebuf);
|
|
Karsten Hopp |
84ff6f |
update_screen(VALID);
|
|
Karsten Hopp |
84ff6f |
***************
|
|
Karsten Hopp |
84ff6f |
*** 3179,3184 ****
|
|
Karsten Hopp |
84ff6f |
--- 3203,3247 ----
|
|
Karsten Hopp |
84ff6f |
return NULL;
|
|
Karsten Hopp |
84ff6f |
}
|
|
Karsten Hopp |
84ff6f |
|
|
Karsten Hopp |
84ff6f |
+ static int
|
|
Karsten Hopp |
84ff6f |
+ BufferSetattr(BufferObject *self, char *name, PyObject *valObject)
|
|
Karsten Hopp |
84ff6f |
+ {
|
|
Karsten Hopp |
84ff6f |
+ if (CheckBuffer(self))
|
|
Karsten Hopp |
84ff6f |
+ return -1;
|
|
Karsten Hopp |
84ff6f |
+
|
|
Karsten Hopp |
84ff6f |
+ if (strcmp(name, "name") == 0)
|
|
Karsten Hopp |
84ff6f |
+ {
|
|
Karsten Hopp |
84ff6f |
+ char_u *val;
|
|
Karsten Hopp |
84ff6f |
+ aco_save_T aco;
|
|
Karsten Hopp |
84ff6f |
+ int r;
|
|
Karsten Hopp |
84ff6f |
+ PyObject *todecref;
|
|
Karsten Hopp |
84ff6f |
+
|
|
Karsten Hopp |
84ff6f |
+ if (!(val = StringToChars(valObject, &todecref)))
|
|
Karsten Hopp |
84ff6f |
+ return -1;
|
|
Karsten Hopp |
84ff6f |
+
|
|
Karsten Hopp |
84ff6f |
+ VimTryStart();
|
|
Karsten Hopp |
84ff6f |
+ /* Using aucmd_*: autocommands will be executed by rename_buffer */
|
|
Karsten Hopp |
84ff6f |
+ aucmd_prepbuf(&aco, self->buf);
|
|
Karsten Hopp |
84ff6f |
+ r = rename_buffer(val);
|
|
Karsten Hopp |
84ff6f |
+ aucmd_restbuf(&aco;;
|
|
Karsten Hopp |
84ff6f |
+ Py_XDECREF(todecref);
|
|
Karsten Hopp |
84ff6f |
+ if (VimTryEnd())
|
|
Karsten Hopp |
84ff6f |
+ return -1;
|
|
Karsten Hopp |
84ff6f |
+
|
|
Karsten Hopp |
84ff6f |
+ if (r == FAIL)
|
|
Karsten Hopp |
84ff6f |
+ {
|
|
Karsten Hopp |
84ff6f |
+ PyErr_SetVim(_("failed to rename buffer"));
|
|
Karsten Hopp |
84ff6f |
+ return -1;
|
|
Karsten Hopp |
84ff6f |
+ }
|
|
Karsten Hopp |
84ff6f |
+ return 0;
|
|
Karsten Hopp |
84ff6f |
+ }
|
|
Karsten Hopp |
84ff6f |
+ else
|
|
Karsten Hopp |
84ff6f |
+ {
|
|
Karsten Hopp |
84ff6f |
+ PyErr_SetString(PyExc_AttributeError, name);
|
|
Karsten Hopp |
84ff6f |
+ return -1;
|
|
Karsten Hopp |
84ff6f |
+ }
|
|
Karsten Hopp |
84ff6f |
+ }
|
|
Karsten Hopp |
84ff6f |
+
|
|
Karsten Hopp |
84ff6f |
static PyObject *
|
|
Karsten Hopp |
84ff6f |
BufferAppend(BufferObject *self, PyObject *args)
|
|
Karsten Hopp |
84ff6f |
{
|
|
Karsten Hopp |
84ff6f |
***************
|
|
Karsten Hopp |
84ff6f |
*** 4040,4046 ****
|
|
Karsten Hopp |
84ff6f |
if (result == NULL)
|
|
Karsten Hopp |
84ff6f |
return -1;
|
|
Karsten Hopp |
84ff6f |
|
|
Karsten Hopp |
84ff6f |
! if (set_string_copy(result, tv) == -1)
|
|
Karsten Hopp |
84ff6f |
{
|
|
Karsten Hopp |
84ff6f |
Py_XDECREF(bytes);
|
|
Karsten Hopp |
84ff6f |
return -1;
|
|
Karsten Hopp |
84ff6f |
--- 4103,4109 ----
|
|
Karsten Hopp |
84ff6f |
if (result == NULL)
|
|
Karsten Hopp |
84ff6f |
return -1;
|
|
Karsten Hopp |
84ff6f |
|
|
Karsten Hopp |
84ff6f |
! if (set_string_copy(result, tv))
|
|
Karsten Hopp |
84ff6f |
{
|
|
Karsten Hopp |
84ff6f |
Py_XDECREF(bytes);
|
|
Karsten Hopp |
84ff6f |
return -1;
|
|
Karsten Hopp |
84ff6f |
***************
|
|
Karsten Hopp |
84ff6f |
*** 4169,4179 ****
|
|
Karsten Hopp |
84ff6f |
--- 4232,4244 ----
|
|
Karsten Hopp |
84ff6f |
BufferType.tp_methods = BufferMethods;
|
|
Karsten Hopp |
84ff6f |
#if PY_MAJOR_VERSION >= 3
|
|
Karsten Hopp |
84ff6f |
BufferType.tp_getattro = (getattrofunc)BufferGetattro;
|
|
Karsten Hopp |
84ff6f |
+ BufferType.tp_setattro = (setattrofunc)BufferSetattro;
|
|
Karsten Hopp |
84ff6f |
BufferType.tp_alloc = call_PyType_GenericAlloc;
|
|
Karsten Hopp |
84ff6f |
BufferType.tp_new = call_PyType_GenericNew;
|
|
Karsten Hopp |
84ff6f |
BufferType.tp_free = call_PyObject_Free;
|
|
Karsten Hopp |
84ff6f |
#else
|
|
Karsten Hopp |
84ff6f |
BufferType.tp_getattr = (getattrfunc)BufferGetattr;
|
|
Karsten Hopp |
84ff6f |
+ BufferType.tp_setattr = (setattrfunc)BufferSetattr;
|
|
Karsten Hopp |
84ff6f |
#endif
|
|
Karsten Hopp |
84ff6f |
|
|
Karsten Hopp |
84ff6f |
vim_memset(&WindowType, 0, sizeof(WindowType));
|
|
Karsten Hopp |
84ff6f |
*** ../vim-7.3.1041/src/if_python3.c 2013-05-29 21:33:34.000000000 +0200
|
|
Karsten Hopp |
84ff6f |
--- src/if_python3.c 2013-05-29 21:40:05.000000000 +0200
|
|
Karsten Hopp |
84ff6f |
***************
|
|
Karsten Hopp |
84ff6f |
*** 638,669 ****
|
|
Karsten Hopp |
84ff6f |
|
|
Karsten Hopp |
84ff6f |
#define PYINITIALISED py3initialised
|
|
Karsten Hopp |
84ff6f |
|
|
Karsten Hopp |
84ff6f |
- #define DICTKEY_DECL PyObject *bytes = NULL;
|
|
Karsten Hopp |
84ff6f |
-
|
|
Karsten Hopp |
84ff6f |
- #define DICTKEY_GET(err) \
|
|
Karsten Hopp |
84ff6f |
- if (PyBytes_Check(keyObject)) \
|
|
Karsten Hopp |
84ff6f |
- { \
|
|
Karsten Hopp |
84ff6f |
- if (PyString_AsStringAndSize(keyObject, (char **) &key, NULL) == -1) \
|
|
Karsten Hopp |
84ff6f |
- return err; \
|
|
Karsten Hopp |
84ff6f |
- } \
|
|
Karsten Hopp |
84ff6f |
- else if (PyUnicode_Check(keyObject)) \
|
|
Karsten Hopp |
84ff6f |
- { \
|
|
Karsten Hopp |
84ff6f |
- bytes = PyString_AsBytes(keyObject); \
|
|
Karsten Hopp |
84ff6f |
- if (bytes == NULL) \
|
|
Karsten Hopp |
84ff6f |
- return err; \
|
|
Karsten Hopp |
84ff6f |
- if (PyString_AsStringAndSize(bytes, (char **) &key, NULL) == -1) \
|
|
Karsten Hopp |
84ff6f |
- return err; \
|
|
Karsten Hopp |
84ff6f |
- } \
|
|
Karsten Hopp |
84ff6f |
- else \
|
|
Karsten Hopp |
84ff6f |
- { \
|
|
Karsten Hopp |
84ff6f |
- PyErr_SetString(PyExc_TypeError, _("only string keys are allowed")); \
|
|
Karsten Hopp |
84ff6f |
- return err; \
|
|
Karsten Hopp |
84ff6f |
- }
|
|
Karsten Hopp |
84ff6f |
-
|
|
Karsten Hopp |
84ff6f |
- #define DICTKEY_UNREF \
|
|
Karsten Hopp |
84ff6f |
- if (bytes != NULL) \
|
|
Karsten Hopp |
84ff6f |
- Py_XDECREF(bytes);
|
|
Karsten Hopp |
84ff6f |
-
|
|
Karsten Hopp |
84ff6f |
#define DESTRUCTOR_FINISH(self) Py_TYPE(self)->tp_free((PyObject*)self)
|
|
Karsten Hopp |
84ff6f |
|
|
Karsten Hopp |
84ff6f |
#define WIN_PYTHON_REF(win) win->w_python3_ref
|
|
Karsten Hopp |
84ff6f |
--- 638,643 ----
|
|
Karsten Hopp |
84ff6f |
***************
|
|
Karsten Hopp |
84ff6f |
*** 696,701 ****
|
|
Karsten Hopp |
84ff6f |
--- 670,676 ----
|
|
Karsten Hopp |
84ff6f |
static PyObject *OutputGetattro(PyObject *, PyObject *);
|
|
Karsten Hopp |
84ff6f |
static int OutputSetattro(PyObject *, PyObject *, PyObject *);
|
|
Karsten Hopp |
84ff6f |
static PyObject *BufferGetattro(PyObject *, PyObject *);
|
|
Karsten Hopp |
84ff6f |
+ static int BufferSetattro(PyObject *, PyObject *, PyObject *);
|
|
Karsten Hopp |
84ff6f |
static PyObject *TabPageGetattro(PyObject *, PyObject *);
|
|
Karsten Hopp |
84ff6f |
static PyObject *WindowGetattro(PyObject *, PyObject *);
|
|
Karsten Hopp |
84ff6f |
static int WindowSetattro(PyObject *, PyObject *, PyObject *);
|
|
Karsten Hopp |
84ff6f |
***************
|
|
Karsten Hopp |
84ff6f |
*** 1108,1113 ****
|
|
Karsten Hopp |
84ff6f |
--- 1083,1096 ----
|
|
Karsten Hopp |
84ff6f |
return PyObject_GenericGetAttr(self, nameobj);
|
|
Karsten Hopp |
84ff6f |
}
|
|
Karsten Hopp |
84ff6f |
|
|
Karsten Hopp |
84ff6f |
+ static int
|
|
Karsten Hopp |
84ff6f |
+ BufferSetattro(PyObject *self, PyObject *nameobj, PyObject *val)
|
|
Karsten Hopp |
84ff6f |
+ {
|
|
Karsten Hopp |
84ff6f |
+ GET_ATTR_STRING(name, nameobj);
|
|
Karsten Hopp |
84ff6f |
+
|
|
Karsten Hopp |
84ff6f |
+ return BufferSetattr((BufferObject *)(self), name, val);
|
|
Karsten Hopp |
84ff6f |
+ }
|
|
Karsten Hopp |
84ff6f |
+
|
|
Karsten Hopp |
84ff6f |
static PyObject *
|
|
Karsten Hopp |
84ff6f |
BufferDir(PyObject *self UNUSED)
|
|
Karsten Hopp |
84ff6f |
{
|
|
Karsten Hopp |
84ff6f |
*** ../vim-7.3.1041/src/if_python.c 2013-05-29 21:33:34.000000000 +0200
|
|
Karsten Hopp |
84ff6f |
--- src/if_python.c 2013-05-29 21:40:05.000000000 +0200
|
|
Karsten Hopp |
84ff6f |
***************
|
|
Karsten Hopp |
84ff6f |
*** 676,693 ****
|
|
Karsten Hopp |
84ff6f |
static int initialised = 0;
|
|
Karsten Hopp |
84ff6f |
#define PYINITIALISED initialised
|
|
Karsten Hopp |
84ff6f |
|
|
Karsten Hopp |
84ff6f |
- #define DICTKEY_GET(err) \
|
|
Karsten Hopp |
84ff6f |
- if (!PyString_Check(keyObject)) \
|
|
Karsten Hopp |
84ff6f |
- { \
|
|
Karsten Hopp |
84ff6f |
- PyErr_SetString(PyExc_TypeError, _("only string keys are allowed")); \
|
|
Karsten Hopp |
84ff6f |
- return err; \
|
|
Karsten Hopp |
84ff6f |
- } \
|
|
Karsten Hopp |
84ff6f |
- if (PyString_AsStringAndSize(keyObject, (char **) &key, NULL) == -1) \
|
|
Karsten Hopp |
84ff6f |
- return err;
|
|
Karsten Hopp |
84ff6f |
-
|
|
Karsten Hopp |
84ff6f |
- #define DICTKEY_UNREF
|
|
Karsten Hopp |
84ff6f |
- #define DICTKEY_DECL
|
|
Karsten Hopp |
84ff6f |
-
|
|
Karsten Hopp |
84ff6f |
#define DESTRUCTOR_FINISH(self) self->ob_type->tp_free((PyObject*)self);
|
|
Karsten Hopp |
84ff6f |
|
|
Karsten Hopp |
84ff6f |
#define WIN_PYTHON_REF(win) win->w_python_ref
|
|
Karsten Hopp |
84ff6f |
--- 676,681 ----
|
|
Karsten Hopp |
84ff6f |
***************
|
|
Karsten Hopp |
84ff6f |
*** 926,932 ****
|
|
Karsten Hopp |
84ff6f |
else
|
|
Karsten Hopp |
84ff6f |
{
|
|
Karsten Hopp |
84ff6f |
/* Need to make a copy, value may change when setting new locale. */
|
|
Karsten Hopp |
84ff6f |
! saved_locale = (char *)vim_strsave((char_u *)saved_locale);
|
|
Karsten Hopp |
84ff6f |
(void)setlocale(LC_NUMERIC, "C");
|
|
Karsten Hopp |
84ff6f |
}
|
|
Karsten Hopp |
84ff6f |
#endif
|
|
Karsten Hopp |
84ff6f |
--- 914,920 ----
|
|
Karsten Hopp |
84ff6f |
else
|
|
Karsten Hopp |
84ff6f |
{
|
|
Karsten Hopp |
84ff6f |
/* Need to make a copy, value may change when setting new locale. */
|
|
Karsten Hopp |
84ff6f |
! saved_locale = (char *) PY_STRSAVE(saved_locale);
|
|
Karsten Hopp |
84ff6f |
(void)setlocale(LC_NUMERIC, "C");
|
|
Karsten Hopp |
84ff6f |
}
|
|
Karsten Hopp |
84ff6f |
#endif
|
|
Karsten Hopp |
84ff6f |
***************
|
|
Karsten Hopp |
84ff6f |
*** 953,959 ****
|
|
Karsten Hopp |
84ff6f |
if (saved_locale != NULL)
|
|
Karsten Hopp |
84ff6f |
{
|
|
Karsten Hopp |
84ff6f |
(void)setlocale(LC_NUMERIC, saved_locale);
|
|
Karsten Hopp |
84ff6f |
! vim_free(saved_locale);
|
|
Karsten Hopp |
84ff6f |
}
|
|
Karsten Hopp |
84ff6f |
#endif
|
|
Karsten Hopp |
84ff6f |
|
|
Karsten Hopp |
84ff6f |
--- 941,947 ----
|
|
Karsten Hopp |
84ff6f |
if (saved_locale != NULL)
|
|
Karsten Hopp |
84ff6f |
{
|
|
Karsten Hopp |
84ff6f |
(void)setlocale(LC_NUMERIC, saved_locale);
|
|
Karsten Hopp |
84ff6f |
! PyMem_Free(saved_locale);
|
|
Karsten Hopp |
84ff6f |
}
|
|
Karsten Hopp |
84ff6f |
#endif
|
|
Karsten Hopp |
84ff6f |
|
|
Karsten Hopp |
84ff6f |
*** ../vim-7.3.1041/src/proto/ex_cmds.pro 2012-04-25 17:32:14.000000000 +0200
|
|
Karsten Hopp |
84ff6f |
--- src/proto/ex_cmds.pro 2013-05-29 21:40:05.000000000 +0200
|
|
Karsten Hopp |
84ff6f |
***************
|
|
Karsten Hopp |
84ff6f |
*** 19,24 ****
|
|
Karsten Hopp |
84ff6f |
--- 19,25 ----
|
|
Karsten Hopp |
84ff6f |
void do_fixdel __ARGS((exarg_T *eap));
|
|
Karsten Hopp |
84ff6f |
void print_line_no_prefix __ARGS((linenr_T lnum, int use_number, int list));
|
|
Karsten Hopp |
84ff6f |
void print_line __ARGS((linenr_T lnum, int use_number, int list));
|
|
Karsten Hopp |
84ff6f |
+ int rename_buffer __ARGS((char_u *new_fname));
|
|
Karsten Hopp |
84ff6f |
void ex_file __ARGS((exarg_T *eap));
|
|
Karsten Hopp |
84ff6f |
void ex_update __ARGS((exarg_T *eap));
|
|
Karsten Hopp |
84ff6f |
void ex_write __ARGS((exarg_T *eap));
|
|
Karsten Hopp |
84ff6f |
*** ../vim-7.3.1041/src/testdir/test86.in 2013-05-21 22:23:51.000000000 +0200
|
|
Karsten Hopp |
84ff6f |
--- src/testdir/test86.in 2013-05-29 21:56:41.000000000 +0200
|
|
Karsten Hopp |
84ff6f |
***************
|
|
Karsten Hopp |
84ff6f |
*** 476,481 ****
|
|
Karsten Hopp |
84ff6f |
--- 476,485 ----
|
|
Karsten Hopp |
84ff6f |
:py b=vim.current.buffer
|
|
Karsten Hopp |
84ff6f |
:wincmd w
|
|
Karsten Hopp |
84ff6f |
:mark a
|
|
Karsten Hopp |
84ff6f |
+ :augroup BUFS
|
|
Karsten Hopp |
84ff6f |
+ : autocmd BufFilePost * python cb.append(vim.eval('expand("<abuf>")') + ':BufFilePost:' + vim.eval('bufnr("%")'))
|
|
Karsten Hopp |
84ff6f |
+ : autocmd BufFilePre * python cb.append(vim.eval('expand("<abuf>")') + ':BufFilePre:' + vim.eval('bufnr("%")'))
|
|
Karsten Hopp |
84ff6f |
+ :augroup END
|
|
Karsten Hopp |
84ff6f |
py << EOF
|
|
Karsten Hopp |
84ff6f |
cb = vim.current.buffer
|
|
Karsten Hopp |
84ff6f |
# Tests BufferAppend and BufferItem
|
|
Karsten Hopp |
84ff6f |
***************
|
|
Karsten Hopp |
84ff6f |
*** 496,504 ****
|
|
Karsten Hopp |
84ff6f |
b[0]='bar'
|
|
Karsten Hopp |
84ff6f |
b[0:0]=['baz']
|
|
Karsten Hopp |
84ff6f |
vim.command('call append("$", getbufline(%i, 1, "$"))' % b.number)
|
|
Karsten Hopp |
84ff6f |
# Test CheckBuffer
|
|
Karsten Hopp |
84ff6f |
! vim.command('bwipeout! ' + str(b.number))
|
|
Karsten Hopp |
84ff6f |
! for expr in ('b[1]','b[:] = ["A", "B"]','b[:]','b.append("abc")'):
|
|
Karsten Hopp |
84ff6f |
try:
|
|
Karsten Hopp |
84ff6f |
exec(expr)
|
|
Karsten Hopp |
84ff6f |
except vim.error:
|
|
Karsten Hopp |
84ff6f |
--- 500,519 ----
|
|
Karsten Hopp |
84ff6f |
b[0]='bar'
|
|
Karsten Hopp |
84ff6f |
b[0:0]=['baz']
|
|
Karsten Hopp |
84ff6f |
vim.command('call append("$", getbufline(%i, 1, "$"))' % b.number)
|
|
Karsten Hopp |
84ff6f |
+ # Test assigning to name property
|
|
Karsten Hopp |
84ff6f |
+ old_name = cb.name
|
|
Karsten Hopp |
84ff6f |
+ cb.name = 'foo'
|
|
Karsten Hopp |
84ff6f |
+ cb.append(cb.name[-11:])
|
|
Karsten Hopp |
84ff6f |
+ b.name = 'bar'
|
|
Karsten Hopp |
84ff6f |
+ cb.append(b.name[-11:])
|
|
Karsten Hopp |
84ff6f |
+ cb.name = old_name
|
|
Karsten Hopp |
84ff6f |
+ cb.append(cb.name[-17:])
|
|
Karsten Hopp |
84ff6f |
# Test CheckBuffer
|
|
Karsten Hopp |
84ff6f |
! for _b in vim.buffers:
|
|
Karsten Hopp |
84ff6f |
! if _b is not cb:
|
|
Karsten Hopp |
84ff6f |
! vim.command('bwipeout! ' + str(_b.number))
|
|
Karsten Hopp |
84ff6f |
! del _b
|
|
Karsten Hopp |
84ff6f |
! for expr in ('b[1]','b[:] = ["A", "B"]','b[:]','b.append("abc")', 'b.name = "!"'):
|
|
Karsten Hopp |
84ff6f |
try:
|
|
Karsten Hopp |
84ff6f |
exec(expr)
|
|
Karsten Hopp |
84ff6f |
except vim.error:
|
|
Karsten Hopp |
84ff6f |
***************
|
|
Karsten Hopp |
84ff6f |
*** 507,513 ****
|
|
Karsten Hopp |
84ff6f |
--- 522,533 ----
|
|
Karsten Hopp |
84ff6f |
# Usually a SEGV here
|
|
Karsten Hopp |
84ff6f |
# Should not happen in any case
|
|
Karsten Hopp |
84ff6f |
cb.append('No exception for ' + expr)
|
|
Karsten Hopp |
84ff6f |
+ vim.command('cd .')
|
|
Karsten Hopp |
84ff6f |
EOF
|
|
Karsten Hopp |
84ff6f |
+ :augroup BUFS
|
|
Karsten Hopp |
84ff6f |
+ : autocmd!
|
|
Karsten Hopp |
84ff6f |
+ :augroup END
|
|
Karsten Hopp |
84ff6f |
+ :augroup! BUFS
|
|
Karsten Hopp |
84ff6f |
:"
|
|
Karsten Hopp |
84ff6f |
:" Test vim.buffers object
|
|
Karsten Hopp |
84ff6f |
:set hidden
|
|
Karsten Hopp |
84ff6f |
***************
|
|
Karsten Hopp |
84ff6f |
*** 586,592 ****
|
|
Karsten Hopp |
84ff6f |
else:
|
|
Karsten Hopp |
84ff6f |
return repr(w)
|
|
Karsten Hopp |
84ff6f |
|
|
Karsten Hopp |
84ff6f |
! def Cursor(w, start=len(cb)):
|
|
Karsten Hopp |
84ff6f |
if w.buffer is cb:
|
|
Karsten Hopp |
84ff6f |
return repr((start - w.cursor[0], w.cursor[1]))
|
|
Karsten Hopp |
84ff6f |
else:
|
|
Karsten Hopp |
84ff6f |
--- 606,614 ----
|
|
Karsten Hopp |
84ff6f |
else:
|
|
Karsten Hopp |
84ff6f |
return repr(w)
|
|
Karsten Hopp |
84ff6f |
|
|
Karsten Hopp |
84ff6f |
! start = len(cb)
|
|
Karsten Hopp |
84ff6f |
!
|
|
Karsten Hopp |
84ff6f |
! def Cursor(w):
|
|
Karsten Hopp |
84ff6f |
if w.buffer is cb:
|
|
Karsten Hopp |
84ff6f |
return repr((start - w.cursor[0], w.cursor[1]))
|
|
Karsten Hopp |
84ff6f |
else:
|
|
Karsten Hopp |
84ff6f |
*** ../vim-7.3.1041/src/testdir/test86.ok 2013-05-21 22:38:14.000000000 +0200
|
|
Karsten Hopp |
84ff6f |
--- src/testdir/test86.ok 2013-05-29 21:57:30.000000000 +0200
|
|
Karsten Hopp |
84ff6f |
***************
|
|
Karsten Hopp |
84ff6f |
*** 319,332 ****
|
|
Karsten Hopp |
84ff6f |
Second line
|
|
Karsten Hopp |
84ff6f |
Third line
|
|
Karsten Hopp |
84ff6f |
foo
|
|
Karsten Hopp |
84ff6f |
i:<buffer test86.in>
|
|
Karsten Hopp |
84ff6f |
i2:<buffer test86.in>
|
|
Karsten Hopp |
84ff6f |
i:<buffer a>
|
|
Karsten Hopp |
84ff6f |
i3:<buffer test86.in>
|
|
Karsten Hopp |
84ff6f |
1:<buffer test86.in>=<buffer test86.in>
|
|
Karsten Hopp |
84ff6f |
! 6:<buffer a>=<buffer a>
|
|
Karsten Hopp |
84ff6f |
! 7:<buffer b>=<buffer b>
|
|
Karsten Hopp |
84ff6f |
! 8:<buffer c>=<buffer c>
|
|
Karsten Hopp |
84ff6f |
4
|
|
Karsten Hopp |
84ff6f |
i4:<buffer test86.in>
|
|
Karsten Hopp |
84ff6f |
i4:<buffer test86.in>
|
|
Karsten Hopp |
84ff6f |
--- 319,341 ----
|
|
Karsten Hopp |
84ff6f |
Second line
|
|
Karsten Hopp |
84ff6f |
Third line
|
|
Karsten Hopp |
84ff6f |
foo
|
|
Karsten Hopp |
84ff6f |
+ 1:BufFilePre:1
|
|
Karsten Hopp |
84ff6f |
+ 6:BufFilePost:1
|
|
Karsten Hopp |
84ff6f |
+ testdir/foo
|
|
Karsten Hopp |
84ff6f |
+ 5:BufFilePre:5
|
|
Karsten Hopp |
84ff6f |
+ 5:BufFilePost:5
|
|
Karsten Hopp |
84ff6f |
+ testdir/bar
|
|
Karsten Hopp |
84ff6f |
+ 1:BufFilePre:1
|
|
Karsten Hopp |
84ff6f |
+ 7:BufFilePost:1
|
|
Karsten Hopp |
84ff6f |
+ testdir/test86.in
|
|
Karsten Hopp |
84ff6f |
i:<buffer test86.in>
|
|
Karsten Hopp |
84ff6f |
i2:<buffer test86.in>
|
|
Karsten Hopp |
84ff6f |
i:<buffer a>
|
|
Karsten Hopp |
84ff6f |
i3:<buffer test86.in>
|
|
Karsten Hopp |
84ff6f |
1:<buffer test86.in>=<buffer test86.in>
|
|
Karsten Hopp |
84ff6f |
! 8:<buffer a>=<buffer a>
|
|
Karsten Hopp |
84ff6f |
! 9:<buffer b>=<buffer b>
|
|
Karsten Hopp |
84ff6f |
! 10:<buffer c>=<buffer c>
|
|
Karsten Hopp |
84ff6f |
4
|
|
Karsten Hopp |
84ff6f |
i4:<buffer test86.in>
|
|
Karsten Hopp |
84ff6f |
i4:<buffer test86.in>
|
|
Karsten Hopp |
84ff6f |
***************
|
|
Karsten Hopp |
84ff6f |
*** 335,341 ****
|
|
Karsten Hopp |
84ff6f |
Current tab pages:
|
|
Karsten Hopp |
84ff6f |
<tabpage 0>(1): 1 windows, current is <window object (unknown)>
|
|
Karsten Hopp |
84ff6f |
Windows:
|
|
Karsten Hopp |
84ff6f |
! <window object (unknown)>(1): displays buffer <buffer test86.in>; cursor is at (27, 0)
|
|
Karsten Hopp |
84ff6f |
<tabpage 1>(2): 1 windows, current is <window object (unknown)>
|
|
Karsten Hopp |
84ff6f |
Windows:
|
|
Karsten Hopp |
84ff6f |
<window object (unknown)>(1): displays buffer <buffer 0>; cursor is at (1, 0)
|
|
Karsten Hopp |
84ff6f |
--- 344,350 ----
|
|
Karsten Hopp |
84ff6f |
Current tab pages:
|
|
Karsten Hopp |
84ff6f |
<tabpage 0>(1): 1 windows, current is <window object (unknown)>
|
|
Karsten Hopp |
84ff6f |
Windows:
|
|
Karsten Hopp |
84ff6f |
! <window object (unknown)>(1): displays buffer <buffer test86.in>; cursor is at (36, 0)
|
|
Karsten Hopp |
84ff6f |
<tabpage 1>(2): 1 windows, current is <window object (unknown)>
|
|
Karsten Hopp |
84ff6f |
Windows:
|
|
Karsten Hopp |
84ff6f |
<window object (unknown)>(1): displays buffer <buffer 0>; cursor is at (1, 0)
|
|
Karsten Hopp |
84ff6f |
*** ../vim-7.3.1041/src/testdir/test87.in 2013-05-21 22:23:51.000000000 +0200
|
|
Karsten Hopp |
84ff6f |
--- src/testdir/test87.in 2013-05-29 21:58:50.000000000 +0200
|
|
Karsten Hopp |
84ff6f |
***************
|
|
Karsten Hopp |
84ff6f |
*** 463,468 ****
|
|
Karsten Hopp |
84ff6f |
--- 463,472 ----
|
|
Karsten Hopp |
84ff6f |
:py3 b=vim.current.buffer
|
|
Karsten Hopp |
84ff6f |
:wincmd w
|
|
Karsten Hopp |
84ff6f |
:mark a
|
|
Karsten Hopp |
84ff6f |
+ :augroup BUFS
|
|
Karsten Hopp |
84ff6f |
+ : autocmd BufFilePost * python3 cb.append(vim.eval('expand("<abuf>")') + ':BufFilePost:' + vim.eval('bufnr("%")'))
|
|
Karsten Hopp |
84ff6f |
+ : autocmd BufFilePre * python3 cb.append(vim.eval('expand("<abuf>")') + ':BufFilePre:' + vim.eval('bufnr("%")'))
|
|
Karsten Hopp |
84ff6f |
+ :augroup END
|
|
Karsten Hopp |
84ff6f |
py3 << EOF
|
|
Karsten Hopp |
84ff6f |
cb = vim.current.buffer
|
|
Karsten Hopp |
84ff6f |
# Tests BufferAppend and BufferItem
|
|
Karsten Hopp |
84ff6f |
***************
|
|
Karsten Hopp |
84ff6f |
*** 483,490 ****
|
|
Karsten Hopp |
84ff6f |
b[0]='bar'
|
|
Karsten Hopp |
84ff6f |
b[0:0]=['baz']
|
|
Karsten Hopp |
84ff6f |
vim.command('call append("$", getbufline(%i, 1, "$"))' % b.number)
|
|
Karsten Hopp |
84ff6f |
# Test CheckBuffer
|
|
Karsten Hopp |
84ff6f |
! vim.command('bwipeout! ' + str(b.number))
|
|
Karsten Hopp |
84ff6f |
for expr in ('b[1]','b[:] = ["A", "B"]','b[:]','b.append("abc")'):
|
|
Karsten Hopp |
84ff6f |
try:
|
|
Karsten Hopp |
84ff6f |
exec(expr)
|
|
Karsten Hopp |
84ff6f |
--- 487,505 ----
|
|
Karsten Hopp |
84ff6f |
b[0]='bar'
|
|
Karsten Hopp |
84ff6f |
b[0:0]=['baz']
|
|
Karsten Hopp |
84ff6f |
vim.command('call append("$", getbufline(%i, 1, "$"))' % b.number)
|
|
Karsten Hopp |
84ff6f |
+ # Test assigning to name property
|
|
Karsten Hopp |
84ff6f |
+ old_name = cb.name
|
|
Karsten Hopp |
84ff6f |
+ cb.name = 'foo'
|
|
Karsten Hopp |
84ff6f |
+ cb.append(cb.name[-11:])
|
|
Karsten Hopp |
84ff6f |
+ b.name = 'bar'
|
|
Karsten Hopp |
84ff6f |
+ cb.append(b.name[-11:])
|
|
Karsten Hopp |
84ff6f |
+ cb.name = old_name
|
|
Karsten Hopp |
84ff6f |
+ cb.append(cb.name[-17:])
|
|
Karsten Hopp |
84ff6f |
# Test CheckBuffer
|
|
Karsten Hopp |
84ff6f |
! for _b in vim.buffers:
|
|
Karsten Hopp |
84ff6f |
! if _b is not cb:
|
|
Karsten Hopp |
84ff6f |
! vim.command('bwipeout! ' + str(_b.number))
|
|
Karsten Hopp |
84ff6f |
! del _b
|
|
Karsten Hopp |
84ff6f |
for expr in ('b[1]','b[:] = ["A", "B"]','b[:]','b.append("abc")'):
|
|
Karsten Hopp |
84ff6f |
try:
|
|
Karsten Hopp |
84ff6f |
exec(expr)
|
|
Karsten Hopp |
84ff6f |
***************
|
|
Karsten Hopp |
84ff6f |
*** 494,499 ****
|
|
Karsten Hopp |
84ff6f |
--- 509,515 ----
|
|
Karsten Hopp |
84ff6f |
# Usually a SEGV here
|
|
Karsten Hopp |
84ff6f |
# Should not happen in any case
|
|
Karsten Hopp |
84ff6f |
cb.append('No exception for ' + expr)
|
|
Karsten Hopp |
84ff6f |
+ vim.command('cd .')
|
|
Karsten Hopp |
84ff6f |
EOF
|
|
Karsten Hopp |
84ff6f |
:"
|
|
Karsten Hopp |
84ff6f |
:" Test vim.buffers object
|
|
Karsten Hopp |
84ff6f |
*** ../vim-7.3.1041/src/testdir/test87.ok 2013-05-21 22:38:14.000000000 +0200
|
|
Karsten Hopp |
84ff6f |
--- src/testdir/test87.ok 2013-05-29 21:59:04.000000000 +0200
|
|
Karsten Hopp |
84ff6f |
***************
|
|
Karsten Hopp |
84ff6f |
*** 308,321 ****
|
|
Karsten Hopp |
84ff6f |
Second line
|
|
Karsten Hopp |
84ff6f |
Third line
|
|
Karsten Hopp |
84ff6f |
foo
|
|
Karsten Hopp |
84ff6f |
i:<buffer test87.in>
|
|
Karsten Hopp |
84ff6f |
i2:<buffer test87.in>
|
|
Karsten Hopp |
84ff6f |
i:<buffer a>
|
|
Karsten Hopp |
84ff6f |
i3:<buffer test87.in>
|
|
Karsten Hopp |
84ff6f |
1:<buffer test87.in>=<buffer test87.in>
|
|
Karsten Hopp |
84ff6f |
! 6:<buffer a>=<buffer a>
|
|
Karsten Hopp |
84ff6f |
! 7:<buffer b>=<buffer b>
|
|
Karsten Hopp |
84ff6f |
! 8:<buffer c>=<buffer c>
|
|
Karsten Hopp |
84ff6f |
4
|
|
Karsten Hopp |
84ff6f |
i4:<buffer test87.in>
|
|
Karsten Hopp |
84ff6f |
i4:<buffer test87.in>
|
|
Karsten Hopp |
84ff6f |
--- 308,330 ----
|
|
Karsten Hopp |
84ff6f |
Second line
|
|
Karsten Hopp |
84ff6f |
Third line
|
|
Karsten Hopp |
84ff6f |
foo
|
|
Karsten Hopp |
84ff6f |
+ 1:BufFilePre:1
|
|
Karsten Hopp |
84ff6f |
+ 6:BufFilePost:1
|
|
Karsten Hopp |
84ff6f |
+ testdir/foo
|
|
Karsten Hopp |
84ff6f |
+ 5:BufFilePre:5
|
|
Karsten Hopp |
84ff6f |
+ 5:BufFilePost:5
|
|
Karsten Hopp |
84ff6f |
+ testdir/bar
|
|
Karsten Hopp |
84ff6f |
+ 1:BufFilePre:1
|
|
Karsten Hopp |
84ff6f |
+ 7:BufFilePost:1
|
|
Karsten Hopp |
84ff6f |
+ testdir/test87.in
|
|
Karsten Hopp |
84ff6f |
i:<buffer test87.in>
|
|
Karsten Hopp |
84ff6f |
i2:<buffer test87.in>
|
|
Karsten Hopp |
84ff6f |
i:<buffer a>
|
|
Karsten Hopp |
84ff6f |
i3:<buffer test87.in>
|
|
Karsten Hopp |
84ff6f |
1:<buffer test87.in>=<buffer test87.in>
|
|
Karsten Hopp |
84ff6f |
! 8:<buffer a>=<buffer a>
|
|
Karsten Hopp |
84ff6f |
! 9:<buffer b>=<buffer b>
|
|
Karsten Hopp |
84ff6f |
! 10:<buffer c>=<buffer c>
|
|
Karsten Hopp |
84ff6f |
4
|
|
Karsten Hopp |
84ff6f |
i4:<buffer test87.in>
|
|
Karsten Hopp |
84ff6f |
i4:<buffer test87.in>
|
|
Karsten Hopp |
84ff6f |
***************
|
|
Karsten Hopp |
84ff6f |
*** 324,330 ****
|
|
Karsten Hopp |
84ff6f |
Current tab pages:
|
|
Karsten Hopp |
84ff6f |
<tabpage 0>(1): 1 windows, current is <window object (unknown)>
|
|
Karsten Hopp |
84ff6f |
Windows:
|
|
Karsten Hopp |
84ff6f |
! <window object (unknown)>(1): displays buffer <buffer test87.in>; cursor is at (27, 0)
|
|
Karsten Hopp |
84ff6f |
<tabpage 1>(2): 1 windows, current is <window object (unknown)>
|
|
Karsten Hopp |
84ff6f |
Windows:
|
|
Karsten Hopp |
84ff6f |
<window object (unknown)>(1): displays buffer <buffer 0>; cursor is at (1, 0)
|
|
Karsten Hopp |
84ff6f |
--- 333,339 ----
|
|
Karsten Hopp |
84ff6f |
Current tab pages:
|
|
Karsten Hopp |
84ff6f |
<tabpage 0>(1): 1 windows, current is <window object (unknown)>
|
|
Karsten Hopp |
84ff6f |
Windows:
|
|
Karsten Hopp |
84ff6f |
! <window object (unknown)>(1): displays buffer <buffer test87.in>; cursor is at (36, 0)
|
|
Karsten Hopp |
84ff6f |
<tabpage 1>(2): 1 windows, current is <window object (unknown)>
|
|
Karsten Hopp |
84ff6f |
Windows:
|
|
Karsten Hopp |
84ff6f |
<window object (unknown)>(1): displays buffer <buffer 0>; cursor is at (1, 0)
|
|
Karsten Hopp |
84ff6f |
*** ../vim-7.3.1041/src/version.c 2013-05-29 21:37:29.000000000 +0200
|
|
Karsten Hopp |
84ff6f |
--- src/version.c 2013-05-29 22:01:11.000000000 +0200
|
|
Karsten Hopp |
84ff6f |
***************
|
|
Karsten Hopp |
84ff6f |
*** 730,731 ****
|
|
Karsten Hopp |
84ff6f |
--- 730,733 ----
|
|
Karsten Hopp |
84ff6f |
{ /* Add new patch number below this line */
|
|
Karsten Hopp |
84ff6f |
+ /**/
|
|
Karsten Hopp |
84ff6f |
+ 1042,
|
|
Karsten Hopp |
84ff6f |
/**/
|
|
Karsten Hopp |
84ff6f |
|
|
Karsten Hopp |
84ff6f |
--
|
|
Karsten Hopp |
84ff6f |
hundred-and-one symptoms of being an internet addict:
|
|
Karsten Hopp |
84ff6f |
19. All of your friends have an @ in their names.
|
|
Karsten Hopp |
84ff6f |
|
|
Karsten Hopp |
84ff6f |
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
|
|
Karsten Hopp |
84ff6f |
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
|
|
Karsten Hopp |
84ff6f |
\\\ an exciting new programming language -- http://www.Zimbu.org ///
|
|
Karsten Hopp |
84ff6f |
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
|