Mercurial > vim
annotate src/testdir/test_python2.vim @ 13074:66c014c71dad v8.0.1412
patch 8.0.1412: using free memory using setloclist()
commit https://github.com/vim/vim/commit/12237448499aaeb8c4f2be7a1deda60c0f160627
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Dec 19 12:38:52 2017 +0100
patch 8.0.1412: using free memory using setloclist()
Problem: Using free memory using setloclist(). (Dominique Pelle)
Solution: Mark location list context as still in use when needed. (Yegappan
Lakshmanan, closes #2462)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Tue, 19 Dec 2017 12:45:06 +0100 |
parents | 27b42717662b |
children | c15bef307de6 |
rev | line source |
---|---|
10751
27b42717662b
patch 8.0.0265: may get ml_get error when :pydo deletes lines
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1 " Test for python 2 commands. |
27b42717662b
patch 8.0.0265: may get ml_get error when :pydo deletes lines
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2 " TODO: move tests from test87.in here. |
27b42717662b
patch 8.0.0265: may get ml_get error when :pydo deletes lines
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
3 |
27b42717662b
patch 8.0.0265: may get ml_get error when :pydo deletes lines
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
4 if !has('python') |
27b42717662b
patch 8.0.0265: may get ml_get error when :pydo deletes lines
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
5 finish |
27b42717662b
patch 8.0.0265: may get ml_get error when :pydo deletes lines
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
6 endif |
27b42717662b
patch 8.0.0265: may get ml_get error when :pydo deletes lines
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
7 |
27b42717662b
patch 8.0.0265: may get ml_get error when :pydo deletes lines
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
8 func Test_pydo() |
27b42717662b
patch 8.0.0265: may get ml_get error when :pydo deletes lines
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
9 " Check deleting lines does not trigger ml_get error. |
27b42717662b
patch 8.0.0265: may get ml_get error when :pydo deletes lines
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
10 py import vim |
27b42717662b
patch 8.0.0265: may get ml_get error when :pydo deletes lines
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
11 new |
27b42717662b
patch 8.0.0265: may get ml_get error when :pydo deletes lines
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
12 call setline(1, ['one', 'two', 'three']) |
27b42717662b
patch 8.0.0265: may get ml_get error when :pydo deletes lines
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
13 pydo vim.command("%d_") |
27b42717662b
patch 8.0.0265: may get ml_get error when :pydo deletes lines
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
14 bwipe! |
27b42717662b
patch 8.0.0265: may get ml_get error when :pydo deletes lines
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
15 |
27b42717662b
patch 8.0.0265: may get ml_get error when :pydo deletes lines
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
16 " Check switching to another buffer does not trigger ml_get error. |
27b42717662b
patch 8.0.0265: may get ml_get error when :pydo deletes lines
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
17 new |
27b42717662b
patch 8.0.0265: may get ml_get error when :pydo deletes lines
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
18 let wincount = winnr('$') |
27b42717662b
patch 8.0.0265: may get ml_get error when :pydo deletes lines
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
19 call setline(1, ['one', 'two', 'three']) |
27b42717662b
patch 8.0.0265: may get ml_get error when :pydo deletes lines
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
20 pydo vim.command("new") |
27b42717662b
patch 8.0.0265: may get ml_get error when :pydo deletes lines
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
21 call assert_equal(wincount + 1, winnr('$')) |
27b42717662b
patch 8.0.0265: may get ml_get error when :pydo deletes lines
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
22 bwipe! |
27b42717662b
patch 8.0.0265: may get ml_get error when :pydo deletes lines
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
23 bwipe! |
27b42717662b
patch 8.0.0265: may get ml_get error when :pydo deletes lines
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
24 endfunc |