From 7b6ee3ef0a2d64657c8ca25f440e010c6dc75408 Mon Sep 17 00:00:00 2001 From: shadmansaleh <13149513+shadmansaleh@users.noreply.github.com> Date: Thu, 17 Feb 2022 12:53:17 +0600 Subject: fix: anonymous sid not working --- test/functional/ex_cmds/verbose_spec.lua | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'test/functional') diff --git a/test/functional/ex_cmds/verbose_spec.lua b/test/functional/ex_cmds/verbose_spec.lua index f1c3d3fe16..326104dc3c 100644 --- a/test/functional/ex_cmds/verbose_spec.lua +++ b/test/functional/ex_cmds/verbose_spec.lua @@ -38,6 +38,13 @@ function Close_Window() abort\ wincmd -\ endfunction\ ", false) + +local ret = vim.api.nvim_exec ("\ +function! s:return80()\ + return 80\ +endfunction\ +let &tw = s:return80()\ +", true) ]]) exec(':source '..script_file) end) @@ -125,6 +132,14 @@ test_group FileType endfunction]], script_location), result) end) + + it('"Last set" works with anonymous sid', function() + local result = exec_capture(':verbose set tw?') + eq(string.format([[ + textwidth=80 + Last set from %s line 22]], + script_location), result) + end) end) describe('lua verbose:', function() -- cgit