0
0
mirror of https://github.com/vim/vim.git synced 2025-09-24 03:44:06 -04:00

patch 8.2.1150: ml_get error when using Python

Problem:    ml_get error when using Python. (Yegappan Lakshmanan)
Solution:   Check the line number is not out of range.  Call "Check" with
            "fromObj" instead of "from".
This commit is contained in:
Bram Moolenaar
2020-07-07 20:12:54 +02:00
parent 007f9d6ed5
commit bb790dcc46
4 changed files with 24 additions and 17 deletions

View File

@@ -278,9 +278,9 @@ func Test_python_range()
py r[1:0] = ["d"]
call assert_equal(['c', 'd', 'a', 'two', 'three', 'b'], getline(1, '$'))
" FIXME: The following code triggers ml_get errors
" %d
" let x = pyeval('r[:]')
" The following code used to trigger an ml_get error
%d
let x = pyeval('r[:]')
" Non-existing range attribute
call AssertException(["let x = pyeval('r.abc')"],
@@ -332,9 +332,9 @@ func Test_python_window()
call AssertException(["py vim.current.window = w"],
\ 'Vim(python):vim.error: attempt to refer to deleted window')
" Try to set one of the options of the closed window
" FIXME: The following causes ASAN failure
"call AssertException(["py wopts['list'] = False"],
" \ 'vim.error: problem while switching windows')
" The following caused an ASAN failure
call AssertException(["py wopts['list'] = False"],
\ 'vim.error: attempt to refer to deleted window')
call assert_match('<window object (deleted)', pyeval("repr(w)"))
%bw!
endfunc