fix(ui): flush ext_cmdline events before doing cmdpreview #27950

Problem:  Unable to update the screen for external cmdline during cmdpreview.
Solution: Flush the cmdline UI before cmdpreview state.
This commit is contained in:
luukvbaal
2024-05-28 11:43:56 +02:00
committed by GitHub
parent c272f30b1f
commit 5b6477be45
2 changed files with 57 additions and 0 deletions

View File

@@ -2532,6 +2532,10 @@ static bool cmdpreview_may_show(CommandLineState *s)
goto end;
}
// Flush now: external cmdline may itself wish to update the screen which is
// currently disallowed during cmdpreview(no longer needed in case that changes).
cmdline_ui_flush();
// Swap invalid command range if needed
if ((ea.argt & EX_RANGE) && ea.line1 > ea.line2) {
linenr_T lnum = ea.line1;