mirror of
https://github.com/neovim/neovim.git
synced 2026-07-22 00:51:33 +00:00
ext_cmdline: fix inputsecret()
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user