mirror of
https://github.com/neovim/neovim.git
synced 2025-10-14 05:46:12 +00:00
fix(cmdline): trigger CmdlineChanged after command preview (#35254)
This commit is contained in:
@@ -2793,15 +2793,6 @@ static void do_autocmd_cmdlinechanged(int firstc)
|
||||
|
||||
static int command_line_changed(CommandLineState *s)
|
||||
{
|
||||
if (ccline.cmdpos != s->prev_cmdpos
|
||||
|| (s->prev_cmdbuff != NULL
|
||||
&& strncmp(s->prev_cmdbuff, ccline.cmdbuff, (size_t)s->prev_cmdpos) != 0)) {
|
||||
// Trigger CmdlineChanged autocommands.
|
||||
do_autocmd_cmdlinechanged(s->firstc > 0 ? s->firstc : '-');
|
||||
}
|
||||
|
||||
may_trigger_cursormovedc(s);
|
||||
|
||||
const bool prev_cmdpreview = cmdpreview;
|
||||
if (s->firstc == ':'
|
||||
&& current_sctx.sc_sid == 0 // only if interactive
|
||||
@@ -2823,6 +2814,15 @@ static int command_line_changed(CommandLineState *s)
|
||||
}
|
||||
}
|
||||
|
||||
if (ccline.cmdpos != s->prev_cmdpos
|
||||
|| (s->prev_cmdbuff != NULL
|
||||
&& strncmp(s->prev_cmdbuff, ccline.cmdbuff, (size_t)s->prev_cmdpos) != 0)) {
|
||||
// Trigger CmdlineChanged autocommands.
|
||||
do_autocmd_cmdlinechanged(s->firstc > 0 ? s->firstc : '-');
|
||||
}
|
||||
|
||||
may_trigger_cursormovedc(s);
|
||||
|
||||
if (p_arshape && !p_tbidi) {
|
||||
// Always redraw the whole command line to fix shaping and
|
||||
// right-left typing. Not efficient, but it works.
|
||||
|
Reference in New Issue
Block a user