mirror of
https://github.com/neovim/neovim.git
synced 2025-10-05 17:36:29 +00:00
ext_cmdline: added indent
This commit is contained in:

committed by
Björn Linse

parent
461ae69824
commit
fb389a6b4b
@@ -67,7 +67,7 @@ void popupmenu_select(Integer selected)
|
||||
FUNC_API_SINCE(3) FUNC_API_REMOTE_ONLY;
|
||||
void tabline_update(Tabpage current, Array tabs)
|
||||
FUNC_API_SINCE(3) FUNC_API_REMOTE_ONLY;
|
||||
void cmdline_show(Array content, Integer pos, String firstc, String prompt, Integer level)
|
||||
void cmdline_show(Array content, Integer pos, String firstc, String prompt, Integer indent, Integer level)
|
||||
FUNC_API_SINCE(3) FUNC_API_REMOTE_ONLY;
|
||||
void cmdline_pos(Integer pos, Integer level)
|
||||
FUNC_API_SINCE(3) FUNC_API_REMOTE_ONLY;
|
||||
|
@@ -2726,7 +2726,11 @@ void ui_ext_cmdline_show(void)
|
||||
ADD(text, STRING_OBJ(cstr_to_string("Normal")));
|
||||
ADD(text, STRING_OBJ(cstr_to_string((char *)(ccline.cmdbuff))));
|
||||
ADD(content, ARRAY_OBJ(text));
|
||||
ui_call_cmdline_show(content, ccline.cmdpos, cchar_to_string((char)ccline.cmdfirstc), cstr_to_string((char *)(ccline.cmdprompt)), ccline.level);
|
||||
ui_call_cmdline_show(content, ccline.cmdpos,
|
||||
cchar_to_string((char)ccline.cmdfirstc),
|
||||
cstr_to_string((char *)(ccline.cmdprompt)),
|
||||
ccline.cmdindent,
|
||||
ccline.level);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@@ -7,7 +7,7 @@ if helpers.pending_win32(pending) then return end
|
||||
describe('External command line completion', function()
|
||||
local screen
|
||||
local shown = false
|
||||
local firstc, prompt, content, pos, char, shift, level, current_hide_level, in_function
|
||||
local firstc, prompt, content, pos, char, shift, indent, level, current_hide_level, in_function
|
||||
|
||||
before_each(function()
|
||||
clear()
|
||||
@@ -19,7 +19,7 @@ describe('External command line completion', function()
|
||||
current_hide_level = data[1]
|
||||
elseif name == "cmdline_show" then
|
||||
shown = true
|
||||
content, pos, firstc, prompt, level = unpack(data)
|
||||
content, pos, firstc, prompt, indent, level = unpack(data)
|
||||
elseif name == "cmdline_char" then
|
||||
char, shift = unpack(data)
|
||||
elseif name == "cmdline_pos" then
|
||||
@@ -171,6 +171,7 @@ describe('External command line completion', function()
|
||||
|
|
||||
]], nil, nil, function()
|
||||
eq(true, in_function)
|
||||
eq(2, indent)
|
||||
end)
|
||||
|
||||
feed('line1<cr>')
|
||||
@@ -182,6 +183,7 @@ describe('External command line completion', function()
|
||||
|
|
||||
]], nil, nil, function()
|
||||
eq(true, in_function)
|
||||
eq(2, indent)
|
||||
end)
|
||||
|
||||
feed('endfunction<cr>')
|
||||
@@ -195,6 +197,17 @@ describe('External command line completion', function()
|
||||
eq(false, in_function)
|
||||
end)
|
||||
|
||||
feed(':sign<c-f>')
|
||||
screen:expect([[
|
||||
|
|
||||
[No Name] |
|
||||
:sign^ |
|
||||
[Command Line] |
|
||||
|
|
||||
]], nil, nil, function()
|
||||
eq(false, in_function)
|
||||
end)
|
||||
|
||||
end)
|
||||
end)
|
||||
end)
|
||||
|
Reference in New Issue
Block a user