Mercurial > vim
comparison src/testdir/test_vim9_func.vim @ 22137:faaf88167b58 v8.2.1618
patch 8.2.1618: Vim9: cannot pass "true" to setloclist()
Commit: https://github.com/vim/vim/commit/401f0c07982247cc6d1cd22be08b05c44f7fd040
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Sep 5 22:37:39 2020 +0200
patch 8.2.1618: Vim9: cannot pass "true" to setloclist()
Problem: Vim9: cannot pass "true" to setloclist().
Solution: Use dict_get_bool(). (closes https://github.com/vim/vim/issues/6882)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 05 Sep 2020 22:45:03 +0200 |
parents | f45127fbe9ba |
children | c7fb7361df33 |
comparison
equal
deleted
inserted
replaced
22136:f9171654a423 | 22137:faaf88167b58 |
---|---|
1612 | 1612 |
1613 setbufvar('%', 'myvar', 123) | 1613 setbufvar('%', 'myvar', 123) |
1614 assert_equal(123, getbufvar('%', 'myvar')) | 1614 assert_equal(123, getbufvar('%', 'myvar')) |
1615 enddef | 1615 enddef |
1616 | 1616 |
1617 def Test_setloclist() | |
1618 let items = [#{filename: '/tmp/file', lnum: 1, valid: true}] | |
1619 let what = #{items: items} | |
1620 setqflist([], ' ', what) | |
1621 setloclist(0, [], ' ', what) | |
1622 enddef | |
1623 | |
1617 def Test_setreg() | 1624 def Test_setreg() |
1618 setreg('a', ['aaa', 'bbb', 'ccc']) | 1625 setreg('a', ['aaa', 'bbb', 'ccc']) |
1619 let reginfo = getreginfo('a') | 1626 let reginfo = getreginfo('a') |
1620 setreg('a', reginfo) | 1627 setreg('a', reginfo) |
1621 assert_equal(reginfo, getreginfo('a')) | 1628 assert_equal(reginfo, getreginfo('a')) |