on master help sign in
Remove redraw to fix build
ec9aa66Blaž Hrastnik
book/src/generated/typable-cmd.md−1
@@ -73,4 +73,3 @@
73| `:pipe` | Pipe each selection to the shell command. |
73| `:pipe` | Pipe each selection to the shell command. |
74| `:pipe-to` | Pipe each selection to the shell command, ignoring output. |
74| `:pipe-to` | Pipe each selection to the shell command, ignoring output. |
75| `:run-shell-command`, `:sh` | Run a shell command |
75| `:run-shell-command`, `:sh` | Run a shell command |
76−| `:redraw` | Clear and re-render the whole UI |
helix-term/src/commands/typed.rs−29
@@ -1808,28 +1808,6 @@ fn run_shell_command(
1808 Ok(())
1808 Ok(())
1809}
1809}
1810
1810
1811−fn redraw(
1812− cx: &mut compositor::Context,
1813− _args: &[Cow<str>],
1814− event: PromptEvent,
1815−) -> anyhow::Result<()> {
1816− if event != PromptEvent::Validate {
1817− return Ok(());
1818− }
1819−
1820− let callback = Box::pin(async move {
1821− let call: job::Callback = Box::new(|_editor, compositor| {
1822− compositor.clear().expect("unable to redraw");
1823− });
1824−
1825− Ok(call)
1826− });
1827−
1828− cx.jobs.callback(callback);
1829−
1830− Ok(())
1831−}
1832−
1833pub const TYPABLE_COMMAND_LIST: &[TypableCommand] = &[
1811pub const TYPABLE_COMMAND_LIST: &[TypableCommand] = &[
1834 TypableCommand {
1812 TypableCommand {
1835 name: "quit",
1813 name: "quit",
@@ -2345,13 +2323,6 @@ pub const TYPABLE_COMMAND_LIST: &[TypableCommand] = &[
2345 fun: run_shell_command,
2323 fun: run_shell_command,
2346 completer: Some(completers::directory),
2324 completer: Some(completers::directory),
2347 },
2325 },
2348− TypableCommand {
2349− name: "redraw",
2350− aliases: &[],
2351− doc: "Clear and re-render the whole UI",
2352− fun: redraw,
2353− completer: None,
2354− },
2355 ];
2326 ];
2356
2327
2357pub static TYPABLE_COMMAND_MAP: Lazy<HashMap<&'static str, &'static TypableCommand>> =
2328pub static TYPABLE_COMMAND_MAP: Lazy<HashMap<&'static str, &'static TypableCommand>> =
helix-term/src/compositor.rs−4
@@ -197,10 +197,6 @@ impl Compositor {
197 .find(|component| component.id() == Some(id))
197 .find(|component| component.id() == Some(id))
198 .and_then(|component| component.as_any_mut().downcast_mut())
198 .and_then(|component| component.as_any_mut().downcast_mut())
199 }
199 }
200−
201− pub fn clear(&mut self) -> std::io::Result<()> {
202− self.terminal.clear()
203− }
204}
200}
205
201
206// View casting, taken straight from Cursive
202// View casting, taken straight from Cursive