diff --git a/7.1.319 b/7.1.319 new file mode 100644 index 0000000..4a206c3 --- /dev/null +++ b/7.1.319 @@ -0,0 +1,56 @@ +To: vim-dev@vim.org +Subject: Patch 7.1.319 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.1.319 +Problem: When a register has an illegal utf-8 sequence, pasting it on the + command line causes an illegal memory access. +Solution: Use mb_cptr2char_adv(). (Dominique Pelle) +Files: src/ex_getln.c + + +*** ../vim-7.1.318/src/ex_getln.c Thu May 29 15:33:13 2008 +--- src/ex_getln.c Mon Jun 9 20:10:51 2008 +*************** +*** 3032,3041 **** + ++s; + #ifdef FEAT_MBYTE + if (has_mbyte) +! { +! c = mb_ptr2char(s); +! s += mb_char2len(c); +! } + else + #endif + c = *s++; +--- 3033,3039 ---- + ++s; + #ifdef FEAT_MBYTE + if (has_mbyte) +! c = mb_cptr2char_adv(&s); + else + #endif + c = *s++; +*** ../vim-7.1.318/src/version.c Fri Jun 20 11:58:27 2008 +--- src/version.c Fri Jun 20 12:53:16 2008 +*************** +*** 668,669 **** +--- 673,676 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 319, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +46. Your wife makes a new rule: "The computer cannot come to bed." + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/7.1.320 b/7.1.320 new file mode 100644 index 0000000..a732964 --- /dev/null +++ b/7.1.320 @@ -0,0 +1,1111 @@ +To: vim-dev@vim.org +Subject: Patch 7.1.320 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.1.320 (extra) +Problem: Win64: Warnings while compiling Python interface. +Solution: Use PyInt in more places. Also update version message for the + console. (George Reilly) +Files: src/if_python.c, src/version.c + + +*** ../vim-7.1.319/src/if_python.c Wed Jun 4 13:33:15 2008 +--- src/if_python.c Fri Jun 20 14:45:59 2008 +*************** +*** 50,60 **** + + #if !defined(FEAT_PYTHON) && defined(PROTO) + /* Use this to be able to generate prototypes without python being used. */ +! # define PyObject int +! # define PyThreadState int +! # define PyTypeObject int +! struct PyMethodDef { int a; }; +! # define PySequenceMethods int + #endif + + #if defined(PY_VERSION_HEX) && PY_VERSION_HEX >= 0x02050000 +--- 50,60 ---- + + #if !defined(FEAT_PYTHON) && defined(PROTO) + /* Use this to be able to generate prototypes without python being used. */ +! # define PyObject Py_ssize_t +! # define PyThreadState Py_ssize_t +! # define PyTypeObject Py_ssize_t +! struct PyMethodDef { Py_ssize_t a; }; +! # define PySequenceMethods Py_ssize_t + #endif + + #if defined(PY_VERSION_HEX) && PY_VERSION_HEX >= 0x02050000 +*************** +*** 64,69 **** +--- 64,70 ---- + # define PyIntIntArgFunc ssizessizeargfunc + # define PyIntObjArgProc ssizeobjargproc + # define PyIntIntObjArgProc ssizessizeobjargproc ++ # define Py_ssize_t_fmt "n" + #else + # define PyInt int + # define PyInquiry inquiry +*************** +*** 71,76 **** +--- 72,78 ---- + # define PyIntIntArgFunc intintargfunc + # define PyIntObjArgProc intobjargproc + # define PyIntIntObjArgProc intintobjargproc ++ # define Py_ssize_t_fmt "i" + #endif + + /* Parser flags */ +*************** +*** 85,93 **** + + #if defined(DYNAMIC_PYTHON) || defined(PROTO) + # ifndef DYNAMIC_PYTHON +! # define HINSTANCE int /* for generating prototypes */ + # endif + + /* + * Wrapper defines + */ +--- 87,104 ---- + + #if defined(DYNAMIC_PYTHON) || defined(PROTO) + # ifndef DYNAMIC_PYTHON +! # define HINSTANCE long_u /* for generating prototypes */ + # endif + ++ /* This makes if_python.c compile without warnings against Python 2.5 ++ * on Win32 and Win64. */ ++ #undef PyRun_SimpleString ++ #undef PyArg_Parse ++ #undef PyArg_ParseTuple ++ #undef Py_BuildValue ++ #undef Py_InitModule4 ++ #undef Py_InitModule4_64 ++ + /* + * Wrapper defines + */ +*************** +*** 269,275 **** +--- 280,290 ---- + {"PyType_Type", (PYTHON_PROC*)&dll_PyType_Type}, + {"Py_BuildValue", (PYTHON_PROC*)&dll_Py_BuildValue}, + {"Py_FindMethod", (PYTHON_PROC*)&dll_Py_FindMethod}, ++ # if (PY_VERSION_HEX >= 0x02050000) && SIZEOF_SIZE_T != SIZEOF_INT ++ {"Py_InitModule4_64", (PYTHON_PROC*)&dll_Py_InitModule4}, ++ # else + {"Py_InitModule4", (PYTHON_PROC*)&dll_Py_InitModule4}, ++ # endif + {"Py_Initialize", (PYTHON_PROC*)&dll_Py_Initialize}, + {"Py_Finalize", (PYTHON_PROC*)&dll_Py_Finalize}, + {"Py_IsInitialized", (PYTHON_PROC*)&dll_Py_IsInitialized}, +*************** +*** 339,346 **** + * TRUE, else FALSE. + */ + int +! python_enabled(verbose) +! int verbose; + { + return python_runtime_link_init(DYNAMIC_PYTHON_DLL, verbose) == OK; + } +--- 354,360 ---- + * TRUE, else FALSE. + */ + int +! python_enabled(int verbose) + { + return python_runtime_link_init(DYNAMIC_PYTHON_DLL, verbose) == OK; + } +*************** +*** 374,381 **** + */ + + static void DoPythonCommand(exarg_T *, const char *); +! static int RangeStart; +! static int RangeEnd; + + static void PythonIO_Flush(void); + static int PythonIO_Init(void); +--- 388,395 ---- + */ + + static void DoPythonCommand(exarg_T *, const char *); +! static PyInt RangeStart; +! static PyInt RangeEnd; + + static void PythonIO_Flush(void); + static int PythonIO_Init(void); +*************** +*** 384,395 **** + /* Utility functions for the vim/python interface + * ---------------------------------------------- + */ +! static PyObject *GetBufferLine(buf_T *, int); + static PyObject *GetBufferLineList(buf_T *, PyInt, PyInt); + +! static int SetBufferLine(buf_T *, int, PyObject *, int *); +! static int SetBufferLineList(buf_T *, PyInt, PyInt, PyObject *, int *); +! static int InsertBufferLines(buf_T *, int, PyObject *, int *); + + static PyObject *LineToString(const char *); + static char *StringToLine(PyObject *); +--- 398,409 ---- + /* Utility functions for the vim/python interface + * ---------------------------------------------- + */ +! static PyObject *GetBufferLine(buf_T *, PyInt); + static PyObject *GetBufferLineList(buf_T *, PyInt, PyInt); + +! static int SetBufferLine(buf_T *, PyInt, PyObject *, PyInt *); +! static int SetBufferLineList(buf_T *, PyInt, PyInt, PyObject *, PyInt *); +! static int InsertBufferLines(buf_T *, PyInt, PyObject *, PyInt *); + + static PyObject *LineToString(const char *); + static char *StringToLine(PyObject *); +*************** +*** 690,696 **** + static PyObject *OutputWritelines(PyObject *, PyObject *); + + typedef void (*writefn)(char_u *); +! static void writer(writefn fn, char_u *str, int n); + + /* Output object definition + */ +--- 704,710 ---- + static PyObject *OutputWritelines(PyObject *, PyObject *); + + typedef void (*writefn)(char_u *); +! static void writer(writefn fn, char_u *str, PyInt n); + + /* Output object definition + */ +*************** +*** 812,818 **** + { + PyObject *line = PyList_GetItem(list, i); + char *str; +! int len; + + if (!PyArg_Parse(line, "s#", &str, &len)) { + PyErr_SetString(PyExc_TypeError, _("writelines() requires list of strings")); +--- 826,832 ---- + { + PyObject *line = PyList_GetItem(list, i); + char *str; +! PyInt len; + + if (!PyArg_Parse(line, "s#", &str, &len)) { + PyErr_SetString(PyExc_TypeError, _("writelines() requires list of strings")); +*************** +*** 836,850 **** + */ + + static char_u *buffer = NULL; +! static int buffer_len = 0; +! static int buffer_size = 0; + + static writefn old_fn = NULL; + + static void +! buffer_ensure(int n) + { +! int new_size; + char_u *new_buffer; + + if (n < buffer_size) +--- 850,864 ---- + */ + + static char_u *buffer = NULL; +! static PyInt buffer_len = 0; +! static PyInt buffer_size = 0; + + static writefn old_fn = NULL; + + static void +! buffer_ensure(PyInt n) + { +! PyInt new_size; + char_u *new_buffer; + + if (n < buffer_size) +*************** +*** 884,890 **** + } + + static void +! writer(writefn fn, char_u *str, int n) + { + char_u *ptr; + +--- 898,904 ---- + } + + static void +! writer(writefn fn, char_u *str, PyInt n) + { + char_u *ptr; + +*************** +*** 895,901 **** + + while (n > 0 && (ptr = memchr(str, '\n', n)) != NULL) + { +! int len = ptr - str; + + buffer_ensure(buffer_len + len + 1); + +--- 909,915 ---- + + while (n > 0 && (ptr = memchr(str, '\n', n)) != NULL) + { +! PyInt len = ptr - str; + + buffer_ensure(buffer_len + len + 1); + +*************** +*** 1022,1035 **** + { + PyObject_HEAD + BufferObject *buf; +! int start; +! int end; + } + RangeObject; + + #define RangeType_Check(obj) ((obj)->ob_type == &RangeType) + +! static PyObject *RangeNew(buf_T *, int, int); + + static void RangeDestructor(PyObject *); + static PyObject *RangeGetattr(PyObject *, char *); +--- 1036,1049 ---- + { + PyObject_HEAD + BufferObject *buf; +! PyInt start; +! PyInt end; + } + RangeObject; + + #define RangeType_Check(obj) ((obj)->ob_type == &RangeType) + +! static PyObject *RangeNew(buf_T *, PyInt, PyInt); + + static void RangeDestructor(PyObject *); + static PyObject *RangeGetattr(PyObject *, char *); +*************** +*** 1069,1076 **** + + static struct PyMethodDef VimMethods[] = { + /* name, function, calling, documentation */ +! {"command", VimCommand, 1, "" }, +! {"eval", VimEval, 1, "" }, + { NULL, NULL, 0, NULL } + }; + +--- 1083,1090 ---- + + static struct PyMethodDef VimMethods[] = { + /* name, function, calling, documentation */ +! {"command", VimCommand, 1, "Execute a Vim ex-mode command" }, +! {"eval", VimEval, 1, "Evaluate an expression using Vim evaluator" }, + { NULL, NULL, 0, NULL } + }; + +*************** +*** 1110,1116 **** + * Function to translate a typval_T into a PyObject; this will recursively + * translate lists/dictionaries into their Python equivalents. + * +! * The depth parameter is too avoid infinite recursion, set it to 1 when + * you call VimToPython. + */ + static PyObject * +--- 1124,1130 ---- + * Function to translate a typval_T into a PyObject; this will recursively + * translate lists/dictionaries into their Python equivalents. + * +! * The depth parameter is to avoid infinite recursion, set it to 1 when + * you call VimToPython. + */ + static PyObject * +*************** +*** 1130,1136 **** + + /* Check if we run into a recursive loop. The item must be in lookupDict + * then and we can use it again. */ +! sprintf(ptrBuf, "%ld", (long)our_tv); + result = PyDict_GetItemString(lookupDict, ptrBuf); + if (result != NULL) + Py_INCREF(result); +--- 1144,1150 ---- + + /* Check if we run into a recursive loop. The item must be in lookupDict + * then and we can use it again. */ +! sprintf(ptrBuf, PRINTF_DECIMAL_LONG_U, (long_u)our_tv); + result = PyDict_GetItemString(lookupDict, ptrBuf); + if (result != NULL) + Py_INCREF(result); +*************** +*** 1184,1190 **** + if (our_tv->vval.v_dict != NULL) + { + hashtab_T *ht = &our_tv->vval.v_dict->dv_hashtab; +! int todo = ht->ht_used; + hashitem_T *hi; + dictitem_T *di; + +--- 1198,1204 ---- + if (our_tv->vval.v_dict != NULL) + { + hashtab_T *ht = &our_tv->vval.v_dict->dv_hashtab; +! long_u todo = ht->ht_used; + hashitem_T *hi; + dictitem_T *di; + +*************** +*** 1273,1279 **** + } + + static PyObject * +! RBItem(BufferObject *self, PyInt n, int start, int end) + { + if (CheckBuffer(self)) + return NULL; +--- 1287,1293 ---- + } + + static PyObject * +! RBItem(BufferObject *self, PyInt n, PyInt start, PyInt end) + { + if (CheckBuffer(self)) + return NULL; +*************** +*** 1288,1294 **** + } + + static PyObject * +! RBSlice(BufferObject *self, PyInt lo, PyInt hi, int start, int end) + { + PyInt size; + +--- 1302,1308 ---- + } + + static PyObject * +! RBSlice(BufferObject *self, PyInt lo, PyInt hi, PyInt start, PyInt end) + { + PyInt size; + +*************** +*** 1312,1320 **** + } + + static PyInt +! RBAssItem(BufferObject *self, PyInt n, PyObject *val, int start, int end, int *new_end) + { +! int len_change; + + if (CheckBuffer(self)) + return -1; +--- 1326,1334 ---- + } + + static PyInt +! RBAssItem(BufferObject *self, PyInt n, PyObject *val, PyInt start, PyInt end, PyInt *new_end) + { +! PyInt len_change; + + if (CheckBuffer(self)) + return -1; +*************** +*** 1335,1344 **** + } + + static PyInt +! RBAssSlice(BufferObject *self, PyInt lo, PyInt hi, PyObject *val, int start, int end, int *new_end) + { +! int size; +! int len_change; + + /* Self must be a valid buffer */ + if (CheckBuffer(self)) +--- 1349,1358 ---- + } + + static PyInt +! RBAssSlice(BufferObject *self, PyInt lo, PyInt hi, PyObject *val, PyInt start, PyInt end, PyInt *new_end) + { +! PyInt size; +! PyInt len_change; + + /* Self must be a valid buffer */ + if (CheckBuffer(self)) +*************** +*** 1368,1386 **** + } + + static PyObject * +! RBAppend(BufferObject *self, PyObject *args, int start, int end, int *new_end) + { + PyObject *lines; +! int len_change; +! int max; +! int n; + + if (CheckBuffer(self)) + return NULL; + + max = n = end - start + 1; + +! if (!PyArg_ParseTuple(args, "O|i", &lines, &n)) + return NULL; + + if (n < 0 || n > max) +--- 1382,1400 ---- + } + + static PyObject * +! RBAppend(BufferObject *self, PyObject *args, PyInt start, PyInt end, PyInt *new_end) + { + PyObject *lines; +! PyInt len_change; +! PyInt max; +! PyInt n; + + if (CheckBuffer(self)) + return NULL; + + max = n = end - start + 1; + +! if (!PyArg_ParseTuple(args, "O|" Py_ssize_t_fmt, &lines, &n)) + return NULL; + + if (n < 0 || n > max) +*************** +*** 1405,1413 **** + + static struct PyMethodDef BufferMethods[] = { + /* name, function, calling, documentation */ +! {"append", BufferAppend, 1, "" }, +! {"mark", BufferMark, 1, "" }, +! {"range", BufferRange, 1, "" }, + { NULL, NULL, 0, NULL } + }; + +--- 1419,1427 ---- + + static struct PyMethodDef BufferMethods[] = { + /* name, function, calling, documentation */ +! {"append", BufferAppend, 1, "Append data to Vim buffer" }, +! {"mark", BufferMark, 1, "Return (row,col) representing position of named mark" }, +! {"range", BufferRange, 1, "Return a range object which represents the part of the given buffer between line numbers s and e" }, + { NULL, NULL, 0, NULL } + }; + +*************** +*** 1503,1511 **** + return NULL; + + if (strcmp(name, "name") == 0) +! return Py_BuildValue("s",this->buf->b_ffname); + else if (strcmp(name, "number") == 0) +! return Py_BuildValue("i",this->buf->b_fnum); + else if (strcmp(name,"__members__") == 0) + return Py_BuildValue("[ss]", "name", "number"); + else +--- 1517,1525 ---- + return NULL; + + if (strcmp(name, "name") == 0) +! 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 +*************** +*** 1520,1533 **** + + if (this->buf == INVALID_BUFFER_VALUE) + { +! vim_snprintf(repr, 100, _(""), +! (long)(self)); + return PyString_FromString(repr); + } + else + { + char *name = (char *)this->buf->b_fname; +! int len; + + if (name == NULL) + name = ""; +--- 1534,1546 ---- + + if (this->buf == INVALID_BUFFER_VALUE) + { +! vim_snprintf(repr, 100, _(""), (self)); + return PyString_FromString(repr); + } + else + { + char *name = (char *)this->buf->b_fname; +! PyInt len; + + if (name == NULL) + name = ""; +*************** +*** 1572,1578 **** + BufferAssItem(PyObject *self, PyInt n, PyObject *val) + { + return RBAssItem((BufferObject *)(self), n, val, 1, +! (int)((BufferObject *)(self))->buf->b_ml.ml_line_count, + NULL); + } + +--- 1585,1591 ---- + BufferAssItem(PyObject *self, PyInt n, PyObject *val) + { + return RBAssItem((BufferObject *)(self), n, val, 1, +! (PyInt)((BufferObject *)(self))->buf->b_ml.ml_line_count, + NULL); + } + +*************** +*** 1580,1586 **** + BufferAssSlice(PyObject *self, PyInt lo, PyInt hi, PyObject *val) + { + return RBAssSlice((BufferObject *)(self), lo, hi, val, 1, +! (int)((BufferObject *)(self))->buf->b_ml.ml_line_count, + NULL); + } + +--- 1593,1599 ---- + BufferAssSlice(PyObject *self, PyInt lo, PyInt hi, PyObject *val) + { + return RBAssSlice((BufferObject *)(self), lo, hi, val, 1, +! (PyInt)((BufferObject *)(self))->buf->b_ml.ml_line_count, + NULL); + } + +*************** +*** 1588,1594 **** + BufferAppend(PyObject *self, PyObject *args) + { + return RBAppend((BufferObject *)(self), args, 1, +! (int)((BufferObject *)(self))->buf->b_ml.ml_line_count, + NULL); + } + +--- 1601,1607 ---- + BufferAppend(PyObject *self, PyObject *args) + { + return RBAppend((BufferObject *)(self), args, 1, +! (PyInt)((BufferObject *)(self))->buf->b_ml.ml_line_count, + NULL); + } + +*************** +*** 1633,1645 **** + static PyObject * + BufferRange(PyObject *self, PyObject *args) + { +! int start; +! int end; + + if (CheckBuffer((BufferObject *)(self))) + return NULL; + +! if (!PyArg_ParseTuple(args, "ii", &start, &end)) + return NULL; + + return RangeNew(((BufferObject *)(self))->buf, start, end); +--- 1646,1658 ---- + static PyObject * + BufferRange(PyObject *self, PyObject *args) + { +! PyInt start; +! PyInt end; + + if (CheckBuffer((BufferObject *)(self))) + return NULL; + +! if (!PyArg_ParseTuple(args, Py_ssize_t_fmt Py_ssize_t_fmt, &start, &end)) + return NULL; + + return RangeNew(((BufferObject *)(self))->buf, start, end); +*************** +*** 1650,1656 **** + + static struct PyMethodDef RangeMethods[] = { + /* name, function, calling, documentation */ +! {"append", RangeAppend, 1, "" }, + { NULL, NULL, 0, NULL } + }; + +--- 1663,1669 ---- + + static struct PyMethodDef RangeMethods[] = { + /* name, function, calling, documentation */ +! {"append", RangeAppend, 1, "Append data to the Vim range" }, + { NULL, NULL, 0, NULL } + }; + +*************** +*** 1691,1697 **** + */ + + static PyObject * +! RangeNew(buf_T *buf, int start, int end) + { + BufferObject *bufr; + RangeObject *self; +--- 1704,1710 ---- + */ + + static PyObject * +! RangeNew(buf_T *buf, PyInt start, PyInt end) + { + BufferObject *bufr; + RangeObject *self; +*************** +*** 1725,1733 **** + RangeGetattr(PyObject *self, char *name) + { + if (strcmp(name, "start") == 0) +! return Py_BuildValue("i",((RangeObject *)(self))->start - 1); + else if (strcmp(name, "end") == 0) +! return Py_BuildValue("i",((RangeObject *)(self))->end - 1); + else + return Py_FindMethod(RangeMethods, self, name); + } +--- 1738,1746 ---- + RangeGetattr(PyObject *self, char *name) + { + if (strcmp(name, "start") == 0) +! return Py_BuildValue(Py_ssize_t_fmt, ((RangeObject *)(self))->start - 1); + else if (strcmp(name, "end") == 0) +! return Py_BuildValue(Py_ssize_t_fmt, ((RangeObject *)(self))->end - 1); + else + return Py_FindMethod(RangeMethods, self, name); + } +*************** +*** 1740,1747 **** + + if (this->buf->buf == INVALID_BUFFER_VALUE) + { +! vim_snprintf(repr, 100, "", +! (long)(self)); + return PyString_FromString(repr); + } + else +--- 1753,1760 ---- + + if (this->buf->buf == INVALID_BUFFER_VALUE) + { +! vim_snprintf(repr, 100, "", +! (self)); + return PyString_FromString(repr); + } + else +*************** +*** 1869,1875 **** + BufListLength(PyObject *self) + { + buf_T *b = firstbuf; +! int n = 0; + + while (b) + { +--- 1882,1888 ---- + BufListLength(PyObject *self) + { + buf_T *b = firstbuf; +! PyInt n = 0; + + while (b) + { +*************** +*** 2115,2122 **** + + if (this->win == INVALID_WINDOW_VALUE) + { +! vim_snprintf(repr, 100, _(""), +! (long)(self)); + return PyString_FromString(repr); + } + else +--- 2128,2134 ---- + + if (this->win == INVALID_WINDOW_VALUE) + { +! vim_snprintf(repr, 100, _(""), (self)); + return PyString_FromString(repr); + } + else +*************** +*** 2128,2135 **** + ++i; + + if (w == NULL) +! vim_snprintf(repr, 100, _(""), +! (long)(self)); + else + vim_snprintf(repr, 100, _(""), i); + +--- 2140,2147 ---- + ++i; + + if (w == NULL) +! vim_snprintf(repr, 100, _(""), +! (self)); + else + vim_snprintf(repr, 100, _(""), i); + +*************** +*** 2186,2192 **** + WinListLength(PyObject *self) + { + win_T *w = firstwin; +! int n = 0; + + while (w != NULL) + { +--- 2198,2204 ---- + WinListLength(PyObject *self) + { + win_T *w = firstwin; +! PyInt n = 0; + + while (w != NULL) + { +*************** +*** 2254,2260 **** + else if (strcmp(name, "window") == 0) + return (PyObject *)WindowNew(curwin); + else if (strcmp(name, "line") == 0) +! return GetBufferLine(curbuf, (int)curwin->w_cursor.lnum); + else if (strcmp(name, "range") == 0) + return RangeNew(curbuf, RangeStart, RangeEnd); + else if (strcmp(name,"__members__") == 0) +--- 2266,2272 ---- + else if (strcmp(name, "window") == 0) + return (PyObject *)WindowNew(curwin); + else if (strcmp(name, "line") == 0) +! return GetBufferLine(curbuf, (PyInt)curwin->w_cursor.lnum); + else if (strcmp(name, "range") == 0) + return RangeNew(curbuf, RangeStart, RangeEnd); + else if (strcmp(name,"__members__") == 0) +*************** +*** 2272,2278 **** + { + if (strcmp(name, "line") == 0) + { +! if (SetBufferLine(curbuf, (int)curwin->w_cursor.lnum, value, NULL) == FAIL) + return -1; + + return 0; +--- 2284,2290 ---- + { + if (strcmp(name, "line") == 0) + { +! if (SetBufferLine(curbuf, (PyInt)curwin->w_cursor.lnum, value, NULL) == FAIL) + return -1; + + return 0; +*************** +*** 2344,2350 **** + /* Set sys.argv[] to avoid a crash in warn(). */ + PySys_SetArgv(1, argv); + +! mod = Py_InitModule("vim", VimMethods); + dict = PyModule_GetDict(mod); + + VimError = Py_BuildValue("s", "vim.error"); +--- 2356,2362 ---- + /* Set sys.argv[] to avoid a crash in warn(). */ + PySys_SetArgv(1, argv); + +! mod = Py_InitModule4("vim", VimMethods, (char *)NULL, (PyObject *)NULL, PYTHON_API_VERSION); + dict = PyModule_GetDict(mod); + + VimError = Py_BuildValue("s", "vim.error"); +*************** +*** 2369,2375 **** + * string object. + */ + static PyObject * +! GetBufferLine(buf_T *buf, int n) + { + return LineToString((char *)ml_get_buf(buf, (linenr_T)n, FALSE)); + } +--- 2381,2387 ---- + * string object. + */ + static PyObject * +! GetBufferLine(buf_T *buf, PyInt n) + { + return LineToString((char *)ml_get_buf(buf, (linenr_T)n, FALSE)); + } +*************** +*** 2422,2428 **** + * deleted). + */ + static void +! py_fix_cursor(int lo, int hi, int extra) + { + if (curwin->w_cursor.lnum >= lo) + { +--- 2434,2440 ---- + * deleted). + */ + static void +! py_fix_cursor(linenr_T lo, linenr_T hi, linenr_T extra) + { + if (curwin->w_cursor.lnum >= lo) + { +*************** +*** 2454,2460 **** + * is set to the change in the buffer length. + */ + static int +! SetBufferLine(buf_T *buf, int n, PyObject *line, int *len_change) + { + /* First of all, we check the thpe of the supplied Python object. + * There are three cases: +--- 2466,2472 ---- + * is set to the change in the buffer length. + */ + static int +! SetBufferLine(buf_T *buf, PyInt n, PyObject *line, PyInt *len_change) + { + /* First of all, we check the thpe of the supplied Python object. + * There are three cases: +*************** +*** 2477,2483 **** + { + deleted_lines_mark((linenr_T)n, 1L); + if (buf == curwin->w_buffer) +! py_fix_cursor(n, n + 1, -1); + } + + curbuf = savebuf; +--- 2489,2495 ---- + { + deleted_lines_mark((linenr_T)n, 1L); + if (buf == curwin->w_buffer) +! py_fix_cursor((linenr_T)n, (linenr_T)n + 1, (linenr_T)-1); + } + + curbuf = savebuf; +*************** +*** 2545,2551 **** + * is set to the change in the buffer length. + */ + static int +! SetBufferLineList(buf_T *buf, PyInt lo, PyInt hi, PyObject *list, int *len_change) + { + /* First of all, we check the thpe of the supplied Python object. + * There are three cases: +--- 2557,2563 ---- + * is set to the change in the buffer length. + */ + static int +! SetBufferLineList(buf_T *buf, PyInt lo, PyInt hi, PyObject *list, PyInt *len_change) + { + /* First of all, we check the thpe of the supplied Python object. + * There are three cases: +*************** +*** 2556,2562 **** + if (list == Py_None || list == NULL) + { + PyInt i; +! PyInt n = hi - lo; + buf_T *savebuf = curbuf; + + PyErr_Clear(); +--- 2568,2574 ---- + if (list == Py_None || list == NULL) + { + PyInt i; +! PyInt n = (int)(hi - lo); + buf_T *savebuf = curbuf; + + PyErr_Clear(); +*************** +*** 2577,2583 **** + deleted_lines_mark((linenr_T)lo, (long)i); + + if (buf == curwin->w_buffer) +! py_fix_cursor(lo, hi, -n); + } + + curbuf = savebuf; +--- 2589,2595 ---- + deleted_lines_mark((linenr_T)lo, (long)i); + + if (buf == curwin->w_buffer) +! py_fix_cursor((linenr_T)lo, (linenr_T)hi, (linenr_T)-n); + } + + curbuf = savebuf; +*************** +*** 2595,2601 **** + PyInt i; + PyInt new_len = PyList_Size(list); + PyInt old_len = hi - lo; +! int extra = 0; /* lines added to text, can be negative */ + char **array; + buf_T *savebuf; + +--- 2607,2613 ---- + PyInt i; + PyInt new_len = PyList_Size(list); + PyInt old_len = hi - lo; +! PyInt extra = 0; /* lines added to text, can be negative */ + char **array; + buf_T *savebuf; + +*************** +*** 2706,2712 **** + changed_lines((linenr_T)lo, 0, (linenr_T)hi, (long)extra); + + if (buf == curwin->w_buffer) +! py_fix_cursor(lo, hi, extra); + + curbuf = savebuf; + +--- 2718,2724 ---- + changed_lines((linenr_T)lo, 0, (linenr_T)hi, (long)extra); + + if (buf == curwin->w_buffer) +! py_fix_cursor((linenr_T)lo, (linenr_T)hi, (linenr_T)extra); + + curbuf = savebuf; + +*************** +*** 2734,2740 **** + * is set to the change in the buffer length. + */ + static int +! InsertBufferLines(buf_T *buf, int n, PyObject *lines, int *len_change) + { + /* First of all, we check the type of the supplied Python object. + * It must be a string or a list, or the call is in error. +--- 2746,2752 ---- + * is set to the change in the buffer length. + */ + static int +! InsertBufferLines(buf_T *buf, PyInt n, PyObject *lines, PyInt *len_change) + { + /* First of all, we check the type of the supplied Python object. + * It must be a string or a list, or the call is in error. +*** ../vim-7.1.319/src/version.c Fri Jun 20 12:55:28 2008 +--- src/version.c Fri Jun 20 16:25:28 2008 +*************** +*** 1367,1378 **** + # ifdef FEAT_GUI_W32 + # if defined(_MSC_VER) && (_MSC_VER <= 1010) + /* Only MS VC 4.1 and earlier can do Win32s */ +! MSG_PUTS(_("\nMS-Windows 16/32 bit GUI version")); + # else + # ifdef _WIN64 +! MSG_PUTS(_("\nMS-Windows 64 bit GUI version")); + # else +! MSG_PUTS(_("\nMS-Windows 32 bit GUI version")); + # endif + # endif + if (gui_is_win32s()) +--- 1374,1385 ---- + # ifdef FEAT_GUI_W32 + # if defined(_MSC_VER) && (_MSC_VER <= 1010) + /* Only MS VC 4.1 and earlier can do Win32s */ +! MSG_PUTS(_("\nMS-Windows 16/32-bit GUI version")); + # else + # ifdef _WIN64 +! MSG_PUTS(_("\nMS-Windows 64-bit GUI version")); + # else +! MSG_PUTS(_("\nMS-Windows 32-bit GUI version")); + # endif + # endif + if (gui_is_win32s()) +*************** +*** 1381,1397 **** + MSG_PUTS(_(" with OLE support")); + # endif + # else +! MSG_PUTS(_("\nMS-Windows 32 bit console version")); + # endif + #endif + #ifdef WIN16 +! MSG_PUTS(_("\nMS-Windows 16 bit version")); + #endif + #ifdef MSDOS + # ifdef DJGPP +! MSG_PUTS(_("\n32 bit MS-DOS version")); + # else +! MSG_PUTS(_("\n16 bit MS-DOS version")); + # endif + #endif + #ifdef MACOS +--- 1388,1408 ---- + MSG_PUTS(_(" with OLE support")); + # endif + # else +! # ifdef _WIN64 +! MSG_PUTS(_("\nMS-Windows 64-bit console version")); +! # else +! MSG_PUTS(_("\nMS-Windows 32-bit console version")); +! # endif + # endif + #endif + #ifdef WIN16 +! MSG_PUTS(_("\nMS-Windows 16-bit version")); + #endif + #ifdef MSDOS + # ifdef DJGPP +! MSG_PUTS(_("\n32-bit MS-DOS version")); + # else +! MSG_PUTS(_("\n16-bit MS-DOS version")); + # endif + #endif + #ifdef MACOS +*** ../vim-7.1.319/src/version.c Fri Jun 20 12:55:28 2008 +--- src/version.c Fri Jun 20 16:25:28 2008 +*************** +*** 668,669 **** +--- 673,676 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 320, + /**/ + +-- +The real +trick is +this: to +keep the +lines as +short as +possible +and keep +the size +the same +yet free +from the +need for +hyphena- +Dammit!! (Matthew Winn) + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/7.1.321 b/7.1.321 new file mode 100644 index 0000000..01657af --- /dev/null +++ b/7.1.321 @@ -0,0 +1,85 @@ +To: vim-dev@vim.org +Subject: Patch 7.1.321 (extra) +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.1.321 (extra) +Problem: Win32 / Win64: Install file is outdated. +Solution: Update the text for recent compiler. (George Reilly) +Files: src/INSTALLpc.txt + + +*** ../vim-7.1.320/src/INSTALLpc.txt Sun Mar 16 14:52:53 2008 +--- src/INSTALLpc.txt Fri Jun 20 13:39:35 2008 +*************** +*** 36,42 **** + Visual Studio + ------------- + +! Building with Visual Studio (VS 98, VS .NET, VS .NET 2003, and VS .NET 2005) + is straightforward. (These instructions should also work for VS 4 and VS 5.) + + To build Vim from the command line with MSVC, use Make_mvc.mak. +--- 36,42 ---- + Visual Studio + ------------- + +! Building with Visual Studio (VS 98, VS .NET, VS .NET 2003, VS 2005, and VS 2008) + is straightforward. (These instructions should also work for VS 4 and VS 5.) + + To build Vim from the command line with MSVC, use Make_mvc.mak. +*************** +*** 139,145 **** + is also available through the Platform SDK, |ms-platform-sdk|. + + +! Visual C++ 2005 Express Edition + ------------------------------- + + Visual C++ 2005 Express Edition can be downloaded for free from: +--- 139,145 ---- + is also available through the Platform SDK, |ms-platform-sdk|. + + +! Visual C++ 2005 Express Edition *msvc-2005-express* + ------------------------------- + + Visual C++ 2005 Express Edition can be downloaded for free from: +*************** +*** 159,164 **** +--- 159,172 ---- + This includes the IDE and the debugger. You can build Vim with Make_mvc.mak. + + ++ Visual C++ 2008 Express Edition *msvc-2008-express* ++ ------------------------------- ++ ++ Visual C++ 2008 Express Edition can be downloaded for free from: ++ http://msdn2.microsoft.com/en-us/express/default.aspx ++ This includes the IDE and the debugger. You can build Vim with Make_mvc.mak. ++ ++ + 2. MinGW + ======== + +*** ../vim-7.1.320/src/version.c Fri Jun 20 16:31:45 2008 +--- src/version.c Fri Jun 20 16:50:50 2008 +*************** +*** 668,669 **** +--- 673,676 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 321, + /**/ + +-- +CVS sux, men don't like commitment + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/7.1.322 b/7.1.322 new file mode 100644 index 0000000..7836393 --- /dev/null +++ b/7.1.322 @@ -0,0 +1,80 @@ +To: vim-dev@vim.org +Subject: Patch 7.1.322 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.1.322 +Problem: Can't get start of Visual area in an mapping. +Solution: Add the 'v' argument to getpos(). +Files: runtime/doc/eval.txt, src/eval.c + + +*** ../vim-7.1.321/runtime/doc/eval.txt Wed May 28 16:48:00 2008 +--- runtime/doc/eval.txt Thu Jun 19 22:46:23 2008 +*************** +*** 3515,3520 **** +--- 3635,3644 ---- + returned) + w0 first line visible in current window + w$ last line visible in current window ++ v In Visual mode: the start of the Visual area (the ++ cursor is the end). When not in Visual mode ++ returns the cursor position. Differs from |'<| in ++ that it's updated right away. + Note that a mark in another file can be used. The line number + then applies to another buffer. + To get the column number use |col()|. To get both use +*** ../vim-7.1.321/src/eval.c Thu May 29 21:46:10 2008 +--- src/eval.c Fri Jun 20 17:20:52 2008 +*************** +*** 16907,16915 **** + name = get_tv_string_chk(varp); + if (name == NULL) + return NULL; +! if (name[0] == '.') /* cursor */ + return &curwin->w_cursor; +! if (name[0] == '\'') /* mark */ + { + pp = getmark_fnum(name[1], FALSE, fnum); + if (pp == NULL || pp == (pos_T *)-1 || pp->lnum <= 0) +--- 17478,17494 ---- + name = get_tv_string_chk(varp); + if (name == NULL) + return NULL; +! if (name[0] == '.') /* cursor */ + return &curwin->w_cursor; +! #ifdef FEAT_VISUAL +! if (name[0] == 'v' && name[1] == NUL) /* Visual start */ +! { +! if (VIsual_active) +! return &VIsual; +! return &curwin->w_cursor; +! } +! #endif +! if (name[0] == '\'') /* mark */ + { + pp = getmark_fnum(name[1], FALSE, fnum); + if (pp == NULL || pp == (pos_T *)-1 || pp->lnum <= 0) +*** ../vim-7.1.321/src/version.c Fri Jun 20 16:51:54 2008 +--- src/version.c Fri Jun 20 17:27:30 2008 +*************** +*** 668,669 **** +--- 673,676 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 322, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +52. You ask a plumber how much it would cost to replace the chair in front of + your computer with a toilet. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/7.1.323 b/7.1.323 new file mode 100644 index 0000000..5929b22 --- /dev/null +++ b/7.1.323 @@ -0,0 +1,60 @@ +To: vim-dev@vim.org +Subject: Patch 7.1.323 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.1.323 +Problem: Test 19 fails with some termcaps. (Dominque Pelle) +Solution: Set the t_kb and t_kD termcap values. +Files: src/testdir/test19.in, src/testdir/test38.in + + +*** ../vim-7.1.322/src/testdir/test19.in Sun Jun 13 20:24:47 2004 +--- src/testdir/test19.in Mon Jun 16 19:45:10 2008 +*************** +*** 2,7 **** +--- 2,9 ---- + + STARTTEST + :set smarttab expandtab ts=8 sw=4 ++ :" make sure that backspace works, no matter what termcap is used ++ :set t_kD=x7f t_kb=x08 + /some + r :set noexpandtab + /other +*** ../vim-7.1.322/src/testdir/test38.in Sun Jun 13 20:28:25 2004 +--- src/testdir/test38.in Mon Jun 16 19:46:35 2008 +*************** +*** 3,8 **** +--- 3,10 ---- + + STARTTEST + :so small.vim ++ :" make sure that backspace works, no matter what termcap is used ++ :set t_kD=x7f t_kb=x08 + ggdGa + abcdefghi + jk lmn +*** ../vim-7.1.322/src/version.c Fri Jun 20 17:30:45 2008 +--- src/version.c Fri Jun 20 17:48:17 2008 +*************** +*** 668,669 **** +--- 673,676 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 323, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +53. To find out what time it is, you send yourself an e-mail and check the + "Date:" field. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/7.1.324 b/7.1.324 new file mode 100644 index 0000000..090497d --- /dev/null +++ b/7.1.324 @@ -0,0 +1,58 @@ +To: vim-dev@vim.org +Subject: Patch 7.1.324 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.1.324 +Problem: File name path length on Unix is limited to 1024. +Solution: Use PATH_MAX when it's more than 1000. +Files: src/os_unix.h + + +*** ../vim-7.1.323/src/os_unix.h Tue Jul 10 17:09:51 2007 +--- src/os_unix.h Tue Jun 17 20:01:17 2008 +*************** +*** 432,438 **** + * Unix has plenty of memory, use large buffers + */ + #define CMDBUFFSIZE 1024 /* size of the command processing buffer */ +! #define MAXPATHL 1024 /* Unix has long paths and plenty of memory */ + + #define CHECK_INODE /* used when checking if a swap file already + exists for a file */ +--- 432,444 ---- + * Unix has plenty of memory, use large buffers + */ + #define CMDBUFFSIZE 1024 /* size of the command processing buffer */ +! +! /* Use the system path length if it makes sense. */ +! #if defined(PATH_MAX) && (PATH_MAX > 1000) +! # define MAXPATHL PATH_MAX +! #else +! # define MAXPATHL 1024 +! #endif + + #define CHECK_INODE /* used when checking if a swap file already + exists for a file */ +*** ../vim-7.1.323/src/version.c Fri Jun 20 17:52:47 2008 +--- src/version.c Fri Jun 20 18:04:25 2008 +*************** +*** 668,669 **** +--- 673,676 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 324, + /**/ + +-- +Q: What is a patch 22? +A: A patch you need to include to make it possible to include patches. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/7.1.325 b/7.1.325 new file mode 100644 index 0000000..c2b9062 --- /dev/null +++ b/7.1.325 @@ -0,0 +1,117 @@ +To: vim-dev@vim.org +Subject: Patch 7.1.325 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.1.325 +Problem: When editing a command line that's longer than available space in + the window, the characters at the end are in reverse order. +Solution: Increment the insert position even when the command line doesn't + fit. (Ingo Karkat) +Files: src/ex_getln.c + + +*** ../vim-7.1.324/src/ex_getln.c Fri Jun 20 12:55:28 2008 +--- src/ex_getln.c Fri Jun 20 16:45:55 2008 +*************** +*** 2053,2062 **** + if (has_mbyte) + correct_cmdspos(i, c); + #endif +! /* If the cmdline doesn't fit, put cursor on last visible char. */ + if ((ccline.cmdspos += c) >= m) + { +- ccline.cmdpos = i - 1; + ccline.cmdspos -= c; + break; + } +--- 2053,2062 ---- + if (has_mbyte) + correct_cmdspos(i, c); + #endif +! /* If the cmdline doesn't fit, show cursor on last visible char. +! * Don't move the cursor itself, so we can still append. */ + if ((ccline.cmdspos += c) >= m) + { + ccline.cmdspos -= c; + break; + } +*************** +*** 2829,2838 **** + if (has_mbyte) + correct_cmdspos(ccline.cmdpos, c); + #endif +! /* Stop cursor at the end of the screen */ +! if (ccline.cmdspos + c >= m) +! break; +! ccline.cmdspos += c; + #ifdef FEAT_MBYTE + if (has_mbyte) + { +--- 2829,2839 ---- + if (has_mbyte) + correct_cmdspos(ccline.cmdpos, c); + #endif +! /* Stop cursor at the end of the screen, but do increment the +! * insert position, so that entering a very long command +! * works, even though you can't see it. */ +! if (ccline.cmdspos + c < m) +! ccline.cmdspos += c; + #ifdef FEAT_MBYTE + if (has_mbyte) + { +*************** +*** 3332,3338 **** + /* + * Do wildcard expansion on the string 'str'. + * Chars that should not be expanded must be preceded with a backslash. +! * Return a pointer to alloced memory containing the new string. + * Return NULL for failure. + * + * "orig" is the originally expanded string, copied to allocated memory. It +--- 3333,3339 ---- + /* + * Do wildcard expansion on the string 'str'. + * Chars that should not be expanded must be preceded with a backslash. +! * Return a pointer to allocated memory containing the new string. + * Return NULL for failure. + * + * "orig" is the originally expanded string, copied to allocated memory. It +*************** +*** 6111,6117 **** + + exmode_active = save_exmode; + +! /* Safety check: The old window or buffer was deleted: It's a a bug when + * this happens! */ + if (!win_valid(old_curwin) || !buf_valid(old_curbuf)) + { +--- 6112,6118 ---- + + exmode_active = save_exmode; + +! /* Safety check: The old window or buffer was deleted: It's a bug when + * this happens! */ + if (!win_valid(old_curwin) || !buf_valid(old_curbuf)) + { +*** ../vim-7.1.324/src/version.c Fri Jun 20 18:06:15 2008 +--- src/version.c Fri Jun 20 18:27:54 2008 +*************** +*** 668,669 **** +--- 673,676 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 325, + /**/ + +-- +"I can't complain, but sometimes I still do." (Joe Walsh) + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/7.1.326 b/7.1.326 new file mode 100644 index 0000000..dc9bc82 --- /dev/null +++ b/7.1.326 @@ -0,0 +1,57 @@ +To: vim-dev@vim.org +Subject: Patch 7.1.326 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.1.326 +Problem: ":s!from!to!" works, but ":smagic!from!to!" doesn't. It sees the + "!" as a flag to to the command. Same for ":snomagic". (Johan + Spetz) +Solution: When checking for a forced command also ignore ":smagic" and + ":snomagic". (Ian Kelling) +Files: src/ex_docmd.c + + +*** ../vim-7.1.325/src/ex_docmd.c Fri Jun 20 11:10:53 2008 +--- src/ex_docmd.c Fri Jun 20 10:42:30 2008 +*************** +*** 2142,2148 **** + + #endif + +! if (*p == '!' && ea.cmdidx != CMD_substitute) /* forced commands */ + { + ++p; + ea.forceit = TRUE; +--- 2142,2150 ---- + + #endif + +! /* forced commands */ +! if (*p == '!' && ea.cmdidx != CMD_substitute +! && ea.cmdidx != CMD_smagic && ea.cmdidx != CMD_snomagic) + { + ++p; + ea.forceit = TRUE; +*** ../vim-7.1.325/src/version.c Fri Jun 20 18:30:27 2008 +--- src/version.c Fri Jun 20 18:50:19 2008 +*************** +*** 668,669 **** +--- 673,676 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 326, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +55. You ask your doctor to implant a gig in your brain. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/7.1.327 b/7.1.327 new file mode 100644 index 0000000..6e27aaf --- /dev/null +++ b/7.1.327 @@ -0,0 +1,183 @@ +To: vim-dev@vim.org +Subject: Patch 7.1.327 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.1.327 +Problem: The GUI tutor is installed when there is no GUI version. +Solution: Only install gvimtutor when building a GUI version. +Files: src/Makefile + + +*** ../vim-7.1.326/src/Makefile Fri Jun 20 18:51:06 2008 +--- src/Makefile Fri Jun 20 21:26:46 2008 +*************** +*** 1113,1119 **** + GTK_LIBS_DIR = $(GUI_LIB_LOC) + GTK_LIBS1 = + GTK_LIBS2 = $(GTK_LIBNAME) +! GTK_INSTALL = install_normal + GTK_TARGETS = installglinks + GTK_MAN_TARGETS = yes + GTK_TESTTARGET = gui +--- 1113,1119 ---- + GTK_LIBS_DIR = $(GUI_LIB_LOC) + GTK_LIBS1 = + GTK_LIBS2 = $(GTK_LIBNAME) +! GTK_INSTALL = install_normal install_gui_extra + GTK_TARGETS = installglinks + GTK_MAN_TARGETS = yes + GTK_TESTTARGET = gui +*************** +*** 1130,1136 **** + MOTIF_LIBS_DIR = $(GUI_LIB_LOC) + MOTIF_LIBS1 = + MOTIF_LIBS2 = $(MOTIF_LIBNAME) -lXt +! MOTIF_INSTALL = install_normal + MOTIF_TARGETS = installglinks + MOTIF_MAN_TARGETS = yes + MOTIF_TESTTARGET = gui +--- 1130,1136 ---- + MOTIF_LIBS_DIR = $(GUI_LIB_LOC) + MOTIF_LIBS1 = + MOTIF_LIBS2 = $(MOTIF_LIBNAME) -lXt +! MOTIF_INSTALL = install_normal install_gui_extra + MOTIF_TARGETS = installglinks + MOTIF_MAN_TARGETS = yes + MOTIF_TESTTARGET = gui +*************** +*** 1160,1166 **** + ATHENA_LIBS_DIR = $(GUI_LIB_LOC) + ATHENA_LIBS1 = $(XAW_LIB) + ATHENA_LIBS2 = -lXt +! ATHENA_INSTALL = install_normal + ATHENA_TARGETS = installglinks + ATHENA_MAN_TARGETS = yes + ATHENA_TESTTARGET = gui +--- 1160,1166 ---- + ATHENA_LIBS_DIR = $(GUI_LIB_LOC) + ATHENA_LIBS1 = $(XAW_LIB) + ATHENA_LIBS2 = -lXt +! ATHENA_INSTALL = install_normal install_gui_extra + ATHENA_TARGETS = installglinks + ATHENA_MAN_TARGETS = yes + ATHENA_TESTTARGET = gui +*************** +*** 1178,1184 **** + NEXTAW_LIBS_DIR = $(GUI_LIB_LOC) + NEXTAW_LIBS1 = $(NEXTAW_LIB) + NEXTAW_LIBS2 = -lXt +! NEXTAW_INSTALL = install_normal + NEXTAW_TARGETS = installglinks + NEXTAW_MAN_TARGETS = yes + NEXTAW_TESTTARGET = gui +--- 1178,1184 ---- + NEXTAW_LIBS_DIR = $(GUI_LIB_LOC) + NEXTAW_LIBS1 = $(NEXTAW_LIB) + NEXTAW_LIBS2 = -lXt +! NEXTAW_INSTALL = install_normal install_gui_extra + NEXTAW_TARGETS = installglinks + NEXTAW_MAN_TARGETS = yes + NEXTAW_TESTTARGET = gui +*************** +*** 1203,1209 **** + PHOTONGUI_LIBS_DIR = + PHOTONGUI_LIBS1 = -lph -lphexlib + PHOTONGUI_LIBS2 = +! PHOTONGUI_INSTALL = install_normal + PHOTONGUI_TARGETS = installglinks + PHOTONGUI_MAN_TARGETS = yes + PHOTONGUI_TESTTARGET = gui +--- 1203,1209 ---- + PHOTONGUI_LIBS_DIR = + PHOTONGUI_LIBS1 = -lph -lphexlib + PHOTONGUI_LIBS2 = +! PHOTONGUI_INSTALL = install_normal install_gui_extra + PHOTONGUI_TARGETS = installglinks + PHOTONGUI_MAN_TARGETS = yes + PHOTONGUI_TESTTARGET = gui +*************** +*** 1219,1225 **** + CARBONGUI_LIBS_DIR = + CARBONGUI_LIBS1 = -framework Carbon + CARBONGUI_LIBS2 = +! CARBONGUI_INSTALL = install_macosx + CARBONGUI_TARGETS = + CARBONGUI_MAN_TARGETS = + CARBONGUI_TESTTARGET = gui +--- 1219,1225 ---- + CARBONGUI_LIBS_DIR = + CARBONGUI_LIBS1 = -framework Carbon + CARBONGUI_LIBS2 = +! CARBONGUI_INSTALL = install_macosx install_gui_extra + CARBONGUI_TARGETS = + CARBONGUI_MAN_TARGETS = + CARBONGUI_TESTTARGET = gui +*************** +*** 1741,1746 **** +--- 1741,1755 ---- + cd $(PODIR); $(MAKE) checkclean; \ + fi + ++ install: $(GUI_INSTALL) ++ ++ install_normal: installvim installtools $(INSTALL_LANGS) install-icons ++ ++ install_gui_extra: installgtutorbin ++ ++ installvim: installvimbin installtutorbin \ ++ installruntime installlinks installmanlinks ++ + # + # Avoid overwriting an existing executable, somebody might be running it and + # overwriting it could cause it to crash. Deleting it is OK, it won't be +*************** +*** 1750,1762 **** + # If you want to keep an older version, rename it before running "make + # install". + # +- install: $(GUI_INSTALL) +- +- install_normal: installvim installtools $(INSTALL_LANGS) install-icons +- +- installvim: installvimbin installtutorbin \ +- installruntime installlinks installmanlinks +- + installvimbin: $(VIMTARGET) $(DESTDIR)$(exec_prefix) $(DEST_BIN) + -if test -f $(DEST_BIN)/$(VIMTARGET); then \ + mv -f $(DEST_BIN)/$(VIMTARGET) $(DEST_BIN)/$(VIMNAME).rm; \ +--- 1759,1764 ---- +*************** +*** 1872,1877 **** +--- 1874,1881 ---- + installtutorbin: $(DEST_VIM) + $(INSTALL_DATA) vimtutor $(DEST_BIN)/$(VIMNAME)tutor + chmod $(SCRIPTMOD) $(DEST_BIN)/$(VIMNAME)tutor ++ ++ installgtutorbin: $(DEST_VIM) + $(INSTALL_DATA) gvimtutor $(DEST_BIN)/$(GVIMNAME)tutor + chmod $(SCRIPTMOD) $(DEST_BIN)/$(GVIMNAME)tutor + +*** ../vim-7.1.326/src/version.c Fri Jun 20 18:51:01 2008 +--- src/version.c Fri Jun 20 21:26:52 2008 +*************** +*** 668,669 **** +--- 673,676 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 327, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +56. You leave the modem speaker on after connecting because you think it + sounds like the ocean wind...the perfect soundtrack for "surfing the net". + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/7.1.328 b/7.1.328 new file mode 100644 index 0000000..61dd2b7 --- /dev/null +++ b/7.1.328 @@ -0,0 +1,66 @@ +To: vim-dev@vim.org +Subject: Patch 7.1.328 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.1.328 +Problem: Crash when using Cygwin and non-posix path name in tags file. +Solution: Use separate buffer for posix path. (Ben Schmidt) +Files: src/os_unix.c + + +*** ../vim-7.1.327/src/os_unix.c Fri Jun 20 11:58:27 2008 +--- src/os_unix.c Sat Jun 21 13:06:45 2008 +*************** +*** 2278,2283 **** +--- 2278,2287 ---- + char_u olddir[MAXPATHL]; + char_u *p; + int retval = OK; ++ #ifdef __CYGWIN__ ++ char_u posix_fname[MAX_PATH]; ++ #endif ++ + + #ifdef VMS + fname = vms_fixfilename(fname); +*************** +*** 2287,2293 **** + /* + * This helps for when "/etc/hosts" is a symlink to "c:/something/hosts". + */ +! cygwin_conv_to_posix_path(fname, fname); + #endif + + /* expand it if forced or not an absolute path */ +--- 2291,2298 ---- + /* + * This helps for when "/etc/hosts" is a symlink to "c:/something/hosts". + */ +! cygwin_conv_to_posix_path(fname, posix_fname); +! fname = posix_fname; + #endif + + /* expand it if forced or not an absolute path */ +*** ../vim-7.1.327/src/version.c Fri Jun 20 21:29:01 2008 +--- src/version.c Sat Jun 21 13:10:39 2008 +*************** +*** 668,669 **** +--- 673,676 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 328, + /**/ + +-- +Q: Should I clean my house or work on Vim? +A: Whatever contains more bugs. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/7.1.329 b/7.1.329 new file mode 100644 index 0000000..ce14344 --- /dev/null +++ b/7.1.329 @@ -0,0 +1,67 @@ +To: vim-dev@vim.org +Subject: Patch 7.1.329 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.1.329 +Problem: When the popup menu is removed a column of cells, the right halve + of double-wide characters, may not be redrawn. +Solution: Check if the right halve of a character needs to be redrawn. + (Yukihiro Nakadaira) +Files: src/screen.c + + +*** ../vim-7.1.328/src/screen.c Wed May 28 19:01:53 2008 +--- src/screen.c Sat Jun 21 14:09:02 2008 +*************** +*** 4863,4868 **** +--- 4863,4869 ---- + * - the (first byte of the) character is different + * - the attributes are different + * - the character is multi-byte and the next byte is different ++ * - the character is two cells wide and the second cell differs. + */ + static int + char_needs_redraw(off_from, off_to, cols) +*************** +*** 4884,4890 **** + || (enc_utf8 + && (ScreenLinesUC[off_from] != ScreenLinesUC[off_to] + || (ScreenLinesUC[off_from] != 0 +! && comp_char_differs(off_from, off_to)))) + #endif + )) + return TRUE; +--- 4885,4893 ---- + || (enc_utf8 + && (ScreenLinesUC[off_from] != ScreenLinesUC[off_to] + || (ScreenLinesUC[off_from] != 0 +! && comp_char_differs(off_from, off_to)) +! || (cols > 1 && ScreenLines[off_from + 1] +! != ScreenLines[off_to + 1]))) + #endif + )) + return TRUE; +*** ../vim-7.1.328/src/version.c Sat Jun 21 13:11:58 2008 +--- src/version.c Sat Jun 21 14:12:30 2008 +*************** +*** 668,669 **** +--- 673,676 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 329, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +61. Your best friends know your e-mail address, but neither your phone number + nor the address where you live. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/7.1.330 b/7.1.330 new file mode 100644 index 0000000..c3656a0 --- /dev/null +++ b/7.1.330 @@ -0,0 +1,75 @@ +To: vim-dev@vim.org +Subject: Patch 7.1.330 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.1.330 +Problem: Reading uninitialized memory when using Del in replace mode. +Solution: Use utfc_ptr2len_len() instead of mb_ptr2len(). (Dominique Pelle) +Files: src/misc1.c + + +*** ../vim-7.1.329/src/misc1.c Mon Feb 25 21:54:23 2008 +--- src/misc1.c Sat Jun 21 16:02:34 2008 +*************** +*** 1880,1894 **** + # ifdef FEAT_MBYTE + int n; + +! for (i = 0; i < len; i += n) +! { +! n = (*mb_ptr2len)(p + i); +! ins_char_bytes(p + i, n); +! } +! # else +! for (i = 0; i < len; ++i) +! ins_char(p[i]); + # endif + } + #endif + +--- 1880,1899 ---- + # ifdef FEAT_MBYTE + int n; + +! if (has_mbyte) +! for (i = 0; i < len; i += n) +! { +! if (enc_utf8) +! /* avoid reading past p[len] */ +! n = utfc_ptr2len_len(p + i, len - i); +! else +! n = (*mb_ptr2len)(p + i); +! ins_char_bytes(p + i, n); +! } +! else + # endif ++ for (i = 0; i < len; ++i) ++ ins_char(p[i]); + } + #endif + +*** ../vim-7.1.329/src/version.c Sat Jun 21 14:13:51 2008 +--- src/version.c Sat Jun 21 16:28:28 2008 +*************** +*** 668,669 **** +--- 673,676 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 330, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +65. The last time you looked at the clock it was 11:30pm, and in what + seems like only a few seconds later, your sister runs past you to + catch her 7am school bus. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org ///