@@ -2291,6 +2291,29 @@ fn clear_register(
22912291 Ok(())
22922292}
22932293
2294+fn redraw(
2295+ cx: &mut compositor::Context,
2296+ _args: &[Cow<str>],
2297+ event: PromptEvent,
2298+) -> anyhow::Result<()> {
2299+ if event != PromptEvent::Validate {
2300+ return Ok(());
2301+ }
2302+
2303+ let callback = Box::pin(async move {
2304+ let call: job::Callback =
2305+ job::Callback::EditorCompositor(Box::new(|_editor, compositor| {
2306+ compositor.need_full_redraw();
2307+ }));
2308+
2309+ Ok(call)
2310+ });
2311+
2312+ cx.jobs.callback(callback);
2313+
2314+ Ok(())
2315+}
2316+
22942317pub const TYPABLE_COMMAND_LIST: &[TypableCommand] = &[
22952318 TypableCommand {
22962319 name: "quit",
@@ -2877,6 +2900,13 @@ pub const TYPABLE_COMMAND_LIST: &[TypableCommand] = &[
28772900 fun: clear_register,
28782901 signature: CommandSignature::none(),
28792902 },
2903+ TypableCommand {
2904+ name: "redraw",
2905+ aliases: &[],
2906+ doc: "Clear and re-render the whole UI",
2907+ fun: redraw,
2908+ signature: CommandSignature::none(),
2909+ },
28802910];
28812911
28822912pub static TYPABLE_COMMAND_MAP: Lazy<HashMap<&'static str, &'static TypableCommand>> =