mirror of
https://github.com/neovim/neovim.git
synced 2025-09-17 08:48:16 +00:00
@@ -313,6 +313,26 @@ int main(int argc, char **argv)
|
|||||||
input_start(STDIN_FILENO);
|
input_start(STDIN_FILENO);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Wait for UIs to set up Nvim or show early messages
|
||||||
|
// and prompts (--cmd, swapfile dialog, …).
|
||||||
|
bool use_remote_ui = (embedded_mode && !headless_mode);
|
||||||
|
bool use_builtin_ui = (!headless_mode && !embedded_mode && !silent_mode);
|
||||||
|
if (use_remote_ui || use_builtin_ui) {
|
||||||
|
TIME_MSG("waiting for UI");
|
||||||
|
if (use_remote_ui) {
|
||||||
|
remote_ui_wait_for_attach();
|
||||||
|
} else {
|
||||||
|
ui_builtin_start();
|
||||||
|
}
|
||||||
|
TIME_MSG("done waiting for UI");
|
||||||
|
|
||||||
|
// prepare screen now, so external UIs can display messages
|
||||||
|
starting = NO_BUFFERS;
|
||||||
|
screenclear();
|
||||||
|
TIME_MSG("initialized screen early for UI");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// open terminals when opening files that start with term://
|
// open terminals when opening files that start with term://
|
||||||
#define PROTO "term://"
|
#define PROTO "term://"
|
||||||
do_cmdline_cmd("augroup nvim_terminal");
|
do_cmdline_cmd("augroup nvim_terminal");
|
||||||
@@ -335,25 +355,6 @@ int main(int argc, char **argv)
|
|||||||
p_lpl = false;
|
p_lpl = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Wait for UIs to set up Nvim or show early messages
|
|
||||||
// and prompts (--cmd, swapfile dialog, …).
|
|
||||||
bool use_remote_ui = (embedded_mode && !headless_mode);
|
|
||||||
bool use_builtin_ui = (!headless_mode && !embedded_mode && !silent_mode);
|
|
||||||
if (use_remote_ui || use_builtin_ui) {
|
|
||||||
TIME_MSG("waiting for UI");
|
|
||||||
if (use_remote_ui) {
|
|
||||||
remote_ui_wait_for_attach();
|
|
||||||
} else {
|
|
||||||
ui_builtin_start();
|
|
||||||
}
|
|
||||||
TIME_MSG("done waiting for UI");
|
|
||||||
|
|
||||||
// prepare screen now, so external UIs can display messages
|
|
||||||
starting = NO_BUFFERS;
|
|
||||||
screenclear();
|
|
||||||
TIME_MSG("initialized screen early for UI");
|
|
||||||
}
|
|
||||||
|
|
||||||
// Execute --cmd arguments.
|
// Execute --cmd arguments.
|
||||||
exe_pre_commands(¶ms);
|
exe_pre_commands(¶ms);
|
||||||
|
|
||||||
|
@@ -358,6 +358,31 @@ describe('sysinit', function()
|
|||||||
eq('loaded 1 xdg 0 vim 1',
|
eq('loaded 1 xdg 0 vim 1',
|
||||||
eval('printf("loaded %d xdg %d vim %d", g:loaded, get(g:, "xdg", 0), get(g:, "vim", 0))'))
|
eval('printf("loaded %d xdg %d vim %d", g:loaded, get(g:, "xdg", 0), get(g:, "vim", 0))'))
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
it('fixed hang issue with -D (#12647)', function()
|
||||||
|
local screen
|
||||||
|
screen = Screen.new(60, 6)
|
||||||
|
screen:attach()
|
||||||
|
command([[let g:id = termopen('"]]..nvim_prog..
|
||||||
|
[[" -u NONE -i NONE --cmd "set noruler" -D')]])
|
||||||
|
screen:expect([[
|
||||||
|
^ |
|
||||||
|
Entering Debug mode. Type "cont" to continue. |
|
||||||
|
cmd: augroup nvim_terminal |
|
||||||
|
> |
|
||||||
|
<" -u NONE -i NONE --cmd "set noruler" -D 1,0-1 All|
|
||||||
|
|
|
||||||
|
]])
|
||||||
|
command([[call chansend(g:id, "cont\n")]])
|
||||||
|
screen:expect([[
|
||||||
|
^ |
|
||||||
|
~ |
|
||||||
|
[No Name] |
|
||||||
|
|
|
||||||
|
<" -u NONE -i NONE --cmd "set noruler" -D 1,0-1 All|
|
||||||
|
|
|
||||||
|
]])
|
||||||
|
end)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
describe('clean', function()
|
describe('clean', function()
|
||||||
|
Reference in New Issue
Block a user