on master help sign in
Remove redraw to fix build
commitec9aa6690244bccefac24037c9f7a659816bffdd authorBlaž Hrastnik <blaz@mxxn.io> dateThu 15 Dec 2022, 22:23 (4 years ago) parent5c4a9cb
3 files changed−34
book/src/generated/typable-cmd.md−1 helix-term/src/commands/typed.rs−29 helix-term/src/compositor.rs−4
book/src/generated/typable-cmd.md−1
@@ -73,4 +73,3 @@
7373| `:pipe` | Pipe each selection to the shell command. |
7474| `:pipe-to` | Pipe each selection to the shell command, ignoring output. |
7575| `: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(
18081808 Ok(())
18091809}
18101810
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−
18331811pub const TYPABLE_COMMAND_LIST: &[TypableCommand] = &[
18341812 TypableCommand {
18351813 name: "quit",
@@ -2345,13 +2323,6 @@ pub const TYPABLE_COMMAND_LIST: &[TypableCommand] = &[
23452323 fun: run_shell_command,
23462324 completer: Some(completers::directory),
23472325 },
2348− TypableCommand {
2349− name: "redraw",
2350− aliases: &[],
2351− doc: "Clear and re-render the whole UI",
2352− fun: redraw,
2353− completer: None,
2354− },
23552326 ];
23562327
23572328pub static TYPABLE_COMMAND_MAP: Lazy<HashMap<&'static str, &'static TypableCommand>> =
helix-term/src/compositor.rs−4
@@ -197,10 +197,6 @@ impl Compositor {
197197 .find(|component| component.id() == Some(id))
198198 .and_then(|component| component.as_any_mut().downcast_mut())
199199 }
200−
201− pub fn clear(&mut self) -> std::io::Result<()> {
202− self.terminal.clear()
203− }
204200}
205201
206202// View casting, taken straight from Cursive