Mercurial > vim
comparison src/testdir/test_vim9_func.vim @ 22025:71f886a48ef5 v8.2.1562
patch 8.2.1562: Vim9: error when using "%" where a buffer is expected
Commit: https://github.com/vim/vim/commit/3767e3a3302d745349eff8cfe45411f03e13de43
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Sep 1 23:06:01 2020 +0200
patch 8.2.1562: Vim9: error when using "%" where a buffer is expected
Problem: Vim9: error when using "%" where a buffer is expected.
Solution: Add tv_get_buf_from_arg(). (closes https://github.com/vim/vim/issues/6814)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Tue, 01 Sep 2020 23:15:03 +0200 |
parents | a9e60176dcd3 |
children | ee967cdcf749 |
comparison
equal
deleted
inserted
replaced
22024:dd2ca50d7e0a | 22025:71f886a48ef5 |
---|---|
1441 edit OtherFile | 1441 edit OtherFile |
1442 assert_equal('SomeFile', bufname('#')) | 1442 assert_equal('SomeFile', bufname('#')) |
1443 close | 1443 close |
1444 enddef | 1444 enddef |
1445 | 1445 |
1446 def Test_gebufinfo() | |
1447 let bufinfo = getbufinfo(bufnr()) | |
1448 assert_equal(bufinfo, getbufinfo('%')) | |
1449 enddef | |
1450 | |
1446 def Fibonacci(n: number): number | 1451 def Fibonacci(n: number): number |
1447 if n < 2 | 1452 if n < 2 |
1448 return n | 1453 return n |
1449 else | 1454 else |
1450 return Fibonacci(n - 1) + Fibonacci(n - 2) | 1455 return Fibonacci(n - 1) + Fibonacci(n - 2) |