Merge remote-tracking branch 'fedora/f19' into rhel-7.0

This commit is contained in:
Karsten Hopp 2013-05-13 14:29:13 +02:00
commit db1738822f
43 changed files with 13754 additions and 2 deletions

47
7.3.904 Normal file
View File

@ -0,0 +1,47 @@
To: vim_dev@googlegroups.com
Subject: Patch 7.3.904
Fcc: outbox
From: Bram Moolenaar <Bram@moolenaar.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
------------
Patch 7.3.904 (after 7.3.893)
Problem: Using memory freed by the garbage collector.
Solution: Mark items in aucmd_win as used.
Files: src/eval.c
*** ../vim-7.3.903/src/eval.c 2013-04-15 15:15:31.000000000 +0200
--- src/eval.c 2013-04-15 18:20:35.000000000 +0200
***************
*** 6792,6797 ****
--- 6792,6801 ----
/* window-local variables */
FOR_ALL_TAB_WINDOWS(tp, wp)
set_ref_in_item(&wp->w_winvar.di_tv, copyID);
+ #ifdef FEAT_AUTOCMD
+ if (aucmd_win != NULL)
+ set_ref_in_item(&aucmd_win->w_winvar.di_tv, copyID);
+ #endif
#ifdef FEAT_WINDOWS
/* tabpage-local variables */
*** ../vim-7.3.903/src/version.c 2013-04-15 16:14:15.000000000 +0200
--- src/version.c 2013-04-15 18:21:49.000000000 +0200
***************
*** 730,731 ****
--- 730,733 ----
{ /* Add new patch number below this line */
+ /**/
+ 904,
/**/
--
Rule #1: Don't give somebody a tool that he's going to hurt himself with.
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///

45
7.3.905 Normal file
View File

@ -0,0 +1,45 @@
To: vim_dev@googlegroups.com
Subject: Patch 7.3.905
Fcc: outbox
From: Bram Moolenaar <Bram@moolenaar.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
------------
Patch 7.3.905 (after 7.3.903)
Problem: Crash when writing viminfo. (Ron Aaron)
Solution: Prevent freed history info to be used.
Files: src/ex_getln.c
*** ../vim-7.3.904/src/ex_getln.c 2013-04-15 16:14:15.000000000 +0200
--- src/ex_getln.c 2013-04-15 22:12:33.000000000 +0200
***************
*** 6264,6269 ****
--- 6264,6270 ----
vim_free(viminfo_history[type][i]);
vim_free(viminfo_history[type]);
viminfo_history[type] = NULL;
+ viminfo_hisidx[type] = 0;
}
}
#endif /* FEAT_VIMINFO */
*** ../vim-7.3.904/src/version.c 2013-04-15 18:25:55.000000000 +0200
--- src/version.c 2013-04-15 22:19:03.000000000 +0200
***************
*** 730,731 ****
--- 730,733 ----
{ /* Add new patch number below this line */
+ /**/
+ 905,
/**/
--
hundred-and-one symptoms of being an internet addict:
180. You maintain more than six e-mail addresses.
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///

56
7.3.906 Normal file
View File

@ -0,0 +1,56 @@
To: vim_dev@googlegroups.com
Subject: Patch 7.3.906
Fcc: outbox
From: Bram Moolenaar <Bram@moolenaar.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
------------
Patch 7.3.906
Problem: The "sleep .2" for running tests does not work on Solaris.
Solution: Fall back to using "sleep 1". (Laurent Blume)
Files: src/testdir/Makefile
*** ../vim-7.3.905/src/testdir/Makefile 2013-04-12 13:44:49.000000000 +0200
--- src/testdir/Makefile 2013-04-21 13:06:20.000000000 +0200
***************
*** 69,76 ****
.in.out:
-rm -rf $*.failed test.ok $(RM_ON_RUN)
cp $*.ok test.ok
! # Sleep a moment to avoid that the xterm title is messed up
! @-sleep .2
-$(RUN_VIM) $*.in
# For flaky tests retry one time.
--- 69,78 ----
.in.out:
-rm -rf $*.failed test.ok $(RM_ON_RUN)
cp $*.ok test.ok
! # Sleep a moment to avoid that the xterm title is messed up.
! # 200 msec is sufficient, but only modern sleep supports a fraction of
! # a second, fall back to a second if it fails.
! @-/bin/sh -c "sleep .2 > /dev/null 2>&1 || sleep 1"
-$(RUN_VIM) $*.in
# For flaky tests retry one time.
*** ../vim-7.3.905/src/version.c 2013-04-15 22:22:48.000000000 +0200
--- src/version.c 2013-04-24 12:54:57.000000000 +0200
***************
*** 730,731 ****
--- 730,733 ----
{ /* Add new patch number below this line */
+ /**/
+ 906,
/**/
--
Don't be humble ... you're not that great.
-- Golda Meir
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///

162
7.3.907 Normal file
View File

@ -0,0 +1,162 @@
To: vim_dev@googlegroups.com
Subject: Patch 7.3.907
Fcc: outbox
From: Bram Moolenaar <Bram@moolenaar.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
------------
Patch 7.3.907
Problem: Python uses IndexError when a dict key is not found.
Solution: Use KeyError instead. (ZyX)
Files: src/if_py_both.h, src/if_python3.c, src/if_python.c,
src/testdir/test86.ok, src/testdir/test87.ok
*** ../vim-7.3.906/src/if_py_both.h 2013-04-05 19:32:30.000000000 +0200
--- src/if_py_both.h 2013-04-24 13:00:01.000000000 +0200
***************
*** 861,867 ****
if (di == NULL)
{
! PyErr_SetString(PyExc_IndexError, _("no such key in dictionary"));
return NULL;
}
--- 861,867 ----
if (di == NULL)
{
! PyErr_SetString(PyExc_KeyError, _("no such key in dictionary"));
return NULL;
}
*** ../vim-7.3.906/src/if_python3.c 2013-02-20 16:09:35.000000000 +0100
--- src/if_python3.c 2013-04-24 13:00:01.000000000 +0200
***************
*** 327,338 ****
--- 327,340 ----
/* Imported exception objects */
static PyObject *p3imp_PyExc_AttributeError;
static PyObject *p3imp_PyExc_IndexError;
+ static PyObject *p3imp_PyExc_KeyError;
static PyObject *p3imp_PyExc_KeyboardInterrupt;
static PyObject *p3imp_PyExc_TypeError;
static PyObject *p3imp_PyExc_ValueError;
# define PyExc_AttributeError p3imp_PyExc_AttributeError
# define PyExc_IndexError p3imp_PyExc_IndexError
+ # define PyExc_KeyError p3imp_PyExc_KeyError
# define PyExc_KeyboardInterrupt p3imp_PyExc_KeyboardInterrupt
# define PyExc_TypeError p3imp_PyExc_TypeError
# define PyExc_ValueError p3imp_PyExc_ValueError
***************
*** 567,577 ****
--- 569,581 ----
PyObject *exdict = PyModule_GetDict(exmod);
p3imp_PyExc_AttributeError = PyDict_GetItemString(exdict, "AttributeError");
p3imp_PyExc_IndexError = PyDict_GetItemString(exdict, "IndexError");
+ p3imp_PyExc_KeyError = PyDict_GetItemString(exdict, "KeyError");
p3imp_PyExc_KeyboardInterrupt = PyDict_GetItemString(exdict, "KeyboardInterrupt");
p3imp_PyExc_TypeError = PyDict_GetItemString(exdict, "TypeError");
p3imp_PyExc_ValueError = PyDict_GetItemString(exdict, "ValueError");
Py_XINCREF(p3imp_PyExc_AttributeError);
Py_XINCREF(p3imp_PyExc_IndexError);
+ Py_XINCREF(p3imp_PyExc_KeyError);
Py_XINCREF(p3imp_PyExc_KeyboardInterrupt);
Py_XINCREF(p3imp_PyExc_TypeError);
Py_XINCREF(p3imp_PyExc_ValueError);
*** ../vim-7.3.906/src/if_python.c 2013-02-20 16:09:35.000000000 +0100
--- src/if_python.c 2013-04-24 13:00:01.000000000 +0200
***************
*** 348,359 ****
--- 348,361 ----
/* Imported exception objects */
static PyObject *imp_PyExc_AttributeError;
static PyObject *imp_PyExc_IndexError;
+ static PyObject *imp_PyExc_KeyError;
static PyObject *imp_PyExc_KeyboardInterrupt;
static PyObject *imp_PyExc_TypeError;
static PyObject *imp_PyExc_ValueError;
# define PyExc_AttributeError imp_PyExc_AttributeError
# define PyExc_IndexError imp_PyExc_IndexError
+ # define PyExc_KeyError imp_PyExc_KeyError
# define PyExc_KeyboardInterrupt imp_PyExc_KeyboardInterrupt
# define PyExc_TypeError imp_PyExc_TypeError
# define PyExc_ValueError imp_PyExc_ValueError
***************
*** 579,589 ****
--- 581,593 ----
PyObject *exdict = PyModule_GetDict(exmod);
imp_PyExc_AttributeError = PyDict_GetItemString(exdict, "AttributeError");
imp_PyExc_IndexError = PyDict_GetItemString(exdict, "IndexError");
+ imp_PyExc_KeyError = PyDict_GetItemString(exdict, "KeyError");
imp_PyExc_KeyboardInterrupt = PyDict_GetItemString(exdict, "KeyboardInterrupt");
imp_PyExc_TypeError = PyDict_GetItemString(exdict, "TypeError");
imp_PyExc_ValueError = PyDict_GetItemString(exdict, "ValueError");
Py_XINCREF(imp_PyExc_AttributeError);
Py_XINCREF(imp_PyExc_IndexError);
+ Py_XINCREF(imp_PyExc_KeyError);
Py_XINCREF(imp_PyExc_KeyboardInterrupt);
Py_XINCREF(imp_PyExc_TypeError);
Py_XINCREF(imp_PyExc_ValueError);
*** ../vim-7.3.906/src/testdir/test86.ok 2013-04-05 19:32:30.000000000 +0200
--- src/testdir/test86.ok 2013-04-24 13:00:01.000000000 +0200
***************
*** 38,44 ****
Vim(python):E725:
Vim(python):E117:
[0.0, 0.0]
! IndexError
TypeError
TypeError
ValueError
--- 38,44 ----
Vim(python):E725:
Vim(python):E117:
[0.0, 0.0]
! KeyError
TypeError
TypeError
ValueError
*** ../vim-7.3.906/src/testdir/test87.ok 2013-02-20 16:54:24.000000000 +0100
--- src/testdir/test87.ok 2013-04-24 13:00:01.000000000 +0200
***************
*** 38,44 ****
Vim(py3):E725:
Vim(py3):E117:
[0.0, 0.0]
! IndexError
TypeError
TypeError
ValueError
--- 38,44 ----
Vim(py3):E725:
Vim(py3):E117:
[0.0, 0.0]
! KeyError
TypeError
TypeError
ValueError
*** ../vim-7.3.906/src/version.c 2013-04-24 12:56:13.000000000 +0200
--- src/version.c 2013-04-24 13:00:13.000000000 +0200
***************
*** 730,731 ****
--- 730,733 ----
{ /* Add new patch number below this line */
+ /**/
+ 907,
/**/
--
hundred-and-one symptoms of being an internet addict:
219. Your spouse has his or her lawyer deliver the divorce papers...
via e-mail.
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///

45
7.3.908 Normal file
View File

@ -0,0 +1,45 @@
To: vim_dev@googlegroups.com
Subject: Patch 7.3.908
Fcc: outbox
From: Bram Moolenaar <Bram@moolenaar.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
------------
Patch 7.3.908
Problem: Possible crash when using a list in Python.
Solution: Return early if the list is NULL. (ZyX)
Files: src/if_py_both.h
*** ../vim-7.3.907/src/if_py_both.h 2013-04-24 13:04:21.000000000 +0200
--- src/if_py_both.h 2013-04-24 13:10:20.000000000 +0200
***************
*** 738,743 ****
--- 738,745 ----
tv->vval.v_dict = d;
list = PyMapping_Items(obj);
+ if (list == NULL)
+ return -1;
lsize = PyList_Size(list);
while (lsize--)
{
*** ../vim-7.3.907/src/version.c 2013-04-24 13:04:21.000000000 +0200
--- src/version.c 2013-04-24 13:09:30.000000000 +0200
***************
*** 730,731 ****
--- 730,733 ----
{ /* Add new patch number below this line */
+ /**/
+ 908,
/**/
--
How do I set the laser printer to stun?
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///

2129
7.3.909 Normal file

File diff suppressed because it is too large Load Diff

119
7.3.910 Normal file
View File

@ -0,0 +1,119 @@
To: vim_dev@googlegroups.com
Subject: Patch 7.3.910
Fcc: outbox
From: Bram Moolenaar <Bram@moolenaar.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
------------
Patch 7.3.910
Problem: Python code in #ifdef branches with only minor differences.
Solution: Merge the #ifdef branches. (ZyX)
Files: src/if_py_both.h, src/if_python.c
*** ../vim-7.3.909/src/if_py_both.h 2013-04-24 13:39:11.000000000 +0200
--- src/if_py_both.h 2013-04-24 13:42:30.000000000 +0200
***************
*** 2853,2859 ****
tv->v_type = VAR_FUNC;
func_ref(tv->vval.v_string);
}
- #if PY_MAJOR_VERSION >= 3
else if (PyBytes_Check(obj))
{
char_u *result;
--- 2853,2858 ----
***************
*** 2873,2902 ****
PyObject *bytes;
char_u *result;
- bytes = PyString_AsBytes(obj);
- if (bytes == NULL)
- return -1;
-
- if(PyString_AsStringAndSize(bytes, (char **) &result, NULL) == -1)
- return -1;
- if (result == NULL)
- return -1;
-
- if (set_string_copy(result, tv) == -1)
- {
- Py_XDECREF(bytes);
- return -1;
- }
- Py_XDECREF(bytes);
-
- tv->v_type = VAR_STRING;
- }
- #else
- else if (PyUnicode_Check(obj))
- {
- PyObject *bytes;
- char_u *result;
-
bytes = PyUnicode_AsEncodedString(obj, (char *)ENC_OPT, NULL);
if (bytes == NULL)
return -1;
--- 2872,2877 ----
***************
*** 2915,2934 ****
tv->v_type = VAR_STRING;
}
! else if (PyString_Check(obj))
! {
! char_u *result;
!
! if(PyString_AsStringAndSize(obj, (char **) &result, NULL) == -1)
! return -1;
! if (result == NULL)
! return -1;
!
! if (set_string_copy(result, tv) == -1)
! return -1;
!
! tv->v_type = VAR_STRING;
! }
else if (PyInt_Check(obj))
{
tv->v_type = VAR_NUMBER;
--- 2890,2896 ----
tv->v_type = VAR_STRING;
}
! #if PY_MAJOR_VERSION < 3
else if (PyInt_Check(obj))
{
tv->v_type = VAR_NUMBER;
*** ../vim-7.3.909/src/if_python.c 2013-04-24 13:39:11.000000000 +0200
--- src/if_python.c 2013-04-24 13:42:30.000000000 +0200
***************
*** 59,64 ****
--- 59,65 ----
static void init_structs(void);
#define PyBytes_FromString PyString_FromString
+ #define PyBytes_Check PyString_Check
/* No-op conversion functions, use with care! */
#define PyString_AsBytes(obj) (obj)
*** ../vim-7.3.909/src/version.c 2013-04-24 13:39:11.000000000 +0200
--- src/version.c 2013-04-24 13:43:51.000000000 +0200
***************
*** 730,731 ****
--- 730,733 ----
{ /* Add new patch number below this line */
+ /**/
+ 910,
/**/
--
Your fault: core dumped
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///

343
7.3.911 Normal file
View File

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

52
7.3.912 Normal file
View File

@ -0,0 +1,52 @@
To: vim_dev@googlegroups.com
Subject: Patch 7.3.912
Fcc: outbox
From: Bram Moolenaar <Bram@moolenaar.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
------------
Patch 7.3.912
Problem: Typing a ":" command at the hit-enter dialog does not work if the
"file changed" dialog happens next.
Solution: Check for changed files before giving the hit-enter dialog.
Files: src/message.c
*** ../vim-7.3.911/src/message.c 2013-03-19 13:56:03.000000000 +0100
--- src/message.c 2013-04-24 15:01:31.000000000 +0200
***************
*** 939,944 ****
--- 939,950 ----
#ifdef USE_ON_FLY_SCROLL
dont_scroll = TRUE; /* disallow scrolling here */
#endif
+ /* Avoid the sequence that the user types ":" at the hit-return prompt
+ * to start an Ex command, but the file-changed dialog gets in the
+ * way. */
+ if (need_check_timestamps)
+ check_timestamps(FALSE);
+
hit_return_msg();
do
*** ../vim-7.3.911/src/version.c 2013-04-24 14:06:42.000000000 +0200
--- src/version.c 2013-04-24 15:04:30.000000000 +0200
***************
*** 730,731 ****
--- 730,733 ----
{ /* Add new patch number below this line */
+ /**/
+ 912,
/**/
--
hundred-and-one symptoms of being an internet addict:
224. You set up your own Web page. You set up a Web page for each
of your kids... and your pets.
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///

73
7.3.913 Normal file
View File

@ -0,0 +1,73 @@
To: vim_dev@googlegroups.com
Subject: Patch 7.3.913
Fcc: outbox
From: Bram Moolenaar <Bram@moolenaar.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
------------
Patch 7.3.913 (after 7.3.905)
Problem: Still a crash when writing viminfo.
Solution: Add checks for NULL pointers. (Ron Aaron)
Files: src/ex_getln.c
*** ../vim-7.3.912/src/ex_getln.c 2013-04-15 22:22:48.000000000 +0200
--- src/ex_getln.c 2013-04-24 15:35:22.000000000 +0200
***************
*** 6177,6182 ****
--- 6177,6183 ----
}
vim_free(viminfo_history[type]);
viminfo_history[type] = NULL;
+ viminfo_hisidx[type] = 0;
}
}
***************
*** 6230,6235 ****
--- 6231,6237 ----
&& !(round == 2 && i >= viminfo_hisidx[type]))
{
p = round == 1 ? history[type][i].hisstr
+ : viminfo_history[type] == NULL ? NULL
: viminfo_history[type][i];
if (p != NULL && (round == 2 || !history[type][i].viminfo))
{
***************
*** 6261,6267 ****
}
}
for (i = 0; i < viminfo_hisidx[type]; ++i)
! vim_free(viminfo_history[type][i]);
vim_free(viminfo_history[type]);
viminfo_history[type] = NULL;
viminfo_hisidx[type] = 0;
--- 6263,6270 ----
}
}
for (i = 0; i < viminfo_hisidx[type]; ++i)
! if (viminfo_history[type] != NULL)
! vim_free(viminfo_history[type][i]);
vim_free(viminfo_history[type]);
viminfo_history[type] = NULL;
viminfo_hisidx[type] = 0;
*** ../vim-7.3.912/src/version.c 2013-04-24 15:12:27.000000000 +0200
--- src/version.c 2013-04-24 15:38:22.000000000 +0200
***************
*** 730,731 ****
--- 730,733 ----
{ /* Add new patch number below this line */
+ /**/
+ 913,
/**/
--
hundred-and-one symptoms of being an internet addict:
225. You sign up for free subscriptions for all the computer magazines
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///

72
7.3.914 Normal file
View File

@ -0,0 +1,72 @@
To: vim_dev@googlegroups.com
Subject: Patch 7.3.914
Fcc: outbox
From: Bram Moolenaar <Bram@moolenaar.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
------------
Patch 7.3.914
Problem: ~/.viminfo is messed up when running tests.
Solution: Set the viminfo filename.
Files: src/testdir/test89.in, src/testdir/test94.in
*** ../vim-7.3.913/src/testdir/test89.in 2013-03-13 20:42:28.000000000 +0100
--- src/testdir/test89.in 2013-04-24 15:42:05.000000000 +0200
***************
*** 2,8 ****
STARTTEST
:so small.vim
! :set hidden nocp nu rnu
:redir @a | set nu? rnu? | redir END
:e! xx
:redir @b | set nu? rnu? | redir END
--- 2,8 ----
STARTTEST
:so small.vim
! :set hidden nocp nu rnu viminfo+=nviminfo
:redir @a | set nu? rnu? | redir END
:e! xx
:redir @b | set nu? rnu? | redir END
*** ../vim-7.3.913/src/testdir/test94.in 2013-04-12 13:44:49.000000000 +0200
--- src/testdir/test94.in 2013-04-24 15:43:10.000000000 +0200
***************
*** 17,23 ****
STARTTEST
:so small.vim
! :set nocp
:
:" User functions
:function MoveToCap()
--- 17,23 ----
STARTTEST
:so small.vim
! :set nocp viminfo+=nviminfo
:
:" User functions
:function MoveToCap()
*** ../vim-7.3.913/src/version.c 2013-04-24 15:39:06.000000000 +0200
--- src/version.c 2013-04-24 15:44:19.000000000 +0200
***************
*** 730,731 ****
--- 730,733 ----
{ /* Add new patch number below this line */
+ /**/
+ 914,
/**/
--
hundred-and-one symptoms of being an internet addict:
226. You sit down at the computer right after dinner and your spouse
says "See you in the morning."
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///

47
7.3.915 Normal file
View File

@ -0,0 +1,47 @@
To: vim_dev@googlegroups.com
Subject: Patch 7.3.915
Fcc: outbox
From: Bram Moolenaar <Bram@moolenaar.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
------------
Patch 7.3.915
Problem: When reading a file with encoding conversion fails at the end the
next encoding in 'fencs' is not used.
Solution: Retry with another encoding when possible. (Taro Muraoka)
Files: src/fileio.c
*** ../vim-7.3.914/src/fileio.c 2013-04-15 12:27:30.000000000 +0200
--- src/fileio.c 2013-04-24 16:16:28.000000000 +0200
***************
*** 1380,1385 ****
--- 1380,1387 ----
# endif
)
{
+ if (can_retry)
+ goto rewind_retry;
if (conv_error == 0)
conv_error = curbuf->b_ml.ml_line_count
- linecnt + 1;
*** ../vim-7.3.914/src/version.c 2013-04-24 15:47:11.000000000 +0200
--- src/version.c 2013-04-24 16:18:48.000000000 +0200
***************
*** 730,731 ****
--- 730,733 ----
{ /* Add new patch number below this line */
+ /**/
+ 915,
/**/
--
hundred-and-one symptoms of being an internet addict:
227. You sleep next to your monitor. Or on top of it.
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///

115
7.3.916 Normal file
View File

@ -0,0 +1,115 @@
To: vim_dev@googlegroups.com
Subject: Patch 7.3.916
Fcc: outbox
From: Bram Moolenaar <Bram@moolenaar.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
------------
Patch 7.3.916
Problem: Using freed memory when pasting with the mouse (Issue 130).
Solution: Get the byte value early. (hint by Dominique Pelle)
Files: src/buffer.c
*** ../vim-7.3.915/src/buffer.c 2013-04-15 12:27:30.000000000 +0200
--- src/buffer.c 2013-04-24 16:45:38.000000000 +0200
***************
*** 3506,3512 ****
char_u *p;
char_u *s;
char_u *t;
! char_u *linecont;
#ifdef FEAT_EVAL
win_T *o_curwin;
buf_T *o_curbuf;
--- 3506,3512 ----
char_u *p;
char_u *s;
char_u *t;
! int byteval;
#ifdef FEAT_EVAL
win_T *o_curwin;
buf_T *o_curbuf;
***************
*** 3573,3584 ****
fillchar = '-';
#endif
! /*
! * Get line & check if empty (cursorpos will show "0-1").
! * If inversion is possible we use it. Else '=' characters are used.
! */
! linecont = ml_get_buf(wp->w_buffer, wp->w_cursor.lnum, FALSE);
! empty_line = (*linecont == NUL);
groupdepth = 0;
p = out;
--- 3573,3593 ----
fillchar = '-';
#endif
! /* Get line & check if empty (cursorpos will show "0-1"). Note that
! * p will become invalid when getting another buffer line. */
! p = ml_get_buf(wp->w_buffer, wp->w_cursor.lnum, FALSE);
! empty_line = (*p == NUL);
!
! /* Get the byte value now, in case we need it below. This is more
! * efficient than making a copy of the line. */
! if (wp->w_cursor.col > (colnr_T)STRLEN(p))
! byteval = 0;
! else
! #ifdef FEAT_MBYTE
! byteval = (*mb_ptr2char)(p + wp->w_cursor.col);
! #else
! byteval = p[wp->w_cursor.col];
! #endif
groupdepth = 0;
p = out;
***************
*** 3956,3971 ****
case STL_BYTEVAL_X:
base = 'X';
case STL_BYTEVAL:
! if (wp->w_cursor.col > (colnr_T)STRLEN(linecont))
! num = 0;
! else
! {
! #ifdef FEAT_MBYTE
! num = (*mb_ptr2char)(linecont + wp->w_cursor.col);
! #else
! num = linecont[wp->w_cursor.col];
! #endif
! }
if (num == NL)
num = 0;
else if (num == CAR && get_fileformat(wp->w_buffer) == EOL_MAC)
--- 3965,3971 ----
case STL_BYTEVAL_X:
base = 'X';
case STL_BYTEVAL:
! num = byteval;
if (num == NL)
num = 0;
else if (num == CAR && get_fileformat(wp->w_buffer) == EOL_MAC)
*** ../vim-7.3.915/src/version.c 2013-04-24 16:33:58.000000000 +0200
--- src/version.c 2013-04-24 16:51:24.000000000 +0200
***************
*** 730,731 ****
--- 730,733 ----
{ /* Add new patch number below this line */
+ /**/
+ 916,
/**/
--
hundred-and-one symptoms of being an internet addict:
228. You spend Saturday night making the counter on your home page
pass that 2000 mark.
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///

85
7.3.917 Normal file
View File

@ -0,0 +1,85 @@
To: vim_dev@googlegroups.com
Subject: Patch 7.3.917
Fcc: outbox
From: Bram Moolenaar <Bram@moolenaar.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
------------
Patch 7.3.917
Problem: When a path ends in a backslash appending a comma has the wrong
effect.
Solution: Replace a trailing backslash with a slash. (Nazri Ramliy)
Files: src/misc1.c, src/testdir/test73.in, src/testdir/test73.ok
*** ../vim-7.3.916/src/misc1.c 2013-04-15 15:47:07.000000000 +0200
--- src/misc1.c 2013-04-24 17:25:45.000000000 +0200
***************
*** 10135,10140 ****
--- 10135,10149 ----
if (ga_grow(gap, 1) == FAIL)
break;
+
+ # if defined(MSWIN) || defined(MSDOS)
+ /* Avoid the path ending in a backslash, it fails when a comma is
+ * appended. */
+ len = STRLEN(buf);
+ if (buf[len - 1] == '\\')
+ buf[len - 1] = '/';
+ # endif
+
p = vim_strsave(buf);
if (p == NULL)
break;
*** ../vim-7.3.916/src/testdir/test73.in 2010-08-15 21:57:29.000000000 +0200
--- src/testdir/test73.in 2013-04-24 17:22:14.000000000 +0200
***************
*** 158,163 ****
--- 158,173 ----
:" Find the file containing 'E.T.' in the Xfind/in/path directory
:find file
:exec "w >>" . test_out
+ :"
+ :" Test that completion works when path=.,,
+ :"
+ :set path=.,,
+ :" Open Jimmy Hoffa file
+ :e in/file.txt
+ :exec "w >>" . test_out
+ :" Search for the file containing Holy Grail in same directory as in/path.txt
+ :find stu
+ :exec "w >>" . test_out
:q
:exec "cd " . cwd
:call DeleteDirectory("Xfind")
*** ../vim-7.3.916/src/testdir/test73.ok 2010-08-15 21:57:29.000000000 +0200
--- src/testdir/test73.ok 2013-04-24 17:22:28.000000000 +0200
***************
*** 17,19 ****
--- 17,21 ----
Voyager 2
Jimmy Hoffa
E.T.
+ Jimmy Hoffa
+ Another Holy Grail
*** ../vim-7.3.916/src/version.c 2013-04-24 16:52:28.000000000 +0200
--- src/version.c 2013-04-24 17:27:55.000000000 +0200
***************
*** 730,731 ****
--- 730,733 ----
{ /* Add new patch number below this line */
+ /**/
+ 917,
/**/
--
hundred-and-one symptoms of being an internet addict:
229. You spend so much time thinking what to add on this list.
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///

80
7.3.918 Normal file
View File

@ -0,0 +1,80 @@
To: vim_dev@googlegroups.com
Subject: Patch 7.3.918
Fcc: outbox
From: Bram Moolenaar <Bram@moolenaar.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
------------
Patch 7.3.918
Problem: Repeating an Ex command after using a Visual motion does not work.
Solution: Check for an Ex command being used. (David Bürgin)
Files: src/normal.c
*** ../vim-7.3.917/src/normal.c 2013-04-05 17:43:10.000000000 +0200
--- src/normal.c 2013-04-24 18:12:43.000000000 +0200
***************
*** 1504,1514 ****
}
#endif
! /* only redo yank when 'y' flag is in 'cpoptions' */
! /* never redo "zf" (define fold) */
if ((vim_strchr(p_cpo, CPO_YANK) != NULL || oap->op_type != OP_YANK)
#ifdef FEAT_VISUAL
! && (!VIsual_active || oap->motion_force)
#endif
&& cap->cmdchar != 'D'
#ifdef FEAT_FOLDING
--- 1504,1517 ----
}
#endif
! /* Only redo yank when 'y' flag is in 'cpoptions'. */
! /* Never redo "zf" (define fold). */
if ((vim_strchr(p_cpo, CPO_YANK) != NULL || oap->op_type != OP_YANK)
#ifdef FEAT_VISUAL
! && ((!VIsual_active || oap->motion_force)
! /* Also redo Operator-pending Visual mode mappings */
! || (VIsual_active && cap->cmdchar == ':'
! && oap->op_type != OP_COLON))
#endif
&& cap->cmdchar != 'D'
#ifdef FEAT_FOLDING
***************
*** 1797,1803 ****
prep_redo(oap->regname, 0L, NUL, cap->cmdchar, cap->nchar,
get_op_char(oap->op_type),
get_extra_op_char(oap->op_type));
! else
prep_redo(oap->regname, 0L, NUL, 'v',
get_op_char(oap->op_type),
get_extra_op_char(oap->op_type),
--- 1800,1806 ----
prep_redo(oap->regname, 0L, NUL, cap->cmdchar, cap->nchar,
get_op_char(oap->op_type),
get_extra_op_char(oap->op_type));
! else if (cap->cmdchar != ':')
prep_redo(oap->regname, 0L, NUL, 'v',
get_op_char(oap->op_type),
get_extra_op_char(oap->op_type),
*** ../vim-7.3.917/src/version.c 2013-04-24 17:34:15.000000000 +0200
--- src/version.c 2013-04-24 18:34:03.000000000 +0200
***************
*** 730,731 ****
--- 730,733 ----
{ /* Add new patch number below this line */
+ /**/
+ 918,
/**/
--
hundred-and-one symptoms of being an internet addict:
230. You spend your Friday nights typing away at your keyboard
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///

57
7.3.919 Normal file
View File

@ -0,0 +1,57 @@
To: vim_dev@googlegroups.com
Subject: Patch 7.3.919
Fcc: outbox
From: Bram Moolenaar <Bram@moolenaar.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
------------
Patch 7.3.919 (after 7.3.788)
Problem: An empty nl.po file does not work with an old msgfmt.
Solution: Put a single # in the file. (Laurent Blume)
Files: src/po/Makefile
*** ../vim-7.3.918/src/po/Makefile 2013-01-30 12:50:50.000000000 +0100
--- src/po/Makefile 2013-04-27 14:04:45.000000000 +0200
***************
*** 176,184 ****
converted: $(MOCONVERTED)
! # nl.po was added later, if it does not exist use an empty file.
nl.po:
! touch nl.po
# Norwegian/Bokmal: "nb" is an alias for "no".
# Copying the file is not efficient, but I don't know of another way to make
--- 176,185 ----
converted: $(MOCONVERTED)
! # nl.po was added later, if it does not exist use a file with just a # in it
! # (an empty file doesn't work with old msgfmt).
nl.po:
! @( echo \# > nl.po )
# Norwegian/Bokmal: "nb" is an alias for "no".
# Copying the file is not efficient, but I don't know of another way to make
*** ../vim-7.3.918/src/version.c 2013-04-24 18:34:40.000000000 +0200
--- src/version.c 2013-05-04 03:30:05.000000000 +0200
***************
*** 730,731 ****
--- 730,733 ----
{ /* Add new patch number below this line */
+ /**/
+ 919,
/**/
--
God made the integers; all else is the work of Man.
-- Kronecker
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///

51
7.3.920 Normal file
View File

@ -0,0 +1,51 @@
To: vim_dev@googlegroups.com
Subject: Patch 7.3.920
Fcc: outbox
From: Bram Moolenaar <Bram@moolenaar.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
------------
Patch 7.3.920
Problem: Compiler warning for size_t to int.
Solution: Add a type cast. (Mike Williams)
Files: src/misc1.c
*** ../vim-7.3.919/src/misc1.c 2013-04-24 17:34:15.000000000 +0200
--- src/misc1.c 2013-04-29 22:33:49.000000000 +0200
***************
*** 10139,10145 ****
# if defined(MSWIN) || defined(MSDOS)
/* Avoid the path ending in a backslash, it fails when a comma is
* appended. */
! len = STRLEN(buf);
if (buf[len - 1] == '\\')
buf[len - 1] = '/';
# endif
--- 10139,10145 ----
# if defined(MSWIN) || defined(MSDOS)
/* Avoid the path ending in a backslash, it fails when a comma is
* appended. */
! len = (int)STRLEN(buf);
if (buf[len - 1] == '\\')
buf[len - 1] = '/';
# endif
*** ../vim-7.3.919/src/version.c 2013-05-04 03:37:03.000000000 +0200
--- src/version.c 2013-05-04 03:39:44.000000000 +0200
***************
*** 730,731 ****
--- 730,733 ----
{ /* Add new patch number below this line */
+ /**/
+ 920,
/**/
--
Women are probably the main cause of free software starvation.
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///

58
7.3.921 Normal file
View File

@ -0,0 +1,58 @@
To: vim_dev@googlegroups.com
Subject: Patch 7.3.921
Fcc: outbox
From: Bram Moolenaar <Bram@moolenaar.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
------------
Patch 7.3.921 (after 7.3.697)
Problem: Trying to create a fontset handle when 'guifontset' is not set.
Solution: Add curly braces around the code block. (Max Kirillov)
Files: src/syntax.c
*** ../vim-7.3.920/src/syntax.c 2013-01-23 15:53:08.000000000 +0100
--- src/syntax.c 2013-05-02 03:51:38.000000000 +0200
***************
*** 8082,8087 ****
--- 8082,8088 ----
|| do_tooltip
# endif
)
+ {
if (free_font)
gui_mch_free_fontset(HL_TABLE()[idx].sg_fontset);
HL_TABLE()[idx].sg_fontset = fontset_name2handle(arg, 0
***************
*** 8092,8097 ****
--- 8093,8099 ----
|| do_tooltip
# endif
);
+ }
if (HL_TABLE()[idx].sg_fontset != NOFONTSET)
{
/* If it worked and it's the Normal group, use it as the normal
*** ../vim-7.3.920/src/version.c 2013-05-04 03:40:22.000000000 +0200
--- src/version.c 2013-05-04 03:41:40.000000000 +0200
***************
*** 730,731 ****
--- 730,733 ----
{ /* Add new patch number below this line */
+ /**/
+ 921,
/**/
--
Edison's greatest achievement came in 1879, when he invented the
electric company. Edison's design was a brilliant adaptation of the
simple electrical circuit: the electric company sends electricity
through a wire to a customer, then immediately gets the electricity
back through another wire
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///

83
7.3.922 Normal file
View File

@ -0,0 +1,83 @@
To: vim_dev@googlegroups.com
Subject: Patch 7.3.922
Fcc: outbox
From: Bram Moolenaar <Bram@moolenaar.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
------------
Patch 7.3.922
Problem: No test for what 7.3.918 fixes.
Solution: Add a test. (David Bürgin)
Files: src/testdir/test94.in, src/testdir/test94.ok
*** ../vim-7.3.921/src/testdir/test94.in 2013-04-24 15:47:11.000000000 +0200
--- src/testdir/test94.in 2013-05-04 04:03:02.000000000 +0200
***************
*** 30,38 ****
: call setpos("'>", [0, line2, col2, 0])
: normal! gv
:endfunction
- :function MoveToEndCount(count)
- : normal! v:count . e
- :endfunction
:
:" Visual modes followed by operator
/^apple
--- 30,35 ----
***************
*** 59,65 ****
/^Juniper
g?\WfD.:
/^Lemon
! yiWPlciWNew:
:
:" Patch 7.3.879: Properly abort Operator-pending mode for "dv:<Esc>" etc.
/^zzzz
--- 56,62 ----
/^Juniper
g?\WfD.:
/^Lemon
! yiWPlciWNewfr.:
:
:" Patch 7.3.879: Properly abort Operator-pending mode for "dv:<Esc>" etc.
/^zzzz
*** ../vim-7.3.921/src/testdir/test94.ok 2013-04-12 13:44:49.000000000 +0200
--- src/testdir/test94.ok 2013-05-04 04:06:46.000000000 +0200
***************
*** 13,19 ****
----Z
WhavcreQhevnaZ
! LemonNewNectarineZ
zzz
ok
--- 13,19 ----
----Z
WhavcreQhevnaZ
! LemonNewNewZ
zzz
ok
*** ../vim-7.3.921/src/version.c 2013-05-04 03:42:30.000000000 +0200
--- src/version.c 2013-05-04 04:07:08.000000000 +0200
***************
*** 730,731 ****
--- 730,733 ----
{ /* Add new patch number below this line */
+ /**/
+ 922,
/**/
--
This sentence is not sure that it exists, but if it does, it will
certainly consider the possibility that other sentences exist.
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///

82
7.3.923 Normal file
View File

@ -0,0 +1,82 @@
To: vim_dev@googlegroups.com
Subject: Patch 7.3.923
Fcc: outbox
From: Bram Moolenaar <Bram@moolenaar.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
------------
Patch 7.3.923
Problem: Check for X11 header files fails on Solaris.
Solution: Only use -Werror for gcc. (Laurent Blume)
Files: src/configure.in, src/auto/configure
*** ../vim-7.3.922/src/configure.in 2013-04-15 14:44:53.000000000 +0200
--- src/configure.in 2013-05-04 04:34:46.000000000 +0200
***************
*** 1751,1757 ****
dnl Check that the X11 header files don't use implicit declarations
AC_MSG_CHECKING(if X11 header files implicitly declare return values)
cflags_save=$CFLAGS
! CFLAGS="$CFLAGS $X_CFLAGS -Werror"
AC_TRY_COMPILE([#include <X11/Xlib.h>], ,
AC_MSG_RESULT(no),
CFLAGS="$CFLAGS -Wno-implicit-int"
--- 1751,1762 ----
dnl Check that the X11 header files don't use implicit declarations
AC_MSG_CHECKING(if X11 header files implicitly declare return values)
cflags_save=$CFLAGS
! dnl -Werror is GCC only, others like Solaris Studio might not like it
! if test "$GCC" = yes; then
! CFLAGS="$CFLAGS $X_CFLAGS -Werror"
! else
! CFLAGS="$CFLAGS $X_CFLAGS"
! fi
AC_TRY_COMPILE([#include <X11/Xlib.h>], ,
AC_MSG_RESULT(no),
CFLAGS="$CFLAGS -Wno-implicit-int"
*** ../vim-7.3.922/src/auto/configure 2013-04-15 14:44:53.000000000 +0200
--- src/auto/configure 2013-05-04 04:34:50.000000000 +0200
***************
*** 7656,7662 ****
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if X11 header files implicitly declare return values" >&5
$as_echo_n "checking if X11 header files implicitly declare return values... " >&6; }
cflags_save=$CFLAGS
! CFLAGS="$CFLAGS $X_CFLAGS -Werror"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <X11/Xlib.h>
--- 7656,7666 ----
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if X11 header files implicitly declare return values" >&5
$as_echo_n "checking if X11 header files implicitly declare return values... " >&6; }
cflags_save=$CFLAGS
! if test "$GCC" = yes; then
! CFLAGS="$CFLAGS $X_CFLAGS -Werror"
! else
! CFLAGS="$CFLAGS $X_CFLAGS"
! fi
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <X11/Xlib.h>
*** ../vim-7.3.922/src/version.c 2013-05-04 04:11:01.000000000 +0200
--- src/version.c 2013-05-04 04:39:13.000000000 +0200
***************
*** 730,731 ****
--- 730,733 ----
{ /* Add new patch number below this line */
+ /**/
+ 923,
/**/
--
GALAHAD: Camelot ...
LAUNCELOT: Camelot ...
GAWAIN: It's only a model.
"Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///

1628
7.3.924 Normal file

File diff suppressed because it is too large Load Diff

2899
7.3.925 Normal file

File diff suppressed because it is too large Load Diff

905
7.3.926 Normal file
View File

@ -0,0 +1,905 @@
To: vim_dev@googlegroups.com
Subject: Patch 7.3.926
Fcc: outbox
From: Bram Moolenaar <Bram@moolenaar.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
------------
Patch 7.3.926
Problem: Autocommands are triggered by setwinvar() et al. Missing BufEnter
on :tabclose. Duplicate WinEnter on :tabclose. Wrong order of
events for :tablose and :tabnew.
Solution: Fix these autocommand events. (Zyx)
Files: runtime/doc/eval.txt, src/buffer.c, src/eval.c, src/ex_cmds2.c,
src/fileio.c, src/proto/window.pro, src/testdir/test62.in,
src/testdir/test62.ok, src/window.c
*** ../vim-7.3.925/runtime/doc/eval.txt 2013-02-20 21:11:14.000000000 +0100
--- runtime/doc/eval.txt 2013-05-06 04:33:13.000000000 +0200
***************
*** 5294,5301 ****
|t:var|
Note that the variable name without "t:" must be used.
Tabs are numbered starting with one.
- Vim briefly goes to the tab page {tabnr}, this may trigger
- TabLeave and TabEnter autocommands.
This function is not available in the |sandbox|.
settabwinvar({tabnr}, {winnr}, {varname}, {val}) *settabwinvar()*
--- 5320,5325 ----
***************
*** 5308,5315 ****
doesn't work for a global or local buffer variable.
For a local buffer option the global value is unchanged.
Note that the variable name without "w:" must be used.
- Vim briefly goes to the tab page {tabnr}, this may trigger
- TabLeave and TabEnter autocommands.
Examples: >
:call settabwinvar(1, 1, "&list", 0)
:call settabwinvar(3, 2, "myvar", "foobar")
--- 5332,5337 ----
*** ../vim-7.3.925/src/buffer.c 2013-05-06 04:21:35.000000000 +0200
--- src/buffer.c 2013-05-06 04:33:13.000000000 +0200
***************
*** 4551,4557 ****
* When the ":tab" modifier was used do this for all tab pages.
*/
if (had_tab > 0)
! goto_tabpage_tp(first_tabpage, TRUE);
for (;;)
{
tpnext = curtab->tp_next;
--- 4551,4557 ----
* When the ":tab" modifier was used do this for all tab pages.
*/
if (had_tab > 0)
! goto_tabpage_tp(first_tabpage, TRUE, TRUE);
for (;;)
{
tpnext = curtab->tp_next;
***************
*** 4663,4669 ****
if (!valid_tabpage(tpnext))
tpnext = first_tabpage; /* start all over...*/
# endif
! goto_tabpage_tp(tpnext, TRUE);
}
/*
--- 4663,4669 ----
if (!valid_tabpage(tpnext))
tpnext = first_tabpage; /* start all over...*/
# endif
! goto_tabpage_tp(tpnext, TRUE, TRUE);
}
/*
***************
*** 4767,4779 ****
if (last_curtab != new_curtab)
{
if (valid_tabpage(last_curtab))
! goto_tabpage_tp(last_curtab, TRUE);
if (win_valid(last_curwin))
win_enter(last_curwin, FALSE);
}
/* to window with first arg */
if (valid_tabpage(new_curtab))
! goto_tabpage_tp(new_curtab, TRUE);
if (win_valid(new_curwin))
win_enter(new_curwin, FALSE);
--- 4767,4779 ----
if (last_curtab != new_curtab)
{
if (valid_tabpage(last_curtab))
! goto_tabpage_tp(last_curtab, TRUE, TRUE);
if (win_valid(last_curwin))
win_enter(last_curwin, FALSE);
}
/* to window with first arg */
if (valid_tabpage(new_curtab))
! goto_tabpage_tp(new_curtab, TRUE, TRUE);
if (win_valid(new_curwin))
win_enter(new_curwin, FALSE);
***************
*** 4825,4831 ****
*/
#ifdef FEAT_WINDOWS
if (had_tab > 0)
! goto_tabpage_tp(first_tabpage, TRUE);
for (;;)
{
#endif
--- 4825,4831 ----
*/
#ifdef FEAT_WINDOWS
if (had_tab > 0)
! goto_tabpage_tp(first_tabpage, TRUE, TRUE);
for (;;)
{
#endif
***************
*** 4865,4871 ****
/* Without the ":tab" modifier only do the current tab page. */
if (had_tab == 0 || tpnext == NULL)
break;
! goto_tabpage_tp(tpnext, TRUE);
}
#endif
--- 4865,4871 ----
/* Without the ":tab" modifier only do the current tab page. */
if (had_tab == 0 || tpnext == NULL)
break;
! goto_tabpage_tp(tpnext, TRUE, TRUE);
}
#endif
*** ../vim-7.3.925/src/eval.c 2013-05-06 04:21:35.000000000 +0200
--- src/eval.c 2013-05-06 04:33:13.000000000 +0200
***************
*** 16604,16610 ****
if (tp != NULL && varname != NULL && varp != NULL)
{
save_curtab = curtab;
! goto_tabpage_tp(tp, TRUE);
tabvarname = alloc((unsigned)STRLEN(varname) + 3);
if (tabvarname != NULL)
--- 16604,16610 ----
if (tp != NULL && varname != NULL && varp != NULL)
{
save_curtab = curtab;
! goto_tabpage_tp(tp, FALSE, FALSE);
tabvarname = alloc((unsigned)STRLEN(varname) + 3);
if (tabvarname != NULL)
***************
*** 16617,16623 ****
/* Restore current tabpage */
if (valid_tabpage(save_curtab))
! goto_tabpage_tp(save_curtab, TRUE);
}
}
--- 16617,16623 ----
/* Restore current tabpage */
if (valid_tabpage(save_curtab))
! goto_tabpage_tp(save_curtab, FALSE, FALSE);
}
}
***************
*** 16654,16660 ****
/* set curwin to be our win, temporarily */
*save_curwin = curwin;
*save_curtab = curtab;
! goto_tabpage_tp(tp, TRUE);
if (!win_valid(win))
return FAIL;
curwin = win;
--- 16654,16660 ----
/* set curwin to be our win, temporarily */
*save_curwin = curwin;
*save_curtab = curtab;
! goto_tabpage_tp(tp, FALSE, FALSE);
if (!win_valid(win))
return FAIL;
curwin = win;
***************
*** 16672,16678 ****
/* Restore current tabpage and window, if still valid (autocommands can
* make them invalid). */
if (valid_tabpage(save_curtab))
! goto_tabpage_tp(save_curtab, TRUE);
if (win_valid(save_curwin))
{
curwin = save_curwin;
--- 16672,16678 ----
/* Restore current tabpage and window, if still valid (autocommands can
* make them invalid). */
if (valid_tabpage(save_curtab))
! goto_tabpage_tp(save_curtab, FALSE, FALSE);
if (win_valid(save_curwin))
{
curwin = save_curwin;
*** ../vim-7.3.925/src/ex_cmds2.c 2013-05-06 04:21:35.000000000 +0200
--- src/ex_cmds2.c 2013-05-06 04:33:13.000000000 +0200
***************
*** 2482,2488 ****
/* go to window "tp" */
if (!valid_tabpage(tp))
break;
! goto_tabpage_tp(tp, TRUE);
tp = tp->tp_next;
}
#endif
--- 2482,2488 ----
/* go to window "tp" */
if (!valid_tabpage(tp))
break;
! goto_tabpage_tp(tp, TRUE, TRUE);
tp = tp->tp_next;
}
#endif
*** ../vim-7.3.925/src/fileio.c 2013-05-06 04:21:35.000000000 +0200
--- src/fileio.c 2013-05-06 04:33:13.000000000 +0200
***************
*** 8934,8940 ****
if (wp == aucmd_win)
{
if (tp != curtab)
! goto_tabpage_tp(tp, TRUE);
win_goto(aucmd_win);
goto win_found;
}
--- 8934,8940 ----
if (wp == aucmd_win)
{
if (tp != curtab)
! goto_tabpage_tp(tp, TRUE, TRUE);
win_goto(aucmd_win);
goto win_found;
}
*** ../vim-7.3.925/src/proto/window.pro 2012-07-19 18:05:40.000000000 +0200
--- src/proto/window.pro 2013-05-06 04:33:13.000000000 +0200
***************
*** 27,33 ****
tabpage_T *find_tabpage __ARGS((int n));
int tabpage_index __ARGS((tabpage_T *ftp));
void goto_tabpage __ARGS((int n));
! void goto_tabpage_tp __ARGS((tabpage_T *tp, int trigger_autocmds));
void goto_tabpage_win __ARGS((tabpage_T *tp, win_T *wp));
void tabpage_move __ARGS((int nr));
void win_goto __ARGS((win_T *wp));
--- 27,33 ----
tabpage_T *find_tabpage __ARGS((int n));
int tabpage_index __ARGS((tabpage_T *ftp));
void goto_tabpage __ARGS((int n));
! void goto_tabpage_tp __ARGS((tabpage_T *tp, int trigger_enter_autocmds, int trigger_leave_autocmds));
void goto_tabpage_win __ARGS((tabpage_T *tp, win_T *wp));
void tabpage_move __ARGS((int nr));
void win_goto __ARGS((win_T *wp));
*** ../vim-7.3.925/src/testdir/test62.in 2012-07-06 18:27:34.000000000 +0200
--- src/testdir/test62.in 2013-05-06 04:35:08.000000000 +0200
***************
*** 120,125 ****
--- 120,187 ----
:endtry
i=a 
:"
+ :" Test autocommands
+ :tabonly!
+ :let g:r=[]
+ :command -nargs=1 -bar C :call add(g:r, '=== ' . <q-args> . ' ===')|<args>
+ :function Test()
+ let hasau=has('autocmd')
+ if hasau
+ autocmd TabEnter * :call add(g:r, 'TabEnter')
+ autocmd WinEnter * :call add(g:r, 'WinEnter')
+ autocmd BufEnter * :call add(g:r, 'BufEnter')
+ autocmd TabLeave * :call add(g:r, 'TabLeave')
+ autocmd WinLeave * :call add(g:r, 'WinLeave')
+ autocmd BufLeave * :call add(g:r, 'BufLeave')
+ endif
+ let t:a='a'
+ C tab split
+ if !hasau
+ let g:r+=['WinLeave', 'TabLeave', 'WinEnter', 'TabEnter']
+ endif
+ let t:a='b'
+ C tabnew
+ if !hasau
+ let g:r+=['WinLeave', 'TabLeave', 'WinEnter', 'TabEnter', 'BufLeave', 'BufEnter']
+ endif
+ let t:a='c'
+ call add(g:r, join(map(range(1, tabpagenr('$')), 'gettabvar(v:val, "a")')))
+ C call map(range(1, tabpagenr('$')), 'settabvar(v:val, "a", v:val*2)')
+ call add(g:r, join(map(range(1, tabpagenr('$')), 'gettabvar(v:val, "a")')))
+ let w:a='a'
+ C vsplit
+ if !hasau
+ let g:r+=['WinLeave', 'WinEnter']
+ endif
+ let w:a='a'
+ let tabn=tabpagenr()
+ let winr=range(1, winnr('$'))
+ C tabnext 1
+ if !hasau
+ let g:r+=['BufLeave', 'WinLeave', 'TabLeave', 'WinEnter', 'TabEnter', 'BufEnter']
+ endif
+ call add(g:r, join(map(copy(winr), 'gettabwinvar('.tabn.', v:val, "a")')))
+ C call map(copy(winr), 'settabwinvar('.tabn.', v:val, "a", v:val*2)')
+ call add(g:r, join(map(copy(winr), 'gettabwinvar('.tabn.', v:val, "a")')))
+ if hasau
+ augroup TabDestructive
+ autocmd TabEnter * :C tabnext 2 | C tabclose 3
+ augroup END
+ C tabnext 3
+ let g:r+=[tabpagenr().'/'.tabpagenr('$')]
+ autocmd! TabDestructive TabEnter
+ C tabnew
+ C tabnext 1
+ autocmd TabDestructive TabEnter * nested :C tabnext 2 | C tabclose 3
+ C tabnext 3
+ let g:r+=[tabpagenr().'/'.tabpagenr('$')]
+ else
+ let g:r+=["=== tabnext 3 ===","BufLeave","WinLeave","TabLeave","WinEnter","TabEnter","=== tabnext 2 ===","=== tabclose 3 ===","2/2","=== tabnew ===","WinLeave","TabLeave","WinEnter","TabEnter","BufLeave","BufEnter","=== tabnext 1 ===","BufLeave","WinLeave","TabLeave","WinEnter","TabEnter","BufEnter","=== tabnext 3 ===","BufLeave","WinLeave","TabLeave","WinEnter","TabEnter","=== tabnext 2 ===","BufLeave","WinLeave","TabLeave","WinEnter","TabEnter","=== tabnext 2 ===","=== tabclose 3 ===","BufEnter","=== tabclose 3 ===","2/2",]
+ endif
+ endfunction
+ :call Test()
+ :$ put =g:r
+ :"
:"
:/^Results/,$w! test.out
:qa!
*** ../vim-7.3.925/src/testdir/test62.ok 2012-07-06 18:27:34.000000000 +0200
--- src/testdir/test62.ok 2013-05-06 04:35:08.000000000 +0200
***************
*** 18,20 ****
--- 18,88 ----
4
6
E474 caught.
+ === tab split ===
+ WinLeave
+ TabLeave
+ WinEnter
+ TabEnter
+ === tabnew ===
+ WinLeave
+ TabLeave
+ WinEnter
+ TabEnter
+ BufLeave
+ BufEnter
+ a b c
+ === call map(range(1, tabpagenr('$')), 'settabvar(v:val, ===
+ a b c
+ === vsplit ===
+ WinLeave
+ WinEnter
+ === tabnext 1 ===
+ BufLeave
+ WinLeave
+ TabLeave
+ WinEnter
+ TabEnter
+ BufEnter
+ a a
+ === call map(copy(winr), 'settabwinvar('.tabn.', v:val, ===
+ a a
+ === tabnext 3 ===
+ BufLeave
+ WinLeave
+ TabLeave
+ WinEnter
+ TabEnter
+ === tabnext 2 ===
+ === tabclose 3 ===
+ 2/2
+ === tabnew ===
+ WinLeave
+ TabLeave
+ WinEnter
+ TabEnter
+ BufLeave
+ BufEnter
+ === tabnext 1 ===
+ BufLeave
+ WinLeave
+ TabLeave
+ WinEnter
+ TabEnter
+ BufEnter
+ === tabnext 3 ===
+ BufLeave
+ WinLeave
+ TabLeave
+ WinEnter
+ TabEnter
+ === tabnext 2 ===
+ BufLeave
+ WinLeave
+ TabLeave
+ WinEnter
+ TabEnter
+ === tabnext 2 ===
+ === tabclose 3 ===
+ BufEnter
+ === tabclose 3 ===
+ 2/2
*** ../vim-7.3.925/src/window.c 2013-05-06 04:21:35.000000000 +0200
--- src/window.c 2013-05-06 04:47:06.000000000 +0200
***************
*** 44,54 ****
static void new_frame __ARGS((win_T *wp));
#if defined(FEAT_WINDOWS) || defined(PROTO)
static tabpage_T *alloc_tabpage __ARGS((void));
! static int leave_tabpage __ARGS((buf_T *new_curbuf));
! static void enter_tabpage __ARGS((tabpage_T *tp, buf_T *old_curbuf, int trigger_autocmds));
static void frame_fix_height __ARGS((win_T *wp));
static int frame_minheight __ARGS((frame_T *topfrp, win_T *next_curwin));
! static void win_enter_ext __ARGS((win_T *wp, int undo_sync, int no_curwin));
static void win_free __ARGS((win_T *wp, tabpage_T *tp));
static void frame_append __ARGS((frame_T *after, frame_T *frp));
static void frame_insert __ARGS((frame_T *before, frame_T *frp));
--- 44,54 ----
static void new_frame __ARGS((win_T *wp));
#if defined(FEAT_WINDOWS) || defined(PROTO)
static tabpage_T *alloc_tabpage __ARGS((void));
! static int leave_tabpage __ARGS((buf_T *new_curbuf, int trigger_leave_autocmds));
! static void enter_tabpage __ARGS((tabpage_T *tp, buf_T *old_curbuf, int trigger_enter_autocmds, int trigger_leave_autocmds));
static void frame_fix_height __ARGS((win_T *wp));
static int frame_minheight __ARGS((frame_T *topfrp, win_T *next_curwin));
! static void win_enter_ext __ARGS((win_T *wp, int undo_sync, int no_curwin, int trigger_enter_autocmds, int trigger_leave_autocmds));
static void win_free __ARGS((win_T *wp, tabpage_T *tp));
static void frame_append __ARGS((frame_T *after, frame_T *frp));
static void frame_insert __ARGS((frame_T *before, frame_T *frp));
***************
*** 353,363 ****
&& valid_tabpage(oldtab))
{
newtab = curtab;
! goto_tabpage_tp(oldtab, TRUE);
if (curwin == wp)
win_close(curwin, FALSE);
if (valid_tabpage(newtab))
! goto_tabpage_tp(newtab, TRUE);
}
}
break;
--- 353,363 ----
&& valid_tabpage(oldtab))
{
newtab = curtab;
! goto_tabpage_tp(oldtab, TRUE, TRUE);
if (curwin == wp)
win_close(curwin, FALSE);
if (valid_tabpage(newtab))
! goto_tabpage_tp(newtab, TRUE, TRUE);
}
}
break;
***************
*** 2124,2129 ****
--- 2124,2131 ----
{
if (firstwin == lastwin)
{
+ buf_T *old_curbuf = curbuf;
+
/*
* Closing the last window in a tab page. First go to another tab
* page and then close the window and the tab page. This avoids that
***************
*** 2132,2138 ****
* Don't trigger autocommands yet, they may use wrong values, so do
* that below.
*/
! goto_tabpage_tp(alt_tabpage(), FALSE);
redraw_tabline = TRUE;
/* Safety check: Autocommands may have closed the window when jumping
--- 2134,2140 ----
* Don't trigger autocommands yet, they may use wrong values, so do
* that below.
*/
! goto_tabpage_tp(alt_tabpage(), FALSE, TRUE);
redraw_tabline = TRUE;
/* Safety check: Autocommands may have closed the window when jumping
***************
*** 2148,2155 ****
/* Since goto_tabpage_tp above did not trigger *Enter autocommands, do
* that now. */
#ifdef FEAT_AUTOCMD
- apply_autocmds(EVENT_TABENTER, NULL, NULL, FALSE, curbuf);
apply_autocmds(EVENT_WINENTER, NULL, NULL, FALSE, curbuf);
#endif
return TRUE;
}
--- 2150,2159 ----
/* Since goto_tabpage_tp above did not trigger *Enter autocommands, do
* that now. */
#ifdef FEAT_AUTOCMD
apply_autocmds(EVENT_WINENTER, NULL, NULL, FALSE, curbuf);
+ apply_autocmds(EVENT_TABENTER, NULL, NULL, FALSE, curbuf);
+ if (old_curbuf != curbuf)
+ apply_autocmds(EVENT_BUFENTER, NULL, NULL, FALSE, curbuf);
#endif
return TRUE;
}
***************
*** 2341,2347 ****
win_comp_pos();
if (close_curwin)
{
! win_enter_ext(wp, FALSE, TRUE);
#ifdef FEAT_AUTOCMD
if (other_buffer)
/* careful: after this wp and win may be invalid! */
--- 2345,2351 ----
win_comp_pos();
if (close_curwin)
{
! win_enter_ext(wp, FALSE, TRUE, TRUE, TRUE);
#ifdef FEAT_AUTOCMD
if (other_buffer)
/* careful: after this wp and win may be invalid! */
***************
*** 3529,3535 ****
return FAIL;
/* Remember the current windows in this Tab page. */
! if (leave_tabpage(curbuf) == FAIL)
{
vim_free(newtp);
return FAIL;
--- 3533,3539 ----
return FAIL;
/* Remember the current windows in this Tab page. */
! if (leave_tabpage(curbuf, TRUE) == FAIL)
{
vim_free(newtp);
return FAIL;
***************
*** 3574,3587 ****
redraw_all_later(CLEAR);
#ifdef FEAT_AUTOCMD
- apply_autocmds(EVENT_TABENTER, NULL, NULL, FALSE, curbuf);
apply_autocmds(EVENT_WINENTER, NULL, NULL, FALSE, curbuf);
#endif
return OK;
}
/* Failed, get back the previous Tab page */
! enter_tabpage(curtab, curbuf, TRUE);
return FAIL;
}
--- 3578,3591 ----
redraw_all_later(CLEAR);
#ifdef FEAT_AUTOCMD
apply_autocmds(EVENT_WINENTER, NULL, NULL, FALSE, curbuf);
+ apply_autocmds(EVENT_TABENTER, NULL, NULL, FALSE, curbuf);
#endif
return OK;
}
/* Failed, get back the previous Tab page */
! enter_tabpage(curtab, curbuf, TRUE, TRUE);
return FAIL;
}
***************
*** 3692,3700 ****
* Careful: When OK is returned need to get a new tab page very very soon!
*/
static int
! leave_tabpage(new_curbuf)
buf_T *new_curbuf UNUSED; /* what is going to be the new curbuf,
NULL if unknown */
{
tabpage_T *tp = curtab;
--- 3696,3705 ----
* Careful: When OK is returned need to get a new tab page very very soon!
*/
static int
! leave_tabpage(new_curbuf, trigger_leave_autocmds)
buf_T *new_curbuf UNUSED; /* what is going to be the new curbuf,
NULL if unknown */
+ int trigger_leave_autocmds UNUSED;
{
tabpage_T *tp = curtab;
***************
*** 3702,3719 ****
reset_VIsual_and_resel(); /* stop Visual mode */
#endif
#ifdef FEAT_AUTOCMD
! if (new_curbuf != curbuf)
{
! apply_autocmds(EVENT_BUFLEAVE, NULL, NULL, FALSE, curbuf);
if (curtab != tp)
return FAIL;
}
- apply_autocmds(EVENT_WINLEAVE, NULL, NULL, FALSE, curbuf);
- if (curtab != tp)
- return FAIL;
- apply_autocmds(EVENT_TABLEAVE, NULL, NULL, FALSE, curbuf);
- if (curtab != tp)
- return FAIL;
#endif
#if defined(FEAT_GUI)
/* Remove the scrollbars. They may be added back later. */
--- 3707,3727 ----
reset_VIsual_and_resel(); /* stop Visual mode */
#endif
#ifdef FEAT_AUTOCMD
! if (trigger_leave_autocmds)
{
! if (new_curbuf != curbuf)
! {
! apply_autocmds(EVENT_BUFLEAVE, NULL, NULL, FALSE, curbuf);
! if (curtab != tp)
! return FAIL;
! }
! apply_autocmds(EVENT_WINLEAVE, NULL, NULL, FALSE, curbuf);
! if (curtab != tp)
! return FAIL;
! apply_autocmds(EVENT_TABLEAVE, NULL, NULL, FALSE, curbuf);
if (curtab != tp)
return FAIL;
}
#endif
#if defined(FEAT_GUI)
/* Remove the scrollbars. They may be added back later. */
***************
*** 3734,3746 ****
/*
* Start using tab page "tp".
* Only to be used after leave_tabpage() or freeing the current tab page.
! * Only trigger *Enter autocommands when trigger_autocmds is TRUE.
*/
static void
! enter_tabpage(tp, old_curbuf, trigger_autocmds)
tabpage_T *tp;
buf_T *old_curbuf UNUSED;
! int trigger_autocmds UNUSED;
{
int old_off = tp->tp_firstwin->w_winrow;
win_T *next_prevwin = tp->tp_prevwin;
--- 3742,3756 ----
/*
* Start using tab page "tp".
* Only to be used after leave_tabpage() or freeing the current tab page.
! * Only trigger *Enter autocommands when trigger_enter_autocmds is TRUE.
! * Only trigger *Leave autocommands when trigger_leave_autocmds is TRUE.
*/
static void
! enter_tabpage(tp, old_curbuf, trigger_enter_autocmds, trigger_leave_autocmds)
tabpage_T *tp;
buf_T *old_curbuf UNUSED;
! int trigger_enter_autocmds UNUSED;
! int trigger_leave_autocmds UNUSED;
{
int old_off = tp->tp_firstwin->w_winrow;
win_T *next_prevwin = tp->tp_prevwin;
***************
*** 3753,3759 ****
/* We would like doing the TabEnter event first, but we don't have a
* valid current window yet, which may break some commands.
* This triggers autocommands, thus may make "tp" invalid. */
! win_enter_ext(tp->tp_curwin, FALSE, TRUE);
prevwin = next_prevwin;
last_status(FALSE); /* status line may appear or disappear */
--- 3763,3769 ----
/* We would like doing the TabEnter event first, but we don't have a
* valid current window yet, which may break some commands.
* This triggers autocommands, thus may make "tp" invalid. */
! win_enter_ext(tp->tp_curwin, FALSE, TRUE, trigger_enter_autocmds, trigger_leave_autocmds);
prevwin = next_prevwin;
last_status(FALSE); /* status line may appear or disappear */
***************
*** 3788,3794 ****
#ifdef FEAT_AUTOCMD
/* Apply autocommands after updating the display, when 'rows' and
* 'columns' have been set correctly. */
! if (trigger_autocmds)
{
apply_autocmds(EVENT_TABENTER, NULL, NULL, FALSE, curbuf);
if (old_curbuf != curbuf)
--- 3798,3804 ----
#ifdef FEAT_AUTOCMD
/* Apply autocommands after updating the display, when 'rows' and
* 'columns' have been set correctly. */
! if (trigger_enter_autocmds)
{
apply_autocmds(EVENT_TABENTER, NULL, NULL, FALSE, curbuf);
if (old_curbuf != curbuf)
***************
*** 3869,3875 ****
}
}
! goto_tabpage_tp(tp, TRUE);
#ifdef FEAT_GUI_TABLINE
if (gui_use_tabline())
--- 3879,3885 ----
}
}
! goto_tabpage_tp(tp, TRUE, TRUE);
#ifdef FEAT_GUI_TABLINE
if (gui_use_tabline())
***************
*** 3879,3901 ****
/*
* Go to tabpage "tp".
! * Only trigger *Enter autocommands when trigger_autocmds is TRUE.
* Note: doesn't update the GUI tab.
*/
void
! goto_tabpage_tp(tp, trigger_autocmds)
tabpage_T *tp;
! int trigger_autocmds;
{
/* Don't repeat a message in another tab page. */
set_keep_msg(NULL, 0);
! if (tp != curtab && leave_tabpage(tp->tp_curwin->w_buffer) == OK)
{
if (valid_tabpage(tp))
! enter_tabpage(tp, curbuf, trigger_autocmds);
else
! enter_tabpage(curtab, curbuf, trigger_autocmds);
}
}
--- 3889,3916 ----
/*
* Go to tabpage "tp".
! * Only trigger *Enter autocommands when trigger_enter_autocmds is TRUE.
! * Only trigger *Leave autocommands when trigger_leave_autocmds is TRUE.
* Note: doesn't update the GUI tab.
*/
void
! goto_tabpage_tp(tp, trigger_enter_autocmds, trigger_leave_autocmds)
tabpage_T *tp;
! int trigger_enter_autocmds;
! int trigger_leave_autocmds;
{
/* Don't repeat a message in another tab page. */
set_keep_msg(NULL, 0);
! if (tp != curtab && leave_tabpage(tp->tp_curwin->w_buffer,
! trigger_leave_autocmds) == OK)
{
if (valid_tabpage(tp))
! enter_tabpage(tp, curbuf, trigger_enter_autocmds,
! trigger_leave_autocmds);
else
! enter_tabpage(curtab, curbuf, trigger_enter_autocmds,
! trigger_leave_autocmds);
}
}
***************
*** 3908,3914 ****
tabpage_T *tp;
win_T *wp;
{
! goto_tabpage_tp(tp, TRUE);
if (curtab == tp && win_valid(wp))
{
win_enter(wp, TRUE);
--- 3923,3929 ----
tabpage_T *tp;
win_T *wp;
{
! goto_tabpage_tp(tp, TRUE, TRUE);
if (curtab == tp && win_valid(wp))
{
win_enter(wp, TRUE);
***************
*** 4168,4174 ****
win_T *wp;
int undo_sync;
{
! win_enter_ext(wp, undo_sync, FALSE);
}
/*
--- 4183,4189 ----
win_T *wp;
int undo_sync;
{
! win_enter_ext(wp, undo_sync, FALSE, TRUE, TRUE);
}
/*
***************
*** 4177,4186 ****
* been closed and isn't valid.
*/
static void
! win_enter_ext(wp, undo_sync, curwin_invalid)
win_T *wp;
int undo_sync;
int curwin_invalid;
{
#ifdef FEAT_AUTOCMD
int other_buffer = FALSE;
--- 4192,4203 ----
* been closed and isn't valid.
*/
static void
! win_enter_ext(wp, undo_sync, curwin_invalid, trigger_enter_autocmds, trigger_leave_autocmds)
win_T *wp;
int undo_sync;
int curwin_invalid;
+ int trigger_enter_autocmds UNUSED;
+ int trigger_leave_autocmds UNUSED;
{
#ifdef FEAT_AUTOCMD
int other_buffer = FALSE;
***************
*** 4190,4196 ****
return;
#ifdef FEAT_AUTOCMD
! if (!curwin_invalid)
{
/*
* Be careful: If autocommands delete the window, return now.
--- 4207,4213 ----
return;
#ifdef FEAT_AUTOCMD
! if (!curwin_invalid && trigger_leave_autocmds)
{
/*
* Be careful: If autocommands delete the window, return now.
***************
*** 4259,4267 ****
}
#ifdef FEAT_AUTOCMD
! apply_autocmds(EVENT_WINENTER, NULL, NULL, FALSE, curbuf);
! if (other_buffer)
! apply_autocmds(EVENT_BUFENTER, NULL, NULL, FALSE, curbuf);
#endif
#ifdef FEAT_TITLE
--- 4276,4287 ----
}
#ifdef FEAT_AUTOCMD
! if (trigger_enter_autocmds)
! {
! apply_autocmds(EVENT_WINENTER, NULL, NULL, FALSE, curbuf);
! if (other_buffer)
! apply_autocmds(EVENT_BUFENTER, NULL, NULL, FALSE, curbuf);
! }
#endif
#ifdef FEAT_TITLE
*** ../vim-7.3.925/src/version.c 2013-05-06 04:21:35.000000000 +0200
--- src/version.c 2013-05-06 04:40:52.000000000 +0200
***************
*** 730,731 ****
--- 730,733 ----
{ /* Add new patch number below this line */
+ /**/
+ 926,
/**/
--
Bravely bold Sir Robin, rode forth from Camelot,
He was not afraid to die, Oh Brave Sir Robin,
He was not at all afraid to be killed in nasty ways
Brave, brave, brave, brave Sir Robin.
"Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///

99
7.3.927 Normal file
View File

@ -0,0 +1,99 @@
To: vim_dev@googlegroups.com
Subject: Patch 7.3.927
Fcc: outbox
From: Bram Moolenaar <Bram@moolenaar.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
------------
Patch 7.3.927
Problem: Missing combining characters when putting text in a register.
Solution: Include combining characters. (Christian Brabandt)
Files: src/getchar.c, src/testdir/test44.in, src/testdir/test44.ok
*** ../vim-7.3.926/src/getchar.c 2013-04-15 15:47:07.000000000 +0200
--- src/getchar.c 2013-05-06 05:06:13.000000000 +0200
***************
*** 4616,4624 ****
--- 4616,4636 ----
}
else
{
+ #ifdef FEAT_MBYTE
+ int len = mb_char2len(PTR2CHAR(s));
+ int len2 = mb_ptr2len(s);
+ #endif
/* Add character, possibly multi-byte to destination, escaping
* CSI and K_SPECIAL. */
d = add_char2buf(PTR2CHAR(s), d);
+ #ifdef FEAT_MBYTE
+ while (len < len2)
+ {
+ /* add following combining char */
+ d = add_char2buf(PTR2CHAR(s + len), d);
+ len += mb_char2len(PTR2CHAR(s + len));
+ }
+ #endif
mb_ptr_adv(s);
}
}
*** ../vim-7.3.926/src/testdir/test44.in 2013-01-23 16:43:07.000000000 +0100
--- src/testdir/test44.in 2013-05-06 05:01:39.000000000 +0200
***************
*** 32,38 ****
x:" Test backwards search from a multi-byte char
/x
x?.
! x:?^1?,$w! test.out
:e! test.out
G:put =matchstr(\"אבגד\", \".\", 0, 2) " ב
:put =matchstr(\"אבגד\", \"..\", 0, 2) " בג
--- 32,40 ----
x:" Test backwards search from a multi-byte char
/x
x?.
! x:let @w=':%s#comb[i]nations#œ̄ṣ́m̥̄ᾱ̆́#g'
! :@w
! :?^1?,$w! test.out
:e! test.out
G:put =matchstr(\"אבגד\", \".\", 0, 2) " ב
:put =matchstr(\"אבגד\", \"..\", 0, 2) " בג
***************
*** 61,63 ****
--- 63,66 ----
h AÀÁÂÃÄÅĀĂĄǍǞǠẢ BḂḆ CÇĆĈĊČ DĎĐḊḎḐ EÈÉÊËĒĔĖĘĚẺẼ FḞ GĜĞĠĢǤǦǴḠ HĤĦḢḦḨ IÌÍÎÏĨĪĬĮİǏỈ JĴ KĶǨḰḴ LĹĻĽĿŁḺ MḾṀ NÑŃŅŇṄṈ OÒÓÔÕÖØŌŎŐƠǑǪǬỎ PṔṖ Q RŔŖŘṘṞ SŚŜŞŠṠ TŢŤŦṪṮ UÙÚÛÜŨŪŬŮŰŲƯǓỦ VṼ WŴẀẂẄẆ XẊẌ YÝŶŸẎỲỶỸ ZŹŻŽƵẐẔ
i aàáâãäåāăąǎǟǡả bḃḇ cçćĉċč dďđḋḏḑ eèéêëēĕėęěẻẽ fḟ gĝğġģǥǧǵḡ hĥħḣḧḩẖ iìíîïĩīĭįǐỉ jĵǰ kķǩḱḵ lĺļľŀłḻ mḿṁ nñńņňʼnṅṉ oòóôõöøōŏőơǒǫǭỏ pṕṗ q rŕŗřṙṟ sśŝşšṡ tţťŧṫṯẗ uùúûüũūŭůűųưǔủ vṽ wŵẁẃẅẇẘ xẋẍ yýÿŷẏẙỳỷỹ zźżžƶẑẕ
j 0123❤x
+ k combinations
*** ../vim-7.3.926/src/testdir/test44.ok 2013-01-23 16:43:07.000000000 +0100
--- src/testdir/test44.ok 2013-05-06 05:01:39.000000000 +0200
***************
*** 17,22 ****
--- 17,23 ----
h AÀÁÂÃÄÅĀĂĄǍǞǠẢ BḂḆ CÇĆĈĊČ DĎĐḊḎḐ EÈÉÊËĒĔĖĘĚẺẼ FḞ GĜĞĠĢǤǦǴḠ HĤĦḢḦḨ IÌÍÎÏĨĪĬĮİǏỈ JĴ KĶǨḰḴ LĹĻĽĿŁḺ MḾṀ NÑŃŅŇṄṈ OÒÓÔÕÖØŌŎŐƠǑǪǬỎ PṔṖ Q RŔŖŘṘṞ SŚŜŞŠṠ TŢŤŦṪṮ UÙÚÛÜŨŪŬŮŰŲƯǓỦ VṼ WŴẀẂẄẆ XẊẌ YÝŶŸẎỲỶỸ ZŹŻŽƵẐ
i aàáâãäåāăąǎǟǡả bḃḇ cçćĉċč dďđḋḏḑ eèéêëēĕėęěẻẽ fḟ gĝğġģǥǧǵḡ hĥħḣḧḩẖ iìíîïĩīĭįǐỉ jĵǰ kķǩḱḵ lĺļľŀłḻ mḿṁ nñńņňʼnṅṉ oòóôõöøōŏőơǒǫǭỏ pṕṗ q rŕŗřṙṟ sśŝşšṡ tţťŧṫṯẗ uùúûüũūŭůűųưǔủ vṽ wŵẁẃẅẇẘ xẋẍ yýÿŷẏẙỳỷỹ zźżžƶẑ
j 012❤
+ k œ̄ṣ́m̥̄ᾱ̆́
ב
בג
א
*** ../vim-7.3.926/src/version.c 2013-05-06 04:50:26.000000000 +0200
--- src/version.c 2013-05-06 05:08:11.000000000 +0200
***************
*** 730,731 ****
--- 730,733 ----
{ /* Add new patch number below this line */
+ /**/
+ 927,
/**/
--
In his lifetime van Gogh painted 486 oil paintings. Oddly enough, 8975
of them are to be found in the United States.
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///

86
7.3.928 Normal file
View File

@ -0,0 +1,86 @@
To: vim_dev@googlegroups.com
Subject: Patch 7.3.928
Fcc: outbox
From: Bram Moolenaar <Bram@moolenaar.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
------------
Patch 7.3.928 (after 7.3.924)
Problem: Can't build with strict C compiler.
Solution: Move declaration to start of block. (Taro Muraoka)
Files: src/if_py_both.h
*** ../vim-7.3.927/src/if_py_both.h 2013-05-06 04:21:35.000000000 +0200
--- src/if_py_both.h 2013-05-06 06:21:55.000000000 +0200
***************
*** 1521,1532 ****
int flags;
long numval;
char_u *stringval;
if (this->Check(this->from))
return NULL;
- DICTKEY_DECL
-
DICTKEY_GET_NOTEMPTY(NULL)
flags = get_option_value_strict(key, &numval, &stringval,
--- 1521,1531 ----
int flags;
long numval;
char_u *stringval;
+ DICTKEY_DECL
if (this->Check(this->from))
return NULL;
DICTKEY_GET_NOTEMPTY(NULL)
flags = get_option_value_strict(key, &numval, &stringval,
***************
*** 1616,1627 ****
int flags;
int opt_flags;
int r = 0;
if (this->Check(this->from))
return -1;
- DICTKEY_DECL
-
DICTKEY_GET_NOTEMPTY(-1)
flags = get_option_value_strict(key, NULL, NULL,
--- 1615,1625 ----
int flags;
int opt_flags;
int r = 0;
+ DICTKEY_DECL
if (this->Check(this->from))
return -1;
DICTKEY_GET_NOTEMPTY(-1)
flags = get_option_value_strict(key, NULL, NULL,
*** ../vim-7.3.927/src/version.c 2013-05-06 05:50:22.000000000 +0200
--- src/version.c 2013-05-06 06:22:57.000000000 +0200
***************
*** 730,731 ****
--- 730,733 ----
{ /* Add new patch number below this line */
+ /**/
+ 928,
/**/
--
press CTRL-ALT-DEL for more information
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///

178
7.3.929 Normal file
View File

@ -0,0 +1,178 @@
To: vim_dev@googlegroups.com
Subject: Patch 7.3.929
Fcc: outbox
From: Bram Moolenaar <Bram@moolenaar.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
------------
Patch 7.3.929 (after 7.3.924)
Problem: Compiler warning for unused variable. Not freeing unused string.
Solution: Remove the variable. Clear the options.
Files: src/option.c
*** ../vim-7.3.928/src/option.c 2013-05-06 03:52:44.000000000 +0200
--- src/option.c 2013-05-06 06:42:03.000000000 +0200
***************
*** 9705,9713 ****
{
struct vimoption *p;
int opt_idx;
!
! buf_T *buf = (buf_T *) from;
! win_T *win = (win_T *) from;
opt_idx = findoption(name);
p = &(options[opt_idx]);
--- 9705,9711 ----
{
struct vimoption *p;
int opt_idx;
! buf_T *buf = (buf_T *)from;
opt_idx = findoption(name);
p = &(options[opt_idx]);
***************
*** 9716,9775 ****
{
/* global option with local value: use local value if it's been set */
case PV_EP:
! *buf->b_p_ep = NUL;
break;
case PV_KP:
! *buf->b_p_kp = NUL;
break;
case PV_PATH:
! *buf->b_p_path = NUL;
break;
case PV_AR:
buf->b_p_ar = -1;
break;
case PV_TAGS:
! *buf->b_p_tags = NUL;
break;
#ifdef FEAT_FIND_ID
case PV_DEF:
! *buf->b_p_def = NUL;
break;
case PV_INC:
! *buf->b_p_inc = NUL;
break;
#endif
#ifdef FEAT_INS_EXPAND
case PV_DICT:
! *buf->b_p_dict = NUL;
break;
case PV_TSR:
! *buf->b_p_tsr = NUL;
break;
#endif
#ifdef FEAT_QUICKFIX
case PV_EFM:
! *buf->b_p_efm = NUL;
break;
case PV_GP:
! *buf->b_p_gp = NUL;
break;
case PV_MP:
! *buf->b_p_mp = NUL;
break;
#endif
#if defined(FEAT_BEVAL) && defined(FEAT_EVAL)
case PV_BEXPR:
! *buf->b_p_bexpr = NUL;
break;
#endif
#if defined(FEAT_CRYPT)
case PV_CM:
! *buf->b_p_cm = NUL;
break;
#endif
#ifdef FEAT_STL_OPT
case PV_STL:
! *win->w_p_stl = NUL;
break;
#endif
}
--- 9714,9773 ----
{
/* global option with local value: use local value if it's been set */
case PV_EP:
! clear_string_option(&buf->b_p_ep);
break;
case PV_KP:
! clear_string_option(&buf->b_p_kp);
break;
case PV_PATH:
! clear_string_option(&buf->b_p_path);
break;
case PV_AR:
buf->b_p_ar = -1;
break;
case PV_TAGS:
! clear_string_option(&buf->b_p_tags);
break;
#ifdef FEAT_FIND_ID
case PV_DEF:
! clear_string_option(&buf->b_p_def);
break;
case PV_INC:
! clear_string_option(&buf->b_p_inc);
break;
#endif
#ifdef FEAT_INS_EXPAND
case PV_DICT:
! clear_string_option(&buf->b_p_dict);
break;
case PV_TSR:
! clear_string_option(&buf->b_p_tsr);
break;
#endif
#ifdef FEAT_QUICKFIX
case PV_EFM:
! clear_string_option(&buf->b_p_efm);
break;
case PV_GP:
! clear_string_option(&buf->b_p_gp);
break;
case PV_MP:
! clear_string_option(&buf->b_p_mp);
break;
#endif
#if defined(FEAT_BEVAL) && defined(FEAT_EVAL)
case PV_BEXPR:
! clear_string_option(&buf->b_p_bexpr);
break;
#endif
#if defined(FEAT_CRYPT)
case PV_CM:
! clear_string_option(&buf->b_p_cm);
break;
#endif
#ifdef FEAT_STL_OPT
case PV_STL:
! clear_string_option(&((win_T *)from)->w_p_stl);
break;
#endif
}
*** ../vim-7.3.928/src/version.c 2013-05-06 06:26:10.000000000 +0200
--- src/version.c 2013-05-06 06:35:06.000000000 +0200
***************
*** 730,731 ****
--- 730,733 ----
{ /* Add new patch number below this line */
+ /**/
+ 929,
/**/
--
Microsoft: "Windows NT 4.0 now has the same user-interface as Windows 95"
Windows 95: "Press CTRL-ALT-DEL to reboot"
Windows NT 4.0: "Press CTRL-ALT-DEL to login"
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///

46
7.3.930 Normal file
View File

@ -0,0 +1,46 @@
To: vim_dev@googlegroups.com
Subject: Patch 7.3.930
Fcc: outbox
From: Bram Moolenaar <Bram@moolenaar.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
------------
Patch 7.3.930
Problem: MSVC 2012 update is not recognized.
Solution: Update the version in the makefile. (Raymond Ko)
Files: src/Make_mvc.mak
*** ../vim-7.3.929/src/Make_mvc.mak 2013-05-06 04:21:35.000000000 +0200
--- src/Make_mvc.mak 2013-05-07 05:08:08.000000000 +0200
***************
*** 416,421 ****
--- 416,424 ----
!if "$(_NMAKE_VER)" == "11.00.51106.1"
MSVCVER = 11.0
!endif
+ !if "$(_NMAKE_VER)" == "11.00.60315.1"
+ MSVCVER = 11.0
+ !endif
!endif
# Abort building VIM if version of VC is unrecognised.
*** ../vim-7.3.929/src/version.c 2013-05-06 06:45:42.000000000 +0200
--- src/version.c 2013-05-07 05:09:51.000000000 +0200
***************
*** 730,731 ****
--- 730,733 ----
{ /* Add new patch number below this line */
+ /**/
+ 930,
/**/
--
Life would be so much easier if we could just look at the source code.
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///

58
7.3.931 Normal file
View File

@ -0,0 +1,58 @@
To: vim_dev@googlegroups.com
Subject: Patch 7.3.931
Fcc: outbox
From: Bram Moolenaar <Bram@moolenaar.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
------------
Patch 7.3.931
Problem: No completion for :xmap and :smap. (Yukihiro Nakadaira)
Solution: Add the case statements. (Christian Brabandt)
Files: src/ex_docmd.c
*** ../vim-7.3.930/src/ex_docmd.c 2013-05-06 04:21:35.000000000 +0200
--- src/ex_docmd.c 2013-05-07 05:15:26.000000000 +0200
***************
*** 3889,3894 ****
--- 3889,3896 ----
case CMD_imap: case CMD_inoremap:
case CMD_cmap: case CMD_cnoremap:
case CMD_lmap: case CMD_lnoremap:
+ case CMD_smap: case CMD_snoremap:
+ case CMD_xmap: case CMD_xnoremap:
return set_context_in_map_cmd(xp, cmd, arg, forceit,
FALSE, FALSE, ea.cmdidx);
case CMD_unmap:
***************
*** 3898,3903 ****
--- 3900,3907 ----
case CMD_iunmap:
case CMD_cunmap:
case CMD_lunmap:
+ case CMD_sunmap:
+ case CMD_xunmap:
return set_context_in_map_cmd(xp, cmd, arg, forceit,
FALSE, TRUE, ea.cmdidx);
case CMD_abbreviate: case CMD_noreabbrev:
*** ../vim-7.3.930/src/version.c 2013-05-07 05:11:12.000000000 +0200
--- src/version.c 2013-05-07 05:16:45.000000000 +0200
***************
*** 730,731 ****
--- 730,733 ----
{ /* Add new patch number below this line */
+ /**/
+ 931,
/**/
--
FIRST HEAD: All right! All right! We'll kill him first and then have tea and
biscuits.
"Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///

51
7.3.932 Normal file
View File

@ -0,0 +1,51 @@
To: vim_dev@googlegroups.com
Subject: Patch 7.3.932
Fcc: outbox
From: Bram Moolenaar <Bram@moolenaar.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
------------
Patch 7.3.932
Problem: Compiler warning for uninitialized variable. (Tony Mechelynck)
Solution: Initialize the variable.
Files: src/option.c
*** ../vim-7.3.931/src/option.c 2013-05-06 06:45:42.000000000 +0200
--- src/option.c 2013-05-08 01:32:25.000000000 +0200
***************
*** 8847,8853 ****
void *from;
{
int opt_idx;
! char_u *varp;
struct vimoption *p;
int r = 0;
--- 8847,8853 ----
void *from;
{
int opt_idx;
! char_u *varp = NULL;
struct vimoption *p;
int r = 0;
*** ../vim-7.3.931/src/version.c 2013-05-07 05:18:15.000000000 +0200
--- src/version.c 2013-05-11 13:44:04.000000000 +0200
***************
*** 730,731 ****
--- 730,733 ----
{ /* Add new patch number below this line */
+ /**/
+ 932,
/**/
--
Proverb: A nightingale that forgets the lyrics is a hummingbird.
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///

163
7.3.933 Normal file
View File

@ -0,0 +1,163 @@
To: vim_dev@googlegroups.com
Subject: Patch 7.3.933
Fcc: outbox
From: Bram Moolenaar <Bram@moolenaar.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
------------
Patch 7.3.933
Problem: Ruby on Mac crashes due to GC failure.
Solution: Init the stack from main(). (Hiroshi Shirosaki)
Files: src/main.c, src/if_ruby.c, src/proto/if_ruby.pro
*** ../vim-7.3.932/src/main.c 2013-03-19 13:33:18.000000000 +0100
--- src/main.c 2013-05-11 13:37:23.000000000 +0200
***************
*** 192,197 ****
--- 192,204 ----
params.window_count = -1;
#endif
+ #ifdef FEAT_RUBY
+ {
+ int ruby_stack_start;
+ vim_ruby_init((void *)&ruby_stack_start);
+ }
+ #endif
+
#ifdef FEAT_TCL
vim_tcl_init(params.argv[0]);
#endif
*** ../vim-7.3.932/src/if_ruby.c 2013-05-06 04:21:35.000000000 +0200
--- src/if_ruby.c 2013-05-11 13:37:23.000000000 +0200
***************
*** 144,149 ****
--- 144,150 ----
#endif
static int ruby_initialized = 0;
+ static void *ruby_stack_start;
static VALUE objtbl;
static VALUE mVIM;
***************
*** 226,231 ****
--- 227,233 ----
# define rb_float_new dll_rb_float_new
# define rb_ary_new dll_rb_ary_new
# define rb_ary_push dll_rb_ary_push
+ # define ruby_init_stack dll_ruby_init_stack
#else
# define rb_str2cstr dll_rb_str2cstr
#endif
***************
*** 250,256 ****
# define rb_enc_str_new dll_rb_enc_str_new
# define rb_sprintf dll_rb_sprintf
# define rb_require dll_rb_require
- # define ruby_init_stack dll_ruby_init_stack
# define ruby_process_options dll_ruby_process_options
#endif
--- 252,257 ----
***************
*** 335,340 ****
--- 336,342 ----
static VALUE (*dll_rb_float_new) (double);
static VALUE (*dll_rb_ary_new) (void);
static VALUE (*dll_rb_ary_push) (VALUE, VALUE);
+ static void (*ruby_init_stack)(VALUE*);
#endif
#ifdef RUBY19_OR_LATER
static VALUE (*dll_rb_int2big)(SIGNED_VALUE);
***************
*** 347,353 ****
static VALUE (*dll_rb_enc_str_new) (const char*, long, rb_encoding*);
static VALUE (*dll_rb_sprintf) (const char*, ...);
static VALUE (*dll_rb_require) (const char*);
- static void (*ruby_init_stack)(VALUE*);
static void* (*ruby_process_options)(int, char**);
#endif
--- 349,354 ----
***************
*** 475,480 ****
--- 476,482 ----
#endif
#if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 18
{"rb_string_value_ptr", (RUBY_PROC*)&dll_rb_string_value_ptr},
+ {"ruby_init_stack", (RUBY_PROC*)&dll_ruby_init_stack},
# if DYNAMIC_RUBY_VER <= 19
{"rb_float_new", (RUBY_PROC*)&dll_rb_float_new},
# else
***************
*** 491,497 ****
{"rb_enc_str_new", (RUBY_PROC*)&dll_rb_enc_str_new},
{"rb_sprintf", (RUBY_PROC*)&dll_rb_sprintf},
{"rb_require", (RUBY_PROC*)&dll_rb_require},
- {"ruby_init_stack", (RUBY_PROC*)&dll_ruby_init_stack},
{"ruby_process_options", (RUBY_PROC*)&dll_ruby_process_options},
#endif
{"", NULL},
--- 493,498 ----
***************
*** 716,723 ****
NtInitialize(&argc, &argv);
#endif
{
! #ifdef RUBY19_OR_LATER
! RUBY_INIT_STACK;
#endif
ruby_init();
}
--- 717,724 ----
NtInitialize(&argc, &argv);
#endif
{
! #if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 18
! ruby_init_stack(ruby_stack_start);
#endif
ruby_init();
}
***************
*** 1389,1391 ****
--- 1390,1398 ----
rb_define_virtual_variable("$curbuf", buffer_s_current, 0);
rb_define_virtual_variable("$curwin", window_s_current, 0);
}
+
+ void vim_ruby_init(void *stack_start)
+ {
+ /* should get machine stack start address early in main function */
+ ruby_stack_start = stack_start;
+ }
*** ../vim-7.3.932/src/proto/if_ruby.pro 2010-08-15 21:57:28.000000000 +0200
--- src/proto/if_ruby.pro 2013-05-11 13:37:28.000000000 +0200
***************
*** 6,9 ****
--- 6,10 ----
void ex_rubyfile __ARGS((exarg_T *eap));
void ruby_buffer_free __ARGS((buf_T *buf));
void ruby_window_free __ARGS((win_T *win));
+ void vim_ruby_init __ARGS((void *stack_start));
/* vim: set ft=c : */
*** ../vim-7.3.932/src/version.c 2013-05-11 13:45:00.000000000 +0200
--- src/version.c 2013-05-11 13:52:55.000000000 +0200
***************
*** 730,731 ****
--- 730,733 ----
{ /* Add new patch number below this line */
+ /**/
+ 933,
/**/
--
Veni, Vidi, Video -- I came, I saw, I taped what I saw.
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///

81
7.3.934 Normal file
View File

@ -0,0 +1,81 @@
To: vim_dev@googlegroups.com
Subject: Patch 7.3.934
Fcc: outbox
From: Bram Moolenaar <Bram@moolenaar.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
------------
Patch 7.3.934
Problem: E381 and E380 make the user think nothing happened.
Solution: Display the message indicating what error list is now active.
(Christian Brabandt)
Files: src/quickfix.c
*** ../vim-7.3.933/src/quickfix.c 2013-05-06 04:21:35.000000000 +0200
--- src/quickfix.c 2013-05-11 13:50:56.000000000 +0200
***************
*** 2085,2091 ****
if (qi->qf_curlist == 0)
{
EMSG(_("E380: At bottom of quickfix stack"));
! return;
}
--qi->qf_curlist;
}
--- 2085,2091 ----
if (qi->qf_curlist == 0)
{
EMSG(_("E380: At bottom of quickfix stack"));
! break;
}
--qi->qf_curlist;
}
***************
*** 2094,2106 ****
if (qi->qf_curlist >= qi->qf_listcount - 1)
{
EMSG(_("E381: At top of quickfix stack"));
! return;
}
++qi->qf_curlist;
}
}
qf_msg(qi);
-
}
static void
--- 2094,2105 ----
if (qi->qf_curlist >= qi->qf_listcount - 1)
{
EMSG(_("E381: At top of quickfix stack"));
! break;
}
++qi->qf_curlist;
}
}
qf_msg(qi);
}
static void
*** ../vim-7.3.933/src/version.c 2013-05-11 13:56:12.000000000 +0200
--- src/version.c 2013-05-11 15:46:36.000000000 +0200
***************
*** 730,731 ****
--- 730,733 ----
{ /* Add new patch number below this line */
+ /**/
+ 934,
/**/
--
"A mouse can be just as dangerous as a bullet or a bomb."
(US Representative Lamar Smith, R-Texas)
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///

114
7.3.935 Normal file
View File

@ -0,0 +1,114 @@
To: vim_dev@googlegroups.com
Subject: Patch 7.3.935
Fcc: outbox
From: Bram Moolenaar <Bram@moolenaar.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
------------
Patch 7.3.935 (after 7.3.933)
Problem: Init stack works differently on 64 bit systems.
Solution: Handle 64 bit systems and also static library. (Yukihiro
Nakadaira)
Files: src/if_ruby.c
*** ../vim-7.3.934/src/if_ruby.c 2013-05-11 13:56:12.000000000 +0200
--- src/if_ruby.c 2013-05-11 17:31:55.000000000 +0200
***************
*** 227,233 ****
# define rb_float_new dll_rb_float_new
# define rb_ary_new dll_rb_ary_new
# define rb_ary_push dll_rb_ary_push
! # define ruby_init_stack dll_ruby_init_stack
#else
# define rb_str2cstr dll_rb_str2cstr
#endif
--- 227,239 ----
# define rb_float_new dll_rb_float_new
# define rb_ary_new dll_rb_ary_new
# define rb_ary_push dll_rb_ary_push
! # ifdef __ia64
! # define rb_ia64_bsp dll_rb_ia64_bsp
! # undef ruby_init_stack
! # define ruby_init_stack(addr) dll_ruby_init_stack((addr), rb_ia64_bsp())
! # else
! # define ruby_init_stack dll_ruby_init_stack
! # endif
#else
# define rb_str2cstr dll_rb_str2cstr
#endif
***************
*** 336,342 ****
static VALUE (*dll_rb_float_new) (double);
static VALUE (*dll_rb_ary_new) (void);
static VALUE (*dll_rb_ary_push) (VALUE, VALUE);
! static void (*ruby_init_stack)(VALUE*);
#endif
#ifdef RUBY19_OR_LATER
static VALUE (*dll_rb_int2big)(SIGNED_VALUE);
--- 342,353 ----
static VALUE (*dll_rb_float_new) (double);
static VALUE (*dll_rb_ary_new) (void);
static VALUE (*dll_rb_ary_push) (VALUE, VALUE);
! # ifdef __ia64
! static void * (*dll_rb_ia64_bsp) (void);
! static void (*dll_ruby_init_stack)(VALUE*, void*);
! # else
! static void (*dll_ruby_init_stack)(VALUE*);
! # endif
#endif
#ifdef RUBY19_OR_LATER
static VALUE (*dll_rb_int2big)(SIGNED_VALUE);
***************
*** 476,481 ****
--- 487,495 ----
#endif
#if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 18
{"rb_string_value_ptr", (RUBY_PROC*)&dll_rb_string_value_ptr},
+ # ifdef __ia64
+ {"rb_ia64_bsp", (RUBY_PROC*)&dll_rb_ia64_bsp},
+ # endif
{"ruby_init_stack", (RUBY_PROC*)&dll_ruby_init_stack},
# if DYNAMIC_RUBY_VER <= 19
{"rb_float_new", (RUBY_PROC*)&dll_rb_float_new},
***************
*** 717,723 ****
NtInitialize(&argc, &argv);
#endif
{
! #if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 18
ruby_init_stack(ruby_stack_start);
#endif
ruby_init();
--- 731,737 ----
NtInitialize(&argc, &argv);
#endif
{
! #if defined(RUBY_VERSION) && RUBY_VERSION >= 18
ruby_init_stack(ruby_stack_start);
#endif
ruby_init();
*** ../vim-7.3.934/src/version.c 2013-05-11 15:50:02.000000000 +0200
--- src/version.c 2013-05-11 17:39:08.000000000 +0200
***************
*** 730,731 ****
--- 730,733 ----
{ /* Add new patch number below this line */
+ /**/
+ 935,
/**/
--
ARTHUR: Well, it doesn't matter. Will you go and tell your master that
Arthur from the Court of Camelot is here.
GUARD #1: Listen, in order to maintain air-speed velocity, a swallow
needs to beat its wings 43 times every second, right?
ARTHUR: Please!
The Quest for the Holy Grail (Monty Python)
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///

661
7.3.936 Normal file
View File

@ -0,0 +1,661 @@
To: vim_dev@googlegroups.com
Subject: Patch 7.3.936
Fcc: outbox
From: Bram Moolenaar <Bram@moolenaar.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
------------
Patch 7.3.936 (after 7.3.935)
Problem: Ruby 1.8: Missing piece for static linking on 64 bit systems.
Solution: Define ruby_init_stack() (Hiroshi Shirosaki)
Also fix preprocessor indents.
Files: src/if_ruby.c
*** ../vim-7.3.935/src/if_ruby.c 2013-05-11 17:45:45.000000000 +0200
--- src/if_ruby.c 2013-05-12 00:09:18.000000000 +0200
***************
*** 158,265 ****
static void ruby_io_init(void);
static void ruby_vim_init(void);
! #if defined(DYNAMIC_RUBY) || defined(PROTO)
! #ifdef PROTO
! # define HINSTANCE int /* for generating prototypes */
#endif
/*
* Wrapper defines
*/
! #define rb_assoc_new dll_rb_assoc_new
! #define rb_cObject (*dll_rb_cObject)
! #define rb_check_type dll_rb_check_type
! #define rb_class_path dll_rb_class_path
! #define rb_data_object_alloc dll_rb_data_object_alloc
! #define rb_define_class_under dll_rb_define_class_under
! #define rb_define_const dll_rb_define_const
! #define rb_define_global_function dll_rb_define_global_function
! #define rb_define_method dll_rb_define_method
! #define rb_define_module dll_rb_define_module
! #define rb_define_module_function dll_rb_define_module_function
! #define rb_define_singleton_method dll_rb_define_singleton_method
! #define rb_define_virtual_variable dll_rb_define_virtual_variable
! #define rb_stdout (*dll_rb_stdout)
! #define rb_eArgError (*dll_rb_eArgError)
! #define rb_eIndexError (*dll_rb_eIndexError)
! #define rb_eRuntimeError (*dll_rb_eRuntimeError)
! #define rb_eStandardError (*dll_rb_eStandardError)
! #define rb_eval_string_protect dll_rb_eval_string_protect
! #define rb_global_variable dll_rb_global_variable
! #define rb_hash_aset dll_rb_hash_aset
! #define rb_hash_new dll_rb_hash_new
! #define rb_inspect dll_rb_inspect
! #define rb_int2inum dll_rb_int2inum
! #if SIZEOF_INT < SIZEOF_LONG /* 64 bits only */
! #define rb_fix2int dll_rb_fix2int
! #define rb_num2int dll_rb_num2int
! #define rb_num2uint dll_rb_num2uint
! #endif
! #define rb_lastline_get dll_rb_lastline_get
! #define rb_lastline_set dll_rb_lastline_set
! #define rb_load_protect dll_rb_load_protect
! #ifndef RUBY19_OR_LATER
! #define rb_num2long dll_rb_num2long
! #endif
! #if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER <= 19
! #define rb_num2ulong dll_rb_num2ulong
! #endif
! #define rb_obj_alloc dll_rb_obj_alloc
! #define rb_obj_as_string dll_rb_obj_as_string
! #define rb_obj_id dll_rb_obj_id
! #define rb_raise dll_rb_raise
! #define rb_str_cat dll_rb_str_cat
! #define rb_str_concat dll_rb_str_concat
! #define rb_str_new dll_rb_str_new
! #ifdef rb_str_new2
/* Ruby may #define rb_str_new2 to use rb_str_new_cstr. */
! # define need_rb_str_new_cstr 1
/* Ruby's headers #define rb_str_new_cstr to make use of GCC's
* __builtin_constant_p extension. */
! # undef rb_str_new_cstr
! # define rb_str_new_cstr dll_rb_str_new_cstr
! #else
! # define rb_str_new2 dll_rb_str_new2
! #endif
! #if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 18
! # define rb_string_value dll_rb_string_value
! # define rb_string_value_ptr dll_rb_string_value_ptr
! # define rb_float_new dll_rb_float_new
! # define rb_ary_new dll_rb_ary_new
! # define rb_ary_push dll_rb_ary_push
! # ifdef __ia64
! # define rb_ia64_bsp dll_rb_ia64_bsp
! # undef ruby_init_stack
! # define ruby_init_stack(addr) dll_ruby_init_stack((addr), rb_ia64_bsp())
# else
! # define ruby_init_stack dll_ruby_init_stack
# endif
- #else
- # define rb_str2cstr dll_rb_str2cstr
- #endif
- #ifdef RUBY19_OR_LATER
- # define rb_errinfo dll_rb_errinfo
- #else
- # define ruby_errinfo (*dll_ruby_errinfo)
- #endif
- #define ruby_init dll_ruby_init
- #define ruby_init_loadpath dll_ruby_init_loadpath
- #ifdef WIN3264
- # define NtInitialize dll_NtInitialize
# if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 18
! # define rb_w32_snprintf dll_rb_w32_snprintf
# endif
- #endif
! #ifdef RUBY19_OR_LATER
! # define ruby_script dll_ruby_script
! # define rb_enc_find_index dll_rb_enc_find_index
! # define rb_enc_find dll_rb_enc_find
! # define rb_enc_str_new dll_rb_enc_str_new
! # define rb_sprintf dll_rb_sprintf
! # define rb_require dll_rb_require
! # define ruby_process_options dll_ruby_process_options
! #endif
/*
* Pointers for dynamic link
--- 158,269 ----
static void ruby_io_init(void);
static void ruby_vim_init(void);
! #if defined(__ia64) && !defined(ruby_init_stack)
! # define ruby_init_stack(addr) ruby_init_stack((addr), rb_ia64_bsp())
#endif
+ #if defined(DYNAMIC_RUBY) || defined(PROTO)
+ # ifdef PROTO
+ # define HINSTANCE int /* for generating prototypes */
+ # endif
+
/*
* Wrapper defines
*/
! # define rb_assoc_new dll_rb_assoc_new
! # define rb_cObject (*dll_rb_cObject)
! # define rb_check_type dll_rb_check_type
! # define rb_class_path dll_rb_class_path
! # define rb_data_object_alloc dll_rb_data_object_alloc
! # define rb_define_class_under dll_rb_define_class_under
! # define rb_define_const dll_rb_define_const
! # define rb_define_global_function dll_rb_define_global_function
! # define rb_define_method dll_rb_define_method
! # define rb_define_module dll_rb_define_module
! # define rb_define_module_function dll_rb_define_module_function
! # define rb_define_singleton_method dll_rb_define_singleton_method
! # define rb_define_virtual_variable dll_rb_define_virtual_variable
! # define rb_stdout (*dll_rb_stdout)
! # define rb_eArgError (*dll_rb_eArgError)
! # define rb_eIndexError (*dll_rb_eIndexError)
! # define rb_eRuntimeError (*dll_rb_eRuntimeError)
! # define rb_eStandardError (*dll_rb_eStandardError)
! # define rb_eval_string_protect dll_rb_eval_string_protect
! # define rb_global_variable dll_rb_global_variable
! # define rb_hash_aset dll_rb_hash_aset
! # define rb_hash_new dll_rb_hash_new
! # define rb_inspect dll_rb_inspect
! # define rb_int2inum dll_rb_int2inum
! # if SIZEOF_INT < SIZEOF_LONG /* 64 bits only */
! # define rb_fix2int dll_rb_fix2int
! # define rb_num2int dll_rb_num2int
! # define rb_num2uint dll_rb_num2uint
! # endif
! # define rb_lastline_get dll_rb_lastline_get
! # define rb_lastline_set dll_rb_lastline_set
! # define rb_load_protect dll_rb_load_protect
! # ifndef RUBY19_OR_LATER
! # define rb_num2long dll_rb_num2long
! # endif
! # if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER <= 19
! # define rb_num2ulong dll_rb_num2ulong
! # endif
! # define rb_obj_alloc dll_rb_obj_alloc
! # define rb_obj_as_string dll_rb_obj_as_string
! # define rb_obj_id dll_rb_obj_id
! # define rb_raise dll_rb_raise
! # define rb_str_cat dll_rb_str_cat
! # define rb_str_concat dll_rb_str_concat
! # define rb_str_new dll_rb_str_new
! # ifdef rb_str_new2
/* Ruby may #define rb_str_new2 to use rb_str_new_cstr. */
! # define need_rb_str_new_cstr 1
/* Ruby's headers #define rb_str_new_cstr to make use of GCC's
* __builtin_constant_p extension. */
! # undef rb_str_new_cstr
! # define rb_str_new_cstr dll_rb_str_new_cstr
# else
! # define rb_str_new2 dll_rb_str_new2
# endif
# if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 18
! # define rb_string_value dll_rb_string_value
! # define rb_string_value_ptr dll_rb_string_value_ptr
! # define rb_float_new dll_rb_float_new
! # define rb_ary_new dll_rb_ary_new
! # define rb_ary_push dll_rb_ary_push
! # ifdef __ia64
! # define rb_ia64_bsp dll_rb_ia64_bsp
! # undef ruby_init_stack
! # define ruby_init_stack(addr) dll_ruby_init_stack((addr), rb_ia64_bsp())
! # else
! # define ruby_init_stack dll_ruby_init_stack
! # endif
! # else
! # define rb_str2cstr dll_rb_str2cstr
! # endif
! # ifdef RUBY19_OR_LATER
! # define rb_errinfo dll_rb_errinfo
! # else
! # define ruby_errinfo (*dll_ruby_errinfo)
! # endif
! # define ruby_init dll_ruby_init
! # define ruby_init_loadpath dll_ruby_init_loadpath
! # ifdef WIN3264
! # define NtInitialize dll_NtInitialize
! # if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 18
! # define rb_w32_snprintf dll_rb_w32_snprintf
! # endif
# endif
! # ifdef RUBY19_OR_LATER
! # define ruby_script dll_ruby_script
! # define rb_enc_find_index dll_rb_enc_find_index
! # define rb_enc_find dll_rb_enc_find
! # define rb_enc_str_new dll_rb_enc_str_new
! # define rb_sprintf dll_rb_sprintf
! # define rb_require dll_rb_require
! # define ruby_process_options dll_ruby_process_options
! # endif
/*
* Pointers for dynamic link
***************
*** 267,275 ****
static VALUE (*dll_rb_assoc_new) (VALUE, VALUE);
VALUE *dll_rb_cFalseClass;
VALUE *dll_rb_cFixnum;
! #if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 20
VALUE *dll_rb_cFloat;
! #endif
VALUE *dll_rb_cNilClass;
static VALUE *dll_rb_cObject;
VALUE *dll_rb_cSymbol;
--- 271,279 ----
static VALUE (*dll_rb_assoc_new) (VALUE, VALUE);
VALUE *dll_rb_cFalseClass;
VALUE *dll_rb_cFixnum;
! # if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 20
VALUE *dll_rb_cFloat;
! # endif
VALUE *dll_rb_cNilClass;
static VALUE *dll_rb_cObject;
VALUE *dll_rb_cSymbol;
***************
*** 296,306 ****
static VALUE (*dll_rb_hash_new) (void);
static VALUE (*dll_rb_inspect) (VALUE);
static VALUE (*dll_rb_int2inum) (long);
! #if SIZEOF_INT < SIZEOF_LONG /* 64 bits only */
static long (*dll_rb_fix2int) (VALUE);
static long (*dll_rb_num2int) (VALUE);
static unsigned long (*dll_rb_num2uint) (VALUE);
! #endif
static VALUE (*dll_rb_lastline_get) (void);
static void (*dll_rb_lastline_set) (VALUE);
static void (*dll_rb_load_protect) (VALUE, int, int*);
--- 300,310 ----
static VALUE (*dll_rb_hash_new) (void);
static VALUE (*dll_rb_inspect) (VALUE);
static VALUE (*dll_rb_int2inum) (long);
! # if SIZEOF_INT < SIZEOF_LONG /* 64 bits only */
static long (*dll_rb_fix2int) (VALUE);
static long (*dll_rb_num2int) (VALUE);
static unsigned long (*dll_rb_num2uint) (VALUE);
! # endif
static VALUE (*dll_rb_lastline_get) (void);
static void (*dll_rb_lastline_set) (VALUE);
static void (*dll_rb_load_protect) (VALUE, int, int*);
***************
*** 310,359 ****
static VALUE (*dll_rb_obj_as_string) (VALUE);
static VALUE (*dll_rb_obj_id) (VALUE);
static void (*dll_rb_raise) (VALUE, const char*, ...);
! #if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 18
static VALUE (*dll_rb_string_value) (volatile VALUE*);
! #else
static char *(*dll_rb_str2cstr) (VALUE,int*);
! #endif
static VALUE (*dll_rb_str_cat) (VALUE, const char*, long);
static VALUE (*dll_rb_str_concat) (VALUE, VALUE);
static VALUE (*dll_rb_str_new) (const char*, long);
! #ifdef need_rb_str_new_cstr
/* Ruby may #define rb_str_new2 to use rb_str_new_cstr. */
static VALUE (*dll_rb_str_new_cstr) (const char*);
! #else
static VALUE (*dll_rb_str_new2) (const char*);
! #endif
! #ifdef RUBY19_OR_LATER
static VALUE (*dll_rb_errinfo) (void);
! #else
static VALUE *dll_ruby_errinfo;
! #endif
static void (*dll_ruby_init) (void);
static void (*dll_ruby_init_loadpath) (void);
! #ifdef WIN3264
static void (*dll_NtInitialize) (int*, char***);
! # if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 18
static int (*dll_rb_w32_snprintf)(char*, size_t, const char*, ...);
# endif
! #endif
! #if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 18
static char * (*dll_rb_string_value_ptr) (volatile VALUE*);
static VALUE (*dll_rb_float_new) (double);
static VALUE (*dll_rb_ary_new) (void);
static VALUE (*dll_rb_ary_push) (VALUE, VALUE);
! # ifdef __ia64
static void * (*dll_rb_ia64_bsp) (void);
static void (*dll_ruby_init_stack)(VALUE*, void*);
! # else
static void (*dll_ruby_init_stack)(VALUE*);
# endif
! #endif
! #ifdef RUBY19_OR_LATER
static VALUE (*dll_rb_int2big)(SIGNED_VALUE);
! #endif
! #ifdef RUBY19_OR_LATER
static void (*dll_ruby_script) (const char*);
static int (*dll_rb_enc_find_index) (const char*);
static rb_encoding* (*dll_rb_enc_find) (const char*);
--- 314,363 ----
static VALUE (*dll_rb_obj_as_string) (VALUE);
static VALUE (*dll_rb_obj_id) (VALUE);
static void (*dll_rb_raise) (VALUE, const char*, ...);
! # if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 18
static VALUE (*dll_rb_string_value) (volatile VALUE*);
! # else
static char *(*dll_rb_str2cstr) (VALUE,int*);
! # endif
static VALUE (*dll_rb_str_cat) (VALUE, const char*, long);
static VALUE (*dll_rb_str_concat) (VALUE, VALUE);
static VALUE (*dll_rb_str_new) (const char*, long);
! # ifdef need_rb_str_new_cstr
/* Ruby may #define rb_str_new2 to use rb_str_new_cstr. */
static VALUE (*dll_rb_str_new_cstr) (const char*);
! # else
static VALUE (*dll_rb_str_new2) (const char*);
! # endif
! # ifdef RUBY19_OR_LATER
static VALUE (*dll_rb_errinfo) (void);
! # else
static VALUE *dll_ruby_errinfo;
! # endif
static void (*dll_ruby_init) (void);
static void (*dll_ruby_init_loadpath) (void);
! # ifdef WIN3264
static void (*dll_NtInitialize) (int*, char***);
! # if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 18
static int (*dll_rb_w32_snprintf)(char*, size_t, const char*, ...);
+ # endif
# endif
! # if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 18
static char * (*dll_rb_string_value_ptr) (volatile VALUE*);
static VALUE (*dll_rb_float_new) (double);
static VALUE (*dll_rb_ary_new) (void);
static VALUE (*dll_rb_ary_push) (VALUE, VALUE);
! # ifdef __ia64
static void * (*dll_rb_ia64_bsp) (void);
static void (*dll_ruby_init_stack)(VALUE*, void*);
! # else
static void (*dll_ruby_init_stack)(VALUE*);
+ # endif
# endif
! # ifdef RUBY19_OR_LATER
static VALUE (*dll_rb_int2big)(SIGNED_VALUE);
! # endif
! # ifdef RUBY19_OR_LATER
static void (*dll_ruby_script) (const char*);
static int (*dll_rb_enc_find_index) (const char*);
static rb_encoding* (*dll_rb_enc_find) (const char*);
***************
*** 361,369 ****
static VALUE (*dll_rb_sprintf) (const char*, ...);
static VALUE (*dll_rb_require) (const char*);
static void* (*ruby_process_options)(int, char**);
! #endif
! #if defined(RUBY19_OR_LATER) && !defined(PROTO)
SIGNED_VALUE rb_num2long_stub(VALUE x)
{
return dll_rb_num2long(x);
--- 365,373 ----
static VALUE (*dll_rb_sprintf) (const char*, ...);
static VALUE (*dll_rb_require) (const char*);
static void* (*ruby_process_options)(int, char**);
! # endif
! # if defined(RUBY19_OR_LATER) && !defined(PROTO)
SIGNED_VALUE rb_num2long_stub(VALUE x)
{
return dll_rb_num2long(x);
***************
*** 372,378 ****
{
return dll_rb_int2big(x);
}
! #if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 20 \
&& SIZEOF_INT < SIZEOF_LONG
long rb_fix2int_stub(VALUE x)
{
--- 376,382 ----
{
return dll_rb_int2big(x);
}
! # if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 20 \
&& SIZEOF_INT < SIZEOF_LONG
long rb_fix2int_stub(VALUE x)
{
***************
*** 382,389 ****
{
return dll_rb_num2int(x);
}
! #endif
! #if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 20
VALUE
rb_float_new_in_heap(double d)
{
--- 386,393 ----
{
return dll_rb_num2int(x);
}
! # endif
! # if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 20
VALUE
rb_float_new_in_heap(double d)
{
***************
*** 393,400 ****
{
return (long)RSHIFT((SIGNED_VALUE)(x),1);
}
! #endif
! #endif
static HINSTANCE hinstRuby = NULL; /* Instance of ruby.dll */
--- 397,404 ----
{
return (long)RSHIFT((SIGNED_VALUE)(x),1);
}
! # endif
! # endif
static HINSTANCE hinstRuby = NULL; /* Instance of ruby.dll */
***************
*** 410,418 ****
{"rb_assoc_new", (RUBY_PROC*)&dll_rb_assoc_new},
{"rb_cFalseClass", (RUBY_PROC*)&dll_rb_cFalseClass},
{"rb_cFixnum", (RUBY_PROC*)&dll_rb_cFixnum},
! #if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 20
{"rb_cFloat", (RUBY_PROC*)&dll_rb_cFloat},
! #endif
{"rb_cNilClass", (RUBY_PROC*)&dll_rb_cNilClass},
{"rb_cObject", (RUBY_PROC*)&dll_rb_cObject},
{"rb_cSymbol", (RUBY_PROC*)&dll_rb_cSymbol},
--- 414,422 ----
{"rb_assoc_new", (RUBY_PROC*)&dll_rb_assoc_new},
{"rb_cFalseClass", (RUBY_PROC*)&dll_rb_cFalseClass},
{"rb_cFixnum", (RUBY_PROC*)&dll_rb_cFixnum},
! # if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 20
{"rb_cFloat", (RUBY_PROC*)&dll_rb_cFloat},
! # endif
{"rb_cNilClass", (RUBY_PROC*)&dll_rb_cNilClass},
{"rb_cObject", (RUBY_PROC*)&dll_rb_cObject},
{"rb_cSymbol", (RUBY_PROC*)&dll_rb_cSymbol},
***************
*** 439,449 ****
{"rb_hash_new", (RUBY_PROC*)&dll_rb_hash_new},
{"rb_inspect", (RUBY_PROC*)&dll_rb_inspect},
{"rb_int2inum", (RUBY_PROC*)&dll_rb_int2inum},
! #if SIZEOF_INT < SIZEOF_LONG /* 64 bits only */
{"rb_fix2int", (RUBY_PROC*)&dll_rb_fix2int},
{"rb_num2int", (RUBY_PROC*)&dll_rb_num2int},
{"rb_num2uint", (RUBY_PROC*)&dll_rb_num2uint},
! #endif
{"rb_lastline_get", (RUBY_PROC*)&dll_rb_lastline_get},
{"rb_lastline_set", (RUBY_PROC*)&dll_rb_lastline_set},
{"rb_load_protect", (RUBY_PROC*)&dll_rb_load_protect},
--- 443,453 ----
{"rb_hash_new", (RUBY_PROC*)&dll_rb_hash_new},
{"rb_inspect", (RUBY_PROC*)&dll_rb_inspect},
{"rb_int2inum", (RUBY_PROC*)&dll_rb_int2inum},
! # if SIZEOF_INT < SIZEOF_LONG /* 64 bits only */
{"rb_fix2int", (RUBY_PROC*)&dll_rb_fix2int},
{"rb_num2int", (RUBY_PROC*)&dll_rb_num2int},
{"rb_num2uint", (RUBY_PROC*)&dll_rb_num2uint},
! # endif
{"rb_lastline_get", (RUBY_PROC*)&dll_rb_lastline_get},
{"rb_lastline_set", (RUBY_PROC*)&dll_rb_lastline_set},
{"rb_load_protect", (RUBY_PROC*)&dll_rb_load_protect},
***************
*** 453,505 ****
{"rb_obj_as_string", (RUBY_PROC*)&dll_rb_obj_as_string},
{"rb_obj_id", (RUBY_PROC*)&dll_rb_obj_id},
{"rb_raise", (RUBY_PROC*)&dll_rb_raise},
! #if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 18
{"rb_string_value", (RUBY_PROC*)&dll_rb_string_value},
! #else
{"rb_str2cstr", (RUBY_PROC*)&dll_rb_str2cstr},
! #endif
{"rb_str_cat", (RUBY_PROC*)&dll_rb_str_cat},
{"rb_str_concat", (RUBY_PROC*)&dll_rb_str_concat},
{"rb_str_new", (RUBY_PROC*)&dll_rb_str_new},
! #ifdef need_rb_str_new_cstr
{"rb_str_new_cstr", (RUBY_PROC*)&dll_rb_str_new_cstr},
! #else
{"rb_str_new2", (RUBY_PROC*)&dll_rb_str_new2},
! #endif
! #ifdef RUBY19_OR_LATER
{"rb_errinfo", (RUBY_PROC*)&dll_rb_errinfo},
! #else
{"ruby_errinfo", (RUBY_PROC*)&dll_ruby_errinfo},
! #endif
{"ruby_init", (RUBY_PROC*)&dll_ruby_init},
{"ruby_init_loadpath", (RUBY_PROC*)&dll_ruby_init_loadpath},
! #ifdef WIN3264
{
! # if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER < 19
"NtInitialize",
! # else
"ruby_sysinit",
! # endif
(RUBY_PROC*)&dll_NtInitialize},
! # if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 18
{"rb_w32_snprintf", (RUBY_PROC*)&dll_rb_w32_snprintf},
# endif
! #endif
! #if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 18
{"rb_string_value_ptr", (RUBY_PROC*)&dll_rb_string_value_ptr},
! # ifdef __ia64
{"rb_ia64_bsp", (RUBY_PROC*)&dll_rb_ia64_bsp},
! # endif
{"ruby_init_stack", (RUBY_PROC*)&dll_ruby_init_stack},
! # if DYNAMIC_RUBY_VER <= 19
{"rb_float_new", (RUBY_PROC*)&dll_rb_float_new},
! # else
{"rb_float_new_in_heap", (RUBY_PROC*)&dll_rb_float_new},
! # endif
{"rb_ary_new", (RUBY_PROC*)&dll_rb_ary_new},
{"rb_ary_push", (RUBY_PROC*)&dll_rb_ary_push},
! #endif
! #ifdef RUBY19_OR_LATER
{"rb_int2big", (RUBY_PROC*)&dll_rb_int2big},
{"ruby_script", (RUBY_PROC*)&dll_ruby_script},
{"rb_enc_find_index", (RUBY_PROC*)&dll_rb_enc_find_index},
--- 457,509 ----
{"rb_obj_as_string", (RUBY_PROC*)&dll_rb_obj_as_string},
{"rb_obj_id", (RUBY_PROC*)&dll_rb_obj_id},
{"rb_raise", (RUBY_PROC*)&dll_rb_raise},
! # if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 18
{"rb_string_value", (RUBY_PROC*)&dll_rb_string_value},
! # else
{"rb_str2cstr", (RUBY_PROC*)&dll_rb_str2cstr},
! # endif
{"rb_str_cat", (RUBY_PROC*)&dll_rb_str_cat},
{"rb_str_concat", (RUBY_PROC*)&dll_rb_str_concat},
{"rb_str_new", (RUBY_PROC*)&dll_rb_str_new},
! # ifdef need_rb_str_new_cstr
{"rb_str_new_cstr", (RUBY_PROC*)&dll_rb_str_new_cstr},
! # else
{"rb_str_new2", (RUBY_PROC*)&dll_rb_str_new2},
! # endif
! # ifdef RUBY19_OR_LATER
{"rb_errinfo", (RUBY_PROC*)&dll_rb_errinfo},
! # else
{"ruby_errinfo", (RUBY_PROC*)&dll_ruby_errinfo},
! # endif
{"ruby_init", (RUBY_PROC*)&dll_ruby_init},
{"ruby_init_loadpath", (RUBY_PROC*)&dll_ruby_init_loadpath},
! # ifdef WIN3264
{
! # if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER < 19
"NtInitialize",
! # else
"ruby_sysinit",
! # endif
(RUBY_PROC*)&dll_NtInitialize},
! # if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 18
{"rb_w32_snprintf", (RUBY_PROC*)&dll_rb_w32_snprintf},
+ # endif
# endif
! # if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 18
{"rb_string_value_ptr", (RUBY_PROC*)&dll_rb_string_value_ptr},
! # ifdef __ia64
{"rb_ia64_bsp", (RUBY_PROC*)&dll_rb_ia64_bsp},
! # endif
{"ruby_init_stack", (RUBY_PROC*)&dll_ruby_init_stack},
! # if DYNAMIC_RUBY_VER <= 19
{"rb_float_new", (RUBY_PROC*)&dll_rb_float_new},
! # else
{"rb_float_new_in_heap", (RUBY_PROC*)&dll_rb_float_new},
! # endif
{"rb_ary_new", (RUBY_PROC*)&dll_rb_ary_new},
{"rb_ary_push", (RUBY_PROC*)&dll_rb_ary_push},
! # endif
! # ifdef RUBY19_OR_LATER
{"rb_int2big", (RUBY_PROC*)&dll_rb_int2big},
{"ruby_script", (RUBY_PROC*)&dll_ruby_script},
{"rb_enc_find_index", (RUBY_PROC*)&dll_rb_enc_find_index},
***************
*** 508,514 ****
{"rb_sprintf", (RUBY_PROC*)&dll_rb_sprintf},
{"rb_require", (RUBY_PROC*)&dll_rb_require},
{"ruby_process_options", (RUBY_PROC*)&dll_ruby_process_options},
! #endif
{"", NULL},
};
--- 512,518 ----
{"rb_sprintf", (RUBY_PROC*)&dll_rb_sprintf},
{"rb_require", (RUBY_PROC*)&dll_rb_require},
{"ruby_process_options", (RUBY_PROC*)&dll_ruby_process_options},
! # endif
{"", NULL},
};
*** ../vim-7.3.935/src/version.c 2013-05-11 17:45:45.000000000 +0200
--- src/version.c 2013-05-12 14:09:22.000000000 +0200
***************
*** 730,731 ****
--- 730,733 ----
{ /* Add new patch number below this line */
+ /**/
+ 936,
/**/
--
DEAD PERSON: I don't want to go in the cart!
CUSTOMER: Oh, don't be such a baby.
MORTICIAN: I can't take him...
DEAD PERSON: I feel fine!
CUSTOMER: Oh, do us a favor...
MORTICIAN: I can't.
The Quest for the Holy Grail (Monty Python)
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///

616
7.3.937 Normal file
View File

@ -0,0 +1,616 @@
To: vim_dev@googlegroups.com
Subject: Patch 7.3.937
Fcc: outbox
From: Bram Moolenaar <Bram@moolenaar.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
------------
Patch 7.3.937
Problem: More can be shared between Python 2 and 3.
Solution: Move code to if_py_both.h. (ZyX)
Files: src/if_python.c, src/if_python3.c, src/if_py_both.h
*** ../vim-7.3.936/src/if_python.c 2013-05-06 04:21:35.000000000 +0200
--- src/if_python.c 2013-05-12 18:31:20.000000000 +0200
***************
*** 619,624 ****
--- 619,627 ----
#define DESTRUCTOR_FINISH(self) Py_DECREF(self);
+ #define WIN_PYTHON_REF(win) win->w_python_ref
+ #define BUF_PYTHON_REF(buf) buf->b_python_ref
+
static PyObject *OutputGetattr(PyObject *, char *);
static PyObject *BufferGetattr(PyObject *, char *);
static PyObject *WindowGetattr(PyObject *, char *);
***************
*** 1054,1095 ****
*/
static PyObject *
- BufferNew(buf_T *buf)
- {
- /* We need to handle deletion of buffers underneath us.
- * If we add a "b_python_ref" field to the buf_T structure,
- * then we can get at it in buf_freeall() in vim. We then
- * need to create only ONE Python object per buffer - if
- * we try to create a second, just INCREF the existing one
- * and return it. The (single) Python object referring to
- * the buffer is stored in "b_python_ref".
- * Question: what to do on a buf_freeall(). We'll probably
- * have to either delete the Python object (DECREF it to
- * zero - a bad idea, as it leaves dangling refs!) or
- * set the buf_T * value to an invalid value (-1?), which
- * means we need checks in all access functions... Bah.
- */
-
- BufferObject *self;
-
- if (buf->b_python_ref != NULL)
- {
- self = buf->b_python_ref;
- Py_INCREF(self);
- }
- else
- {
- self = PyObject_NEW(BufferObject, &BufferType);
- if (self == NULL)
- return NULL;
- self->buf = buf;
- buf->b_python_ref = self;
- }
-
- return (PyObject *)(self);
- }
-
- static PyObject *
BufferGetattr(PyObject *self, char *name)
{
PyObject *r;
--- 1057,1062 ----
***************
*** 1107,1136 ****
/******************/
static PyInt
- BufferLength(PyObject *self)
- {
- /* HOW DO WE SIGNAL AN ERROR FROM THIS FUNCTION? */
- if (CheckBuffer((BufferObject *)(self)))
- return -1; /* ??? */
-
- return (((BufferObject *)(self))->buf->b_ml.ml_line_count);
- }
-
- static PyObject *
- BufferItem(PyObject *self, PyInt n)
- {
- return RBItem((BufferObject *)(self), n, 1,
- (int)((BufferObject *)(self))->buf->b_ml.ml_line_count);
- }
-
- static PyObject *
- BufferSlice(PyObject *self, PyInt lo, PyInt hi)
- {
- return RBSlice((BufferObject *)(self), lo, hi, 1,
- (int)((BufferObject *)(self))->buf->b_ml.ml_line_count);
- }
-
- static PyInt
BufferAssItem(PyObject *self, PyInt n, PyObject *val)
{
return RBAsItem((BufferObject *)(self), n, val, 1,
--- 1074,1079 ----
***************
*** 1217,1256 ****
*/
static PyObject *
- WindowNew(win_T *win)
- {
- /* We need to handle deletion of windows underneath us.
- * If we add a "w_python_ref" field to the win_T structure,
- * then we can get at it in win_free() in vim. We then
- * need to create only ONE Python object per window - if
- * we try to create a second, just INCREF the existing one
- * and return it. The (single) Python object referring to
- * the window is stored in "w_python_ref".
- * On a win_free() we set the Python object's win_T* field
- * to an invalid value. We trap all uses of a window
- * object, and reject them if the win_T* field is invalid.
- */
-
- WindowObject *self;
-
- if (win->w_python_ref)
- {
- self = win->w_python_ref;
- Py_INCREF(self);
- }
- else
- {
- self = PyObject_NEW(WindowObject, &WindowType);
- if (self == NULL)
- return NULL;
- self->win = win;
- win->w_python_ref = self;
- }
-
- return (PyObject *)(self);
- }
-
- static PyObject *
WindowGetattr(PyObject *self, char *name)
{
PyObject *r;
--- 1160,1165 ----
***************
*** 1289,1299 ****
void
python_buffer_free(buf_T *buf)
{
! if (buf->b_python_ref != NULL)
{
! BufferObject *bp = buf->b_python_ref;
bp->buf = INVALID_BUFFER_VALUE;
! buf->b_python_ref = NULL;
}
}
--- 1198,1208 ----
void
python_buffer_free(buf_T *buf)
{
! if (BUF_PYTHON_REF(buf) != NULL)
{
! BufferObject *bp = BUF_PYTHON_REF(buf);
bp->buf = INVALID_BUFFER_VALUE;
! BUF_PYTHON_REF(buf) = NULL;
}
}
***************
*** 1301,1311 ****
void
python_window_free(win_T *win)
{
! if (win->w_python_ref != NULL)
{
! WindowObject *wp = win->w_python_ref;
wp->win = INVALID_WINDOW_VALUE;
! win->w_python_ref = NULL;
}
}
#endif
--- 1210,1220 ----
void
python_window_free(win_T *win)
{
! if (WIN_PYTHON_REF(win) != NULL)
{
! WindowObject *wp = WIN_PYTHON_REF(win);
wp->win = INVALID_WINDOW_VALUE;
! WIN_PYTHON_REF(win) = NULL;
}
}
#endif
*** ../vim-7.3.936/src/if_python3.c 2013-05-06 04:21:35.000000000 +0200
--- src/if_python3.c 2013-05-12 18:31:20.000000000 +0200
***************
*** 621,626 ****
--- 621,629 ----
#define DESTRUCTOR_FINISH(self) Py_TYPE(self)->tp_free((PyObject*)self);
+ #define WIN_PYTHON_REF(win) win->w_python3_ref
+ #define BUF_PYTHON_REF(buf) buf->b_python3_ref
+
static void
call_PyObject_Free(void *p)
{
***************
*** 1067,1112 ****
};
! /* Buffer object - Definitions
*/
static PyObject *
- BufferNew(buf_T *buf)
- {
- /* We need to handle deletion of buffers underneath us.
- * If we add a "b_python3_ref" field to the buf_T structure,
- * then we can get at it in buf_freeall() in vim. We then
- * need to create only ONE Python object per buffer - if
- * we try to create a second, just INCREF the existing one
- * and return it. The (single) Python object referring to
- * the buffer is stored in "b_python3_ref".
- * Question: what to do on a buf_freeall(). We'll probably
- * have to either delete the Python object (DECREF it to
- * zero - a bad idea, as it leaves dangling refs!) or
- * set the buf_T * value to an invalid value (-1?), which
- * means we need checks in all access functions... Bah.
- */
-
- BufferObject *self;
-
- if (buf->b_python3_ref != NULL)
- {
- self = buf->b_python3_ref;
- Py_INCREF(self);
- }
- else
- {
- self = PyObject_NEW(BufferObject, &BufferType);
- buf->b_python3_ref = self;
- if (self == NULL)
- return NULL;
- self->buf = buf;
- }
-
- return (PyObject *)(self);
- }
-
- static PyObject *
BufferGetattro(PyObject *self, PyObject*nameobj)
{
PyObject *r;
--- 1070,1079 ----
};
! /* Buffer object
*/
static PyObject *
BufferGetattro(PyObject *self, PyObject*nameobj)
{
PyObject *r;
***************
*** 1132,1160 ****
/******************/
- static Py_ssize_t
- BufferLength(PyObject *self)
- {
- if (CheckBuffer((BufferObject *)(self)))
- return -1;
-
- return (Py_ssize_t)(((BufferObject *)(self))->buf->b_ml.ml_line_count);
- }
-
- static PyObject *
- BufferItem(PyObject *self, Py_ssize_t n)
- {
- return RBItem((BufferObject *)(self), n, 1,
- (Py_ssize_t)((BufferObject *)(self))->buf->b_ml.ml_line_count);
- }
-
- static PyObject *
- BufferSlice(PyObject *self, Py_ssize_t lo, Py_ssize_t hi)
- {
- return RBSlice((BufferObject *)(self), lo, hi, 1,
- (Py_ssize_t)((BufferObject *)(self))->buf->b_ml.ml_line_count);
- }
-
static PyObject *
BufferSubscript(PyObject *self, PyObject* idx)
{
--- 1099,1104 ----
***************
*** 1342,1381 ****
*/
static PyObject *
- WindowNew(win_T *win)
- {
- /* We need to handle deletion of windows underneath us.
- * If we add a "w_python3_ref" field to the win_T structure,
- * then we can get at it in win_free() in vim. We then
- * need to create only ONE Python object per window - if
- * we try to create a second, just INCREF the existing one
- * and return it. The (single) Python object referring to
- * the window is stored in "w_python3_ref".
- * On a win_free() we set the Python object's win_T* field
- * to an invalid value. We trap all uses of a window
- * object, and reject them if the win_T* field is invalid.
- */
-
- WindowObject *self;
-
- if (win->w_python3_ref)
- {
- self = win->w_python3_ref;
- Py_INCREF(self);
- }
- else
- {
- self = PyObject_NEW(WindowObject, &WindowType);
- if (self == NULL)
- return NULL;
- self->win = win;
- win->w_python3_ref = self;
- }
-
- return (PyObject *)(self);
- }
-
- static PyObject *
WindowGetattro(PyObject *self, PyObject *nameobj)
{
PyObject *r;
--- 1286,1291 ----
***************
*** 1575,1585 ****
void
python3_buffer_free(buf_T *buf)
{
! if (buf->b_python3_ref != NULL)
{
! BufferObject *bp = buf->b_python3_ref;
bp->buf = INVALID_BUFFER_VALUE;
! buf->b_python3_ref = NULL;
}
}
--- 1485,1495 ----
void
python3_buffer_free(buf_T *buf)
{
! if (BUF_PYTHON_REF(buf) != NULL)
{
! BufferObject *bp = BUF_PYTHON_REF(buf);
bp->buf = INVALID_BUFFER_VALUE;
! BUF_PYTHON_REF(buf) = NULL;
}
}
***************
*** 1587,1597 ****
void
python3_window_free(win_T *win)
{
! if (win->w_python3_ref != NULL)
{
! WindowObject *wp = win->w_python3_ref;
wp->win = INVALID_WINDOW_VALUE;
! win->w_python3_ref = NULL;
}
}
#endif
--- 1497,1507 ----
void
python3_window_free(win_T *win)
{
! if (WIN_PYTHON_REF(win) != NULL)
{
! WindowObject *wp = WIN_PYTHON_REF(win);
wp->win = INVALID_WINDOW_VALUE;
! WIN_PYTHON_REF(win) = NULL;
}
}
#endif
*** ../vim-7.3.936/src/if_py_both.h 2013-05-06 06:26:10.000000000 +0200
--- src/if_py_both.h 2013-05-12 18:31:20.000000000 +0200
***************
*** 1782,1792 ****
--- 1782,1832 ----
return 0;
}
+ /* Window object
+ */
+
static int WindowSetattr(PyObject *, char *, PyObject *);
static PyObject *WindowRepr(PyObject *);
static PyTypeObject WindowType;
static PyObject *
+ WindowNew(win_T *win)
+ {
+ /* We need to handle deletion of windows underneath us.
+ * If we add a "w_python*_ref" field to the win_T structure,
+ * then we can get at it in win_free() in vim. We then
+ * need to create only ONE Python object per window - if
+ * we try to create a second, just INCREF the existing one
+ * and return it. The (single) Python object referring to
+ * the window is stored in "w_python*_ref".
+ * On a win_free() we set the Python object's win_T* field
+ * to an invalid value. We trap all uses of a window
+ * object, and reject them if the win_T* field is invalid.
+ *
+ * Python2 and Python3 get different fields and different objects:
+ * w_python_ref and w_python3_ref fields respectively.
+ */
+
+ WindowObject *self;
+
+ if (WIN_PYTHON_REF(win))
+ {
+ self = WIN_PYTHON_REF(win);
+ Py_INCREF(self);
+ }
+ else
+ {
+ self = PyObject_NEW(WindowObject, &WindowType);
+ if (self == NULL)
+ return NULL;
+ self->win = win;
+ WIN_PYTHON_REF(win) = self;
+ }
+
+ return (PyObject *)(self);
+ }
+
+ static PyObject *
WindowAttr(WindowObject *this, char *name)
{
if (strcmp(name, "buffer") == 0)
***************
*** 1809,1815 ****
return OptionsNew(SREQ_WIN, this->win, (checkfun) CheckWindow,
(PyObject *) this);
else if (strcmp(name,"__members__") == 0)
! return Py_BuildValue("[sssss]", "buffer", "cursor", "height", "vars",
"options");
else
return NULL;
--- 1849,1855 ----
return OptionsNew(SREQ_WIN, this->win, (checkfun) CheckWindow,
(PyObject *) this);
else if (strcmp(name,"__members__") == 0)
! return Py_BuildValue("[ssssss]", "buffer", "cursor", "height", "vars",
"options");
else
return NULL;
***************
*** 1821,1831 ****
WindowObject *this = (WindowObject *)(self);
if (this->win && this->win != INVALID_WINDOW_VALUE)
! #if PY_MAJOR_VERSION >= 3
! this->win->w_python3_ref = NULL;
! #else
! this->win->w_python_ref = NULL;
! #endif
DESTRUCTOR_FINISH(self);
}
--- 1861,1867 ----
WindowObject *this = (WindowObject *)(self);
if (this->win && this->win != INVALID_WINDOW_VALUE)
! WIN_PYTHON_REF(this->win) = NULL;
DESTRUCTOR_FINISH(self);
}
***************
*** 2756,2771 ****
BufferObject *this = (BufferObject *)(self);
if (this->buf && this->buf != INVALID_BUFFER_VALUE)
! #if PY_MAJOR_VERSION >= 3
! this->buf->b_python3_ref = NULL;
! #else
! this->buf->b_python_ref = NULL;
! #endif
DESTRUCTOR_FINISH(self);
}
static PyObject *
BufferAttr(BufferObject *this, char *name)
{
if (strcmp(name, "name") == 0)
--- 2792,2842 ----
BufferObject *this = (BufferObject *)(self);
if (this->buf && this->buf != INVALID_BUFFER_VALUE)
! BUF_PYTHON_REF(this->buf) = NULL;
DESTRUCTOR_FINISH(self);
}
static PyObject *
+ BufferNew(buf_T *buf)
+ {
+ /* We need to handle deletion of buffers underneath us.
+ * If we add a "b_python*_ref" field to the buf_T structure,
+ * then we can get at it in buf_freeall() in vim. We then
+ * need to create only ONE Python object per buffer - if
+ * we try to create a second, just INCREF the existing one
+ * and return it. The (single) Python object referring to
+ * the buffer is stored in "b_python*_ref".
+ * Question: what to do on a buf_freeall(). We'll probably
+ * have to either delete the Python object (DECREF it to
+ * zero - a bad idea, as it leaves dangling refs!) or
+ * set the buf_T * value to an invalid value (-1?), which
+ * means we need checks in all access functions... Bah.
+ *
+ * Python2 and Python3 get different fields and different objects:
+ * b_python_ref and b_python3_ref fields respectively.
+ */
+
+ BufferObject *self;
+
+ if (BUF_PYTHON_REF(buf) != NULL)
+ {
+ self = BUF_PYTHON_REF(buf);
+ Py_INCREF(self);
+ }
+ else
+ {
+ self = PyObject_NEW(BufferObject, &BufferType);
+ if (self == NULL)
+ return NULL;
+ self->buf = buf;
+ BUF_PYTHON_REF(buf) = self;
+ }
+
+ return (PyObject *)(self);
+ }
+
+ static PyObject *
BufferAttr(BufferObject *this, char *name)
{
if (strcmp(name, "name") == 0)
***************
*** 2783,2788 ****
--- 2854,2883 ----
return NULL;
}
+ static PyInt
+ BufferLength(PyObject *self)
+ {
+ /* HOW DO WE SIGNAL AN ERROR FROM THIS FUNCTION? */
+ if (CheckBuffer((BufferObject *)(self)))
+ return -1; /* ??? */
+
+ return (PyInt)(((BufferObject *)(self))->buf->b_ml.ml_line_count);
+ }
+
+ static PyObject *
+ BufferItem(PyObject *self, PyInt n)
+ {
+ return RBItem((BufferObject *)(self), n, 1,
+ (PyInt)((BufferObject *)(self))->buf->b_ml.ml_line_count);
+ }
+
+ static PyObject *
+ BufferSlice(PyObject *self, PyInt lo, PyInt hi)
+ {
+ return RBSlice((BufferObject *)(self), lo, hi, 1,
+ (PyInt)((BufferObject *)(self))->buf->b_ml.ml_line_count);
+ }
+
static PyObject *
BufferAppend(PyObject *self, PyObject *args)
{
*** ../vim-7.3.936/src/version.c 2013-05-12 14:10:41.000000000 +0200
--- src/version.c 2013-05-12 18:44:01.000000000 +0200
***************
*** 730,731 ****
--- 730,733 ----
{ /* Add new patch number below this line */
+ /**/
+ 937,
/**/
--
ARTHUR: Well, I can't just call you `Man'.
DENNIS: Well, you could say `Dennis'.
ARTHUR: Well, I didn't know you were called `Dennis.'
DENNIS: Well, you didn't bother to find out, did you?
The Quest for the Holy Grail (Monty Python)
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///

145
7.3.938 Normal file
View File

@ -0,0 +1,145 @@
To: vim_dev@googlegroups.com
Subject: Patch 7.3.938
Fcc: outbox
From: Bram Moolenaar <Bram@moolenaar.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
------------
Patch 7.3.938
Problem: Python: not easy to get to window number.
Solution: Add vim.window.number. (ZyX)
Files: runtime/doc/if_pyth.txt, src/if_py_both.h, src/proto/window.pro,
src/window.c
*** ../vim-7.3.937/runtime/doc/if_pyth.txt 2013-05-06 03:52:44.000000000 +0200
--- runtime/doc/if_pyth.txt 2013-05-12 18:55:41.000000000 +0200
***************
*** 396,401 ****
--- 396,405 ----
|python-options|. If option is |global-local|
and local value is missing getting it will
return None.
+ number (read-only) Window number. The first window has number 1.
+ This is zero in case it cannot be determined
+ (e.g. when the window object belongs to other
+ tab page).
The height attribute is writable only if the screen is split horizontally.
The width attribute is writable only if the screen is split vertically.
*** ../vim-7.3.937/src/if_py_both.h 2013-05-12 18:44:44.000000000 +0200
--- src/if_py_both.h 2013-05-12 18:48:07.000000000 +0200
***************
*** 1848,1856 ****
else if (strcmp(name, "options") == 0)
return OptionsNew(SREQ_WIN, this->win, (checkfun) CheckWindow,
(PyObject *) this);
else if (strcmp(name,"__members__") == 0)
return Py_BuildValue("[ssssss]", "buffer", "cursor", "height", "vars",
! "options");
else
return NULL;
}
--- 1848,1858 ----
else if (strcmp(name, "options") == 0)
return OptionsNew(SREQ_WIN, this->win, (checkfun) CheckWindow,
(PyObject *) this);
+ else if (strcmp(name, "number") == 0)
+ return PyLong_FromLong((long) get_win_number(this->win));
else if (strcmp(name,"__members__") == 0)
return Py_BuildValue("[ssssss]", "buffer", "cursor", "height", "vars",
! "options", "number");
else
return NULL;
}
***************
*** 1974,1990 ****
}
else
{
! int i = 0;
! win_T *w;
! for (w = firstwin; w != NULL && w != this->win; w = W_NEXT(w))
! ++i;
!
! if (w == NULL)
vim_snprintf(repr, 100, _("<window object (unknown) at %p>"),
(self));
else
! vim_snprintf(repr, 100, _("<window %d>"), i);
return PyString_FromString(repr);
}
--- 1976,1988 ----
}
else
{
! int w = get_win_number(this->win);
! if (w == 0)
vim_snprintf(repr, 100, _("<window object (unknown) at %p>"),
(self));
else
! vim_snprintf(repr, 100, _("<window %d>"), w - 1);
return PyString_FromString(repr);
}
*** ../vim-7.3.937/src/proto/window.pro 2013-05-06 04:50:26.000000000 +0200
--- src/proto/window.pro 2013-05-12 18:48:07.000000000 +0200
***************
*** 74,77 ****
--- 74,78 ----
int match_delete __ARGS((win_T *wp, int id, int perr));
void clear_matches __ARGS((win_T *wp));
matchitem_T *get_match __ARGS((win_T *wp, int id));
+ int get_win_number __ARGS((win_T *wp));
/* vim: set ft=c : */
*** ../vim-7.3.937/src/window.c 2013-05-06 04:50:26.000000000 +0200
--- src/window.c 2013-05-12 18:48:07.000000000 +0200
***************
*** 6731,6733 ****
--- 6731,6750 ----
return cur;
}
#endif
+
+ #if defined(FEAT_PYTHON) || defined(FEAT_PYTHON3) || defined(PROTO)
+ int
+ get_win_number(win_T *wp)
+ {
+ int i = 1;
+ win_T *w;
+
+ for (w = firstwin; w != NULL && w != wp; w = W_NEXT(w))
+ ++i;
+
+ if (w == NULL)
+ return 0;
+ else
+ return i;
+ }
+ #endif
*** ../vim-7.3.937/src/version.c 2013-05-12 18:44:44.000000000 +0200
--- src/version.c 2013-05-12 18:52:29.000000000 +0200
***************
*** 730,731 ****
--- 730,733 ----
{ /* Add new patch number below this line */
+ /**/
+ 938,
/**/
--
ARTHUR: I did say sorry about the `old woman,' but from the behind you
looked--
DENNIS: What I object to is you automatically treat me like an inferior!
ARTHUR: Well, I AM king...
The Quest for the Holy Grail (Monty Python)
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///

60
7.3.939 Normal file
View File

@ -0,0 +1,60 @@
To: vim_dev@googlegroups.com
Subject: Patch 7.3.939
Fcc: outbox
From: Bram Moolenaar <Bram@moolenaar.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
------------
Patch 7.3.939
Problem: Using Py_BuildValue is inefficient sometimes.
Solution: Use PyLong_FromLong(). (ZyX)
Files: src/if_py_both.h
*** ../vim-7.3.938/src/if_py_both.h 2013-05-12 19:00:36.000000000 +0200
--- src/if_py_both.h 2013-05-12 19:08:24.000000000 +0200
***************
*** 1838,1847 ****
return Py_BuildValue("(ll)", (long)(pos->lnum), (long)(pos->col));
}
else if (strcmp(name, "height") == 0)
! return Py_BuildValue("l", (long)(this->win->w_height));
#ifdef FEAT_VERTSPLIT
else if (strcmp(name, "width") == 0)
! return Py_BuildValue("l", (long)(W_WIDTH(this->win)));
#endif
else if (strcmp(name, "vars") == 0)
return DictionaryNew(this->win->w_vars);
--- 1838,1847 ----
return Py_BuildValue("(ll)", (long)(pos->lnum), (long)(pos->col));
}
else if (strcmp(name, "height") == 0)
! return PyLong_FromLong((long)(this->win->w_height));
#ifdef FEAT_VERTSPLIT
else if (strcmp(name, "width") == 0)
! return PyLong_FromLong((long)(W_WIDTH(this->win)));
#endif
else if (strcmp(name, "vars") == 0)
return DictionaryNew(this->win->w_vars);
*** ../vim-7.3.938/src/version.c 2013-05-12 19:00:36.000000000 +0200
--- src/version.c 2013-05-12 19:09:19.000000000 +0200
***************
*** 730,731 ****
--- 730,733 ----
{ /* Add new patch number below this line */
+ /**/
+ 939,
/**/
--
A mathematician is a device for turning coffee into theorems.
Paul Erdos
A computer programmer is a device for turning coffee into bugs.
Bram Moolenaar
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///

87
7.3.940 Normal file
View File

@ -0,0 +1,87 @@
To: vim_dev@googlegroups.com
Subject: Patch 7.3.940
Fcc: outbox
From: Bram Moolenaar <Bram@moolenaar.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
------------
Patch 7.3.940
Problem: Python: Can't get position of window.
Solution: Add window.row and window.col. (ZyX)
Files: runtime/doc/if_pyth.txt, src/if_py_both.h
*** ../vim-7.3.939/runtime/doc/if_pyth.txt 2013-05-12 19:00:36.000000000 +0200
--- runtime/doc/if_pyth.txt 2013-05-12 19:24:40.000000000 +0200
***************
*** 400,405 ****
--- 400,408 ----
This is zero in case it cannot be determined
(e.g. when the window object belongs to other
tab page).
+ row, col (read-only) On-screen window position in display cells.
+ First position is zero.
+
The height attribute is writable only if the screen is split horizontally.
The width attribute is writable only if the screen is split vertically.
*** ../vim-7.3.939/src/if_py_both.h 2013-05-12 19:09:46.000000000 +0200
--- src/if_py_both.h 2013-05-12 19:22:16.000000000 +0200
***************
*** 1839,1847 ****
--- 1839,1853 ----
}
else if (strcmp(name, "height") == 0)
return PyLong_FromLong((long)(this->win->w_height));
+ #ifdef FEAT_WINDOWS
+ else if (strcmp(name, "row") == 0)
+ return PyLong_FromLong((long)(this->win->w_winrow));
+ #endif
#ifdef FEAT_VERTSPLIT
else if (strcmp(name, "width") == 0)
return PyLong_FromLong((long)(W_WIDTH(this->win)));
+ else if (strcmp(name, "col") == 0)
+ return PyLong_FromLong((long)(W_WINCOL(this->win)));
#endif
else if (strcmp(name, "vars") == 0)
return DictionaryNew(this->win->w_vars);
***************
*** 1851,1858 ****
else if (strcmp(name, "number") == 0)
return PyLong_FromLong((long) get_win_number(this->win));
else if (strcmp(name,"__members__") == 0)
! return Py_BuildValue("[ssssss]", "buffer", "cursor", "height", "vars",
! "options", "number");
else
return NULL;
}
--- 1857,1864 ----
else if (strcmp(name, "number") == 0)
return PyLong_FromLong((long) get_win_number(this->win));
else if (strcmp(name,"__members__") == 0)
! return Py_BuildValue("[ssssssss]", "buffer", "cursor", "height", "vars",
! "options", "number", "row", "col");
else
return NULL;
}
*** ../vim-7.3.939/src/version.c 2013-05-12 19:09:46.000000000 +0200
--- src/version.c 2013-05-12 19:23:50.000000000 +0200
***************
*** 730,731 ****
--- 730,733 ----
{ /* Add new patch number below this line */
+ /**/
+ 940,
/**/
--
A computer programmer is a device for turning requirements into
undocumented features. It runs on cola, pizza and Dilbert cartoons.
Bram Moolenaar
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///

1456
7.3.941 Normal file

File diff suppressed because it is too large Load Diff

205
7.3.942 Normal file
View File

@ -0,0 +1,205 @@
To: vim_dev@googlegroups.com
Subject: Patch 7.3.942
Fcc: outbox
From: Bram Moolenaar <Bram@moolenaar.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
------------
Patch 7.3.942
Problem: Python: SEGV in Buffer functions.
Solution: Call CheckBuffer() at the right time. (ZyX)
Files: src/if_py_both.h, src/if_python.c, src/if_python3.c
*** ../vim-7.3.941/src/if_py_both.h 2013-05-12 19:45:30.000000000 +0200
--- src/if_py_both.h 2013-05-12 20:19:08.000000000 +0200
***************
*** 2391,2396 ****
--- 2391,2399 ----
if (CheckBuffer(self))
return NULL;
+ if (end == -1)
+ end = self->buf->b_ml.ml_line_count;
+
if (n < 0 || n > end - start)
{
PyErr_SetString(PyExc_IndexError, _("line number out of range"));
***************
*** 2408,2413 ****
--- 2411,2419 ----
if (CheckBuffer(self))
return NULL;
+ if (end == -1)
+ end = self->buf->b_ml.ml_line_count;
+
size = end - start + 1;
if (lo < 0)
***************
*** 2432,2437 ****
--- 2438,2446 ----
if (CheckBuffer(self))
return -1;
+ if (end == -1)
+ end = self->buf->b_ml.ml_line_count;
+
if (n < 0 || n > end - start)
{
PyErr_SetString(PyExc_IndexError, _("line number out of range"));
***************
*** 2457,2462 ****
--- 2466,2474 ----
if (CheckBuffer(self))
return -1;
+ if (end == -1)
+ end = self->buf->b_ml.ml_line_count;
+
/* Sort out the slice range */
size = end - start + 1;
***************
*** 2493,2498 ****
--- 2505,2513 ----
if (CheckBuffer(self))
return NULL;
+ if (end == -1)
+ end = self->buf->b_ml.ml_line_count;
+
max = n = end - start + 1;
if (!PyArg_ParseTuple(args, "O|n", &lines, &n))
***************
*** 2700,2714 ****
static PyObject *
BufferItem(PyObject *self, PyInt n)
{
! return RBItem((BufferObject *)(self), n, 1,
! (PyInt)((BufferObject *)(self))->buf->b_ml.ml_line_count);
}
static PyObject *
BufferSlice(PyObject *self, PyInt lo, PyInt hi)
{
! return RBSlice((BufferObject *)(self), lo, hi, 1,
! (PyInt)((BufferObject *)(self))->buf->b_ml.ml_line_count);
}
static PyObject *
--- 2715,2727 ----
static PyObject *
BufferItem(PyObject *self, PyInt n)
{
! return RBItem((BufferObject *)(self), n, 1, -1);
}
static PyObject *
BufferSlice(PyObject *self, PyInt lo, PyInt hi)
{
! return RBSlice((BufferObject *)(self), lo, hi, 1, -1);
}
static PyObject *
***************
*** 2732,2740 ****
static PyObject *
BufferAppend(PyObject *self, PyObject *args)
{
! return RBAppend((BufferObject *)(self), args, 1,
! (PyInt)((BufferObject *)(self))->buf->b_ml.ml_line_count,
! NULL);
}
static PyObject *
--- 2745,2751 ----
static PyObject *
BufferAppend(PyObject *self, PyObject *args)
{
! return RBAppend((BufferObject *)(self), args, 1, -1, NULL);
}
static PyObject *
*** ../vim-7.3.941/src/if_python.c 2013-05-12 19:45:30.000000000 +0200
--- src/if_python.c 2013-05-12 20:19:08.000000000 +0200
***************
*** 1073,1089 ****
static PyInt
BufferAssItem(PyObject *self, PyInt n, PyObject *val)
{
! return RBAsItem((BufferObject *)(self), n, val, 1,
! (PyInt)((BufferObject *)(self))->buf->b_ml.ml_line_count,
! NULL);
}
static PyInt
BufferAssSlice(PyObject *self, PyInt lo, PyInt hi, PyObject *val)
{
! return RBAsSlice((BufferObject *)(self), lo, hi, val, 1,
! (PyInt)((BufferObject *)(self))->buf->b_ml.ml_line_count,
! NULL);
}
static PySequenceMethods RangeAsSeq = {
--- 1073,1085 ----
static PyInt
BufferAssItem(PyObject *self, PyInt n, PyObject *val)
{
! return RBAsItem((BufferObject *)(self), n, val, 1, -1, NULL);
}
static PyInt
BufferAssSlice(PyObject *self, PyInt lo, PyInt hi, PyObject *val)
{
! return RBAsSlice((BufferObject *)(self), lo, hi, val, 1, -1, NULL);
}
static PySequenceMethods RangeAsSeq = {
*** ../vim-7.3.941/src/if_python3.c 2013-05-12 18:44:44.000000000 +0200
--- src/if_python3.c 2013-05-12 20:19:08.000000000 +0200
***************
*** 1110,1115 ****
--- 1110,1118 ----
{
Py_ssize_t start, stop, step, slicelen;
+ if (CheckBuffer((BufferObject *) self))
+ return NULL;
+
if (PySlice_GetIndicesEx((PyObject *)idx,
(Py_ssize_t)((BufferObject *)(self))->buf->b_ml.ml_line_count+1,
&start, &stop,
***************
*** 1139,1144 ****
--- 1142,1150 ----
{
Py_ssize_t start, stop, step, slicelen;
+ if (CheckBuffer((BufferObject *) self))
+ return -1;
+
if (PySlice_GetIndicesEx((PyObject *)idx,
(Py_ssize_t)((BufferObject *)(self))->buf->b_ml.ml_line_count+1,
&start, &stop,
*** ../vim-7.3.941/src/version.c 2013-05-12 19:45:30.000000000 +0200
--- src/version.c 2013-05-12 19:49:58.000000000 +0200
***************
*** 730,731 ****
--- 730,733 ----
{ /* Add new patch number below this line */
+ /**/
+ 942,
/**/
--
Vim is like Emacs without all the typing. (John "Johann" Spetz)
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///

267
7.3.943 Normal file
View File

@ -0,0 +1,267 @@
To: vim_dev@googlegroups.com
Subject: Patch 7.3.943
Fcc: outbox
From: Bram Moolenaar <Bram@moolenaar.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
------------
Patch 7.3.943
Problem: Python: Negative indices were failing.
Solution: Fix negative indices. Add tests. (ZyX)
Files: src/if_py_both.h, src/if_python3.c, src/testdir/test86.in,
src/testdir/test86.ok, src/testdir/test87.in,
src/testdir/test87.ok
*** ../vim-7.3.942/src/if_py_both.h 2013-05-12 20:36:09.000000000 +0200
--- src/if_py_both.h 2013-05-12 21:10:03.000000000 +0200
***************
*** 2394,2399 ****
--- 2394,2402 ----
if (end == -1)
end = self->buf->b_ml.ml_line_count;
+ if (n < 0)
+ n += end - start + 1;
+
if (n < 0 || n > end - start)
{
PyErr_SetString(PyExc_IndexError, _("line number out of range"));
***************
*** 2441,2446 ****
--- 2444,2452 ----
if (end == -1)
end = self->buf->b_ml.ml_line_count;
+ if (n < 0)
+ n += end - start + 1;
+
if (n < 0 || n > end - start)
{
PyErr_SetString(PyExc_IndexError, _("line number out of range"));
*** ../vim-7.3.942/src/if_python3.c 2013-05-12 20:36:09.000000000 +0200
--- src/if_python3.c 2013-05-12 21:10:03.000000000 +0200
***************
*** 1114,1120 ****
return NULL;
if (PySlice_GetIndicesEx((PyObject *)idx,
! (Py_ssize_t)((BufferObject *)(self))->buf->b_ml.ml_line_count+1,
&start, &stop,
&step, &slicelen) < 0)
{
--- 1114,1120 ----
return NULL;
if (PySlice_GetIndicesEx((PyObject *)idx,
! (Py_ssize_t)((BufferObject *)(self))->buf->b_ml.ml_line_count,
&start, &stop,
&step, &slicelen) < 0)
{
***************
*** 1146,1152 ****
return -1;
if (PySlice_GetIndicesEx((PyObject *)idx,
! (Py_ssize_t)((BufferObject *)(self))->buf->b_ml.ml_line_count+1,
&start, &stop,
&step, &slicelen) < 0)
{
--- 1146,1152 ----
return -1;
if (PySlice_GetIndicesEx((PyObject *)idx,
! (Py_ssize_t)((BufferObject *)(self))->buf->b_ml.ml_line_count,
&start, &stop,
&step, &slicelen) < 0)
{
*** ../vim-7.3.942/src/testdir/test86.in 2013-05-06 03:52:44.000000000 +0200
--- src/testdir/test86.in 2013-05-12 21:11:43.000000000 +0200
***************
*** 475,483 ****
: endtry
: endfor
: call RecVars(oname)
- endtry
:endfor
:only
:endfun
:"
:call Test()
--- 475,524 ----
: endtry
: endfor
: call RecVars(oname)
:endfor
:only
+ :"
+ :" Test buffer object
+ :vnew
+ :put ='First line'
+ :put ='Second line'
+ :put ='Third line'
+ :1 delete _
+ :py b=vim.current.buffer
+ :wincmd w
+ :mark a
+ py << EOF
+ cb = vim.current.buffer
+ # Tests BufferAppend and BufferItem
+ cb.append(b[0])
+ # Tests BufferSlice and BufferAssSlice
+ cb.append('abc') # Will be overwritten
+ cb[-1:] = b[:-2]
+ # Test BufferLength and BufferAssSlice
+ cb.append('def') # Will not be overwritten
+ cb[len(cb):] = b[:]
+ # Test BufferAssItem and BufferMark
+ cb.append('ghi') # Will be overwritten
+ cb[-1] = repr((len(cb) - cb.mark('a')[0], cb.mark('a')[1]))
+ # Test BufferRepr
+ cb.append(repr(cb) + repr(b))
+ # Modify foreign buffer
+ b.append('foo')
+ b[0]='bar'
+ b[0:0]=['baz']
+ vim.command('call append("$", getbufline(%i, 1, "$"))' % b.number)
+ # Test CheckBuffer
+ vim.command('bwipeout! ' + str(b.number))
+ for expr in ('b[1]','b[:] = ["A", "B"]','b[:]','b.append("abc")'):
+ try:
+ exec(expr)
+ except vim.error:
+ pass
+ else:
+ # Usually a SEGV here
+ # Should not happen in any case
+ cb.append('No exception for ' + expr)
+ EOF
:endfun
:"
:call Test()
*** ../vim-7.3.942/src/testdir/test86.ok 2013-05-06 03:52:44.000000000 +0200
--- src/testdir/test86.ok 2013-05-12 21:11:43.000000000 +0200
***************
*** 306,308 ****
--- 306,321 ----
G: '.,,'
W: 1:',,' 2:'.,,' 3:'.,,' 4:'.,,'
B: 1:',,' 2:'.,,' 3:'.,,' 4:'.,,'
+ First line
+ First line
+ def
+ First line
+ Second line
+ Third line
+ (7, 2)
+ <buffer test86.in><buffer >
+ baz
+ bar
+ Second line
+ Third line
+ foo
*** ../vim-7.3.942/src/testdir/test87.in 2013-05-06 03:52:44.000000000 +0200
--- src/testdir/test87.in 2013-05-12 21:11:43.000000000 +0200
***************
*** 444,452 ****
: endtry
: endfor
: call RecVars(oname)
- endtry
:endfor
:only
:endfun
:"
:call Test()
--- 444,493 ----
: endtry
: endfor
: call RecVars(oname)
:endfor
:only
+ :"
+ :" Test buffer object
+ :vnew
+ :put ='First line'
+ :put ='Second line'
+ :put ='Third line'
+ :1 delete _
+ :py3 b=vim.current.buffer
+ :wincmd w
+ :mark a
+ py3 << EOF
+ cb = vim.current.buffer
+ # Tests BufferAppend and BufferItem
+ cb.append(b[0])
+ # Tests BufferSlice and BufferAssSlice
+ cb.append('abc') # Will be overwritten
+ cb[-1:] = b[:-2]
+ # Test BufferLength and BufferAssSlice
+ cb.append('def') # Will not be overwritten
+ cb[len(cb):] = b[:]
+ # Test BufferAssItem and BufferMark
+ cb.append('ghi') # Will be overwritten
+ cb[-1] = repr((len(cb) - cb.mark('a')[0], cb.mark('a')[1]))
+ # Test BufferRepr
+ cb.append(repr(cb) + repr(b))
+ # Modify foreign buffer
+ b.append('foo')
+ b[0]='bar'
+ b[0:0]=['baz']
+ vim.command('call append("$", getbufline(%i, 1, "$"))' % b.number)
+ # Test CheckBuffer
+ vim.command('bwipeout! ' + str(b.number))
+ for expr in ('b[1]','b[:] = ["A", "B"]','b[:]','b.append("abc")'):
+ try:
+ exec(expr)
+ except vim.error:
+ pass
+ else:
+ # Usually a SEGV here
+ # Should not happen in any case
+ cb.append('No exception for ' + expr)
+ EOF
:endfun
:"
:call Test()
*** ../vim-7.3.942/src/testdir/test87.ok 2013-05-06 03:52:44.000000000 +0200
--- src/testdir/test87.ok 2013-05-12 21:11:43.000000000 +0200
***************
*** 295,297 ****
--- 295,310 ----
G: '.,,'
W: 1:',,' 2:'.,,' 3:'.,,' 4:'.,,'
B: 1:',,' 2:'.,,' 3:'.,,' 4:'.,,'
+ First line
+ First line
+ def
+ First line
+ Second line
+ Third line
+ (7, 2)
+ <buffer test87.in><buffer >
+ baz
+ bar
+ Second line
+ Third line
+ foo
*** ../vim-7.3.942/src/version.c 2013-05-12 20:36:09.000000000 +0200
--- src/version.c 2013-05-12 21:11:53.000000000 +0200
***************
*** 730,731 ****
--- 730,733 ----
{ /* Add new patch number below this line */
+ /**/
+ 943,
/**/
--
Q: Is selling software the same as selling hardware?
A: No, good hardware is sold new, good software has already been used by many.
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///

View File

@ -869,7 +869,7 @@ Individual patches for Vim 7.3:
1755 7.3.835 "xxd -i" fails on an empty file 1755 7.3.835 "xxd -i" fails on an empty file
59985 7.3.836 clipboard does not work on Win32 when compiled with Cygwin 59985 7.3.836 clipboard does not work on Win32 when compiled with Cygwin
2221 7.3.837 empty lines in :version output when 'columns' is 320 2221 7.3.837 empty lines in :version output when 'columns' is 320
11082 7.3.838 (after 7.3.830) insufficient testing for mksession 11057 7.3.838 (after 7.3.830) insufficient testing for mksession
2012 7.3.839 some files missing in the list of distributed files 2012 7.3.839 some files missing in the list of distributed files
1652 7.3.840 "\@<!" in regexp does not work correctly with cp932 1652 7.3.840 "\@<!" in regexp does not work correctly with cp932
2073 7.3.841 parse error in "cond ? one : two" expression with a subscript 2073 7.3.841 parse error in "cond ? one : two" expression with a subscript
@ -935,3 +935,43 @@ Individual patches for Vim 7.3:
2748 7.3.901 outdated comment, ugly condition 2748 7.3.901 outdated comment, ugly condition
1345 7.3.902 tabline not updated when deleting last buffer in other tab 1345 7.3.902 tabline not updated when deleting last buffer in other tab
1827 7.3.903 (after 7.3.892) crash on exit writing viminfo 1827 7.3.903 (after 7.3.892) crash on exit writing viminfo
1465 7.3.904 (after 7.3.893) using memory freed by the garbage collector
1394 7.3.905 (after 7.3.903) crash when writing viminfo
1796 7.3.906 the "sleep .2" for running tests does not work on Solaris
5559 7.3.907 Python uses IndexError when a dict key is not found
1307 7.3.908 possible crash when using a list in Python
57917 7.3.909 duplicate Python code
2955 7.3.910 Python code in #ifdef branches with only minor differences
11651 7.3.911 Python: Access to Vim variables is not so easy
1673 7.3.912 typing ":" at hit-enter dialog fails if the a file changed
2166 7.3.913 (after 7.3.905) still a crash when writing viminfo
1966 7.3.914 ~/.viminfo is messed up when running tests
1461 7.3.915 next encoding in 'fencs' is not used if error at the end
3213 7.3.916 using freed memory when pasting with the mouse (Issue 130)
2504 7.3.917 when a path ends in backslash appending a comma fails
2634 7.3.918 repeating Ex command after using Visual motion does not work
1777 7.3.919 (after 7.3.788) empty nl.po file does not work with old msgfmt
1578 7.3.920 compiler warning for size_t to int
1840 7.3.921 trying to create a fontset handle when 'guifontset' is not set
2073 7.3.922 no test for what 7.3.918 fixes
3123 7.3.923 configure check for X11 header files fails on Solaris
44449 7.3.924 Python interface can't easily access options
99193 7.3.925 typos in source code and build files
26424 7.3.926 triggering autocommands is wrong for :tabclose et al.
4329 7.3.927 missing combining characters when putting text in a register
2141 7.3.928 (after 7.3.924) can't build with strict C compiler
4270 7.3.929 (after 7.3.924) unused variable, not freeing unused string
1375 7.3.930 MSVC 2012 update is not recognized
1915 7.3.931 no completion for :xmap and :smap
1388 7.3.932 compiler warning for uninitialized variable
4739 7.3.933 Ruby on Mac crashes due to GC failure
2023 7.3.934 E381 and E380 make the user think nothing happened
3655 7.3.935 (after 7.3.933) Ruby init stack differs on 64 bit systems
23271 7.3.936 (after 7.3.935) Ruby missing piece for static 64 bit linking
16512 7.3.937 more can be shared between Python 2 and 3
4418 7.3.938 Python: not so easy to get the window number
2053 7.3.939 Using Py_BuildValue is inefficient sometimes
3030 7.3.940 Python: Can't get position of window
32095 7.3.941 Python: Stuff in if_py_both.h is ordered badly
5470 7.3.942 Python: SEGV in Buffer functions
6867 7.3.943 Python: Negative indices were failing

15
vim-7.3-rubyversion.patch Normal file
View File

@ -0,0 +1,15 @@
diff -up vim73/src/configure.in.rubyversion vim73/src/configure.in
--- vim73/src/configure.in.rubyversion 2013-05-08 16:21:11.067927960 +0200
+++ vim73/src/configure.in 2013-05-08 16:31:05.854534820 +0200
@@ -1490,7 +1490,10 @@ if test "$enable_rubyinterp" = "yes" -o
if test -d "$rubyhdrdir/$rubyarch"; then
RUBY_CFLAGS="$RUBY_CFLAGS -I$rubyhdrdir/$rubyarch"
fi
- rubyversion=`$vi_cv_path_ruby -r rbconfig -e "print $ruby_rbconfig::CONFIG[['ruby_version']].gsub(/\./, '')[[0,2]]"`
+ rubymajor=`$vi_cv_path_ruby -r rbconfig -e "print $ruby_rbconfig::CONFIG[['MAJOR']]"`
+ rubyminor=`$vi_cv_path_ruby -r rbconfig -e "print $ruby_rbconfig::CONFIG[['MINOR']]"`
+ rubyversion="$rubymajor$rubyminor"
+ # rubyversion=`$vi_cv_path_ruby -r rbconfig -e "print $ruby_rbconfig::CONFIG[['ruby_version']].gsub(/\./, '')[[0,2]]"`
RUBY_CFLAGS="$RUBY_CFLAGS -DRUBY_VERSION=$rubyversion"
rubylibs=`$vi_cv_path_ruby -r rbconfig -e "print $ruby_rbconfig::CONFIG[['LIBS']]"`
if test "X$rubylibs" != "X"; then

View File

@ -18,7 +18,7 @@
#used for pre-releases: #used for pre-releases:
%define beta %{nil} %define beta %{nil}
%define vimdir vim73%{?beta} %define vimdir vim73%{?beta}
%define patchlevel 903 %define patchlevel 943
Summary: The VIM editor Summary: The VIM editor
URL: http://www.vim.org/ URL: http://www.vim.org/
@ -959,6 +959,46 @@ Patch900: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.900
Patch901: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.901 Patch901: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.901
Patch902: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.902 Patch902: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.902
Patch903: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.903 Patch903: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.903
Patch904: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.904
Patch905: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.905
Patch906: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.906
Patch907: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.907
Patch908: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.908
Patch909: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.909
Patch910: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.910
Patch911: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.911
Patch912: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.912
Patch913: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.913
Patch914: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.914
Patch915: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.915
Patch916: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.916
Patch917: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.917
Patch918: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.918
Patch919: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.919
Patch920: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.920
Patch921: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.921
Patch922: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.922
Patch923: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.923
Patch924: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.924
Patch925: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.925
Patch926: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.926
Patch927: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.927
Patch928: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.928
Patch929: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.929
Patch930: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.930
Patch931: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.931
Patch932: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.932
Patch933: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.933
Patch934: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.934
Patch935: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.935
Patch936: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.936
Patch937: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.937
Patch938: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.938
Patch939: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.939
Patch940: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.940
Patch941: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.941
Patch942: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.942
Patch943: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.943
Patch3000: vim-7.3-syntax.patch Patch3000: vim-7.3-syntax.patch
Patch3002: vim-7.1-nowarnings.patch Patch3002: vim-7.1-nowarnings.patch
@ -971,6 +1011,7 @@ Patch3010: vim-7.0-specedit.patch
Patch3011: vim72-rh514717.patch Patch3011: vim72-rh514717.patch
Patch3012: vim-7.3-bug816848.patch Patch3012: vim-7.3-bug816848.patch
Patch3013: vim-7.3-manpage-typo-668894-675480.patch Patch3013: vim-7.3-manpage-typo-668894-675480.patch
Patch3014: vim-7.3-rubyversion.patch
Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: python-devel ncurses-devel gettext perl-devel BuildRequires: python-devel ncurses-devel gettext perl-devel
@ -2007,6 +2048,46 @@ perl -pi -e "s,bin/nawk,bin/awk,g" runtime/tools/mve.awk
%patch901 -p0 %patch901 -p0
%patch902 -p0 %patch902 -p0
%patch903 -p0 %patch903 -p0
%patch904 -p0
%patch905 -p0
%patch906 -p0
%patch907 -p0
%patch908 -p0
%patch909 -p0
%patch910 -p0
%patch911 -p0
%patch912 -p0
%patch913 -p0
%patch914 -p0
%patch915 -p0
%patch916 -p0
%patch917 -p0
%patch918 -p0
%patch919 -p0
%patch920 -p0
%patch921 -p0
%patch922 -p0
%patch923 -p0
%patch924 -p0
%patch925 -p0
%patch926 -p0
%patch927 -p0
%patch928 -p0
%patch929 -p0
%patch930 -p0
%patch931 -p0
%patch932 -p0
%patch933 -p0
%patch934 -p0
%patch935 -p0
%patch936 -p0
%patch937 -p0
%patch938 -p0
%patch939 -p0
%patch940 -p0
%patch941 -p0
%patch942 -p0
%patch943 -p0
# install spell files # install spell files
@ -2025,6 +2106,7 @@ perl -pi -e "s,bin/nawk,bin/awk,g" runtime/tools/mve.awk
%patch3011 -p1 %patch3011 -p1
%patch3012 -p1 %patch3012 -p1
%patch3013 -p1 %patch3013 -p1
%patch3014 -p1
%build %build
cp -f %{SOURCE5} . cp -f %{SOURCE5} .
@ -2482,6 +2564,15 @@ rm -rf $RPM_BUILD_ROOT
%{_datadir}/icons/hicolor/*/apps/* %{_datadir}/icons/hicolor/*/apps/*
%changelog %changelog
* Mon May 13 2013 Karsten Hopp <karsten@redhat.com> 7.3.943-1
- patchlevel 943
* Wed May 08 2013 Karsten Hopp <karsten@redhat.com> 7.3.931-1
- patchlevel 931
* Wed May 08 2013 Karsten Hopp <karsten@redhat.com> 7.3.903-1
- fix ruby version check
* Fri Apr 19 2013 Karsten Hopp <karsten@redhat.com> 7.3.903-1 * Fri Apr 19 2013 Karsten Hopp <karsten@redhat.com> 7.3.903-1
- drop crv patch - drop crv patch
- update 7.3.838 patch, it was broken upstream - update 7.3.838 patch, it was broken upstream