diff options
author | Blaž Hrastnik | 2022-12-15 13:23:06 +0000 |
---|---|---|
committer | Blaž Hrastnik | 2022-12-15 13:23:06 +0000 |
commit | ec9aa6690244bccefac24037c9f7a659816bffdd (patch) | |
tree | 70aa42c0175d644d5d8f6da4c9cd2da229556fc1 | |
parent | 5c4a9cba9a14ca10437e979c884d2ccba78ef1e7 (diff) |
Remove redraw to fix build
-rw-r--r-- | book/src/generated/typable-cmd.md | 1 | ||||
-rw-r--r-- | helix-term/src/commands/typed.rs | 29 | ||||
-rw-r--r-- | helix-term/src/compositor.rs | 4 |
3 files changed, 0 insertions, 34 deletions
diff --git a/book/src/generated/typable-cmd.md b/book/src/generated/typable-cmd.md index 269d63e3..66e6ac03 100644 --- a/book/src/generated/typable-cmd.md +++ b/book/src/generated/typable-cmd.md @@ -73,4 +73,3 @@ | `:pipe` | Pipe each selection to the shell command. | | `:pipe-to` | Pipe each selection to the shell command, ignoring output. | | `:run-shell-command`, `:sh` | Run a shell command | -| `:redraw` | Clear and re-render the whole UI | diff --git a/helix-term/src/commands/typed.rs b/helix-term/src/commands/typed.rs index 90dde7e1..cb387fcb 100644 --- a/helix-term/src/commands/typed.rs +++ b/helix-term/src/commands/typed.rs @@ -1808,28 +1808,6 @@ fn run_shell_command( Ok(()) } -fn redraw( - cx: &mut compositor::Context, - _args: &[Cow<str>], - event: PromptEvent, -) -> anyhow::Result<()> { - if event != PromptEvent::Validate { - return Ok(()); - } - - let callback = Box::pin(async move { - let call: job::Callback = Box::new(|_editor, compositor| { - compositor.clear().expect("unable to redraw"); - }); - - Ok(call) - }); - - cx.jobs.callback(callback); - - Ok(()) -} - pub const TYPABLE_COMMAND_LIST: &[TypableCommand] = &[ TypableCommand { name: "quit", @@ -2345,13 +2323,6 @@ pub const TYPABLE_COMMAND_LIST: &[TypableCommand] = &[ fun: run_shell_command, completer: Some(completers::directory), }, - TypableCommand { - name: "redraw", - aliases: &[], - doc: "Clear and re-render the whole UI", - fun: redraw, - completer: None, - }, ]; pub static TYPABLE_COMMAND_MAP: Lazy<HashMap<&'static str, &'static TypableCommand>> = diff --git a/helix-term/src/compositor.rs b/helix-term/src/compositor.rs index 18620b7b..9dad3620 100644 --- a/helix-term/src/compositor.rs +++ b/helix-term/src/compositor.rs @@ -197,10 +197,6 @@ impl Compositor { .find(|component| component.id() == Some(id)) .and_then(|component| component.as_any_mut().downcast_mut()) } - - pub fn clear(&mut self) -> std::io::Result<()> { - self.terminal.clear() - } } // View casting, taken straight from Cursive |