Mercurial > vim
comparison src/testdir/test_vim9_func.vim @ 21855:c8456ff7a4c3 v8.2.1477
patch 8.2.1477: Vim9: error when using bufnr('%')
Commit: https://github.com/vim/vim/commit/f39397e515067d5a314be99778e63fe0acf93c51
Author: Bram Moolenaar <Bram@vim.org>
Date: Mon Aug 17 22:21:36 2020 +0200
patch 8.2.1477: Vim9: error when using bufnr('%')
Problem: Vim9: error when using bufnr('%').
Solution: Don't give an error for using a string argument. (closes https://github.com/vim/vim/issues/6723)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Mon, 17 Aug 2020 22:30:04 +0200 |
parents | 0deb6f96a5a3 |
children | cd8dafe937ba |
comparison
equal
deleted
inserted
replaced
21854:f324c9bc756d | 21855:c8456ff7a4c3 |
---|---|
1313 res += n | 1313 res += n |
1314 endfor | 1314 endfor |
1315 assert_equal(6, res) | 1315 assert_equal(6, res) |
1316 enddef | 1316 enddef |
1317 | 1317 |
1318 def Test_bufnr() | |
1319 let buf = bufnr() | |
1320 assert_equal(buf, bufnr('%')) | |
1321 enddef | |
1322 | |
1318 def Test_getreg_return_type() | 1323 def Test_getreg_return_type() |
1319 let s1: string = getreg('"') | 1324 let s1: string = getreg('"') |
1320 let s2: string = getreg('"', 1) | 1325 let s2: string = getreg('"', 1) |
1321 let s3: list<string> = getreg('"', 1, 1) | 1326 let s3: list<string> = getreg('"', 1, 1) |
1322 enddef | 1327 enddef |