diff options
author | Sam Bingner <sam@bingner.com> | 2018-08-03 15:06:38 -1000 |
---|---|---|
committer | Sam Bingner <sam@bingner.com> | 2018-08-03 15:06:38 -1000 |
commit | 135b410607f008d3709a7b1374f3f37924eb9fe4 (patch) | |
tree | f4756ef3a354f6001360db894db010df85177f76 /data/vim/patches/8.1.0164 | |
parent | bd1eb51da0d3f250793e1868d73babdf495c921f (diff) |
Update vim
Diffstat (limited to 'data/vim/patches/8.1.0164')
-rw-r--r-- | data/vim/patches/8.1.0164 | 83 |
1 files changed, 83 insertions, 0 deletions
diff --git a/data/vim/patches/8.1.0164 b/data/vim/patches/8.1.0164 new file mode 100644 index 000000000..a4982fcb9 --- /dev/null +++ b/data/vim/patches/8.1.0164 @@ -0,0 +1,83 @@ +To: vim_dev@googlegroups.com +Subject: Patch 8.1.0164 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 8.1.0164 +Problem: luaeval('vim.buffer().name') returns an error. +Solution: Return an empty string. (Dominique Pelle, closes #3167) +Files: src/if_lua.c, src/testdir/test_lua.vim + + +*** ../vim-8.1.0163/src/if_lua.c Sun Jul 1 15:12:00 2018 +--- src/if_lua.c Sat Jul 7 23:04:53 2018 +*************** +*** 1123,1131 **** + { + const char *s = lua_tostring(L, 2); + if (strncmp(s, "name", 4) == 0) +! lua_pushstring(L, (char *) b->b_sfname); + else if (strncmp(s, "fname", 5) == 0) +! lua_pushstring(L, (char *) b->b_ffname); + else if (strncmp(s, "number", 6) == 0) + lua_pushinteger(L, b->b_fnum); + /* methods */ +--- 1123,1133 ---- + { + const char *s = lua_tostring(L, 2); + if (strncmp(s, "name", 4) == 0) +! lua_pushstring(L, (b->b_sfname == NULL) +! ? "" : (char *) b->b_sfname); + else if (strncmp(s, "fname", 5) == 0) +! lua_pushstring(L, (b->b_ffname == NULL) +! ? "" : (char *) b->b_ffname); + else if (strncmp(s, "number", 6) == 0) + lua_pushinteger(L, b->b_fnum); + /* methods */ +*** ../vim-8.1.0163/src/testdir/test_lua.vim Mon Jul 2 22:54:32 2018 +--- src/testdir/test_lua.vim Sat Jul 7 23:04:53 2018 +*************** +*** 198,208 **** + " Test vim.buffer().name and vim.buffer().fname + func Test_buffer_name() + new +! " FIXME: for an unnamed buffer, I would expect +! " vim.buffer().name to give an empty string, but +! " it returns 0. Is it a bug? +! " so this assert_equal is commented out. +! " call assert_equal('', luaeval('vim.buffer().name')) + bwipe! + + new Xfoo +--- 198,205 ---- + " Test vim.buffer().name and vim.buffer().fname + func Test_buffer_name() + new +! call assert_equal('', luaeval('vim.buffer().name')) +! call assert_equal('', luaeval('vim.buffer().fname')) + bwipe! + + new Xfoo +*** ../vim-8.1.0163/src/version.c Sat Jul 7 22:41:57 2018 +--- src/version.c Sat Jul 7 23:06:18 2018 +*************** +*** 791,792 **** +--- 791,794 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 164, + /**/ + +-- +Spam seems to be something useful to novices. Later you realize that +it's a bunch of indigestable junk that only clogs your system. +Applies to both the food and the e-mail! + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// |