0
0
mirror of https://github.com/vim/vim.git synced 2025-09-25 03:54:15 -04:00

patch 8.2.1146: not enough testing for Python

Problem:    Not enough testing for Python.
Solution:   Add more tests.  Fix uncovered problems. (Yegappan Lakshmanan,
            closes #6392)
This commit is contained in:
Bram Moolenaar
2020-07-06 21:03:06 +02:00
parent 0ad3e894d7
commit ab58946384
6 changed files with 630 additions and 130 deletions

View File

@@ -1256,6 +1256,10 @@ BufferAsSubscript(PyObject *self, PyObject* idx, PyObject* val)
if (PyLong_Check(idx))
{
long n = PyLong_AsLong(idx);
if (CheckBuffer((BufferObject *) self))
return -1;
return RBAsItem((BufferObject *)(self), n, val, 1,
(Py_ssize_t)((BufferObject *)(self))->buf->b_ml.ml_line_count,
NULL);