ext_cmdline: fix inputsecret()

This commit is contained in:
Björn Linse
2017-08-30 08:51:39 +02:00
parent 91d8e26bc7
commit 445f25998c
2 changed files with 32 additions and 1 deletions

View File

@@ -15,6 +15,7 @@ describe('external cmdline', function()
before_each(function()
clear()
cmdline, block = {}, nil
screen = Screen.new(25, 5)
screen:attach({rgb=true, ext_cmdline=true})
screen:set_on_event_handler(function(name, data)
@@ -457,6 +458,25 @@ describe('external cmdline', function()
end)
end)
it('works with inputsecret()', function()
feed(":call inputsecret('secret:')<cr>abc123")
screen:expect([[
^ |
~ |
~ |
~ |
|
]], nil, nil, function()
eq({{
content = { { {}, "******" } },
firstc = "",
indent = 0,
pos = 6,
prompt = "secret:"
}}, cmdline)
end)
end)
it('works with highlighted cmdline', function()
source([[
highlight RBP1 guibg=Red