mirror of
https://github.com/helix-editor/helix.git
synced 2024-11-22 17:36:19 +04:00
Remove redraw to fix build
This commit is contained in:
parent
5c4a9cba9a
commit
ec9aa66902
@ -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 |
|
||||
|
@ -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 @@ fn redraw(
|
||||
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>> =
|
||||
|
@ -197,10 +197,6 @@ pub fn find_id<T: 'static>(&mut self, id: &'static str) -> Option<&mut T> {
|
||||
.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
|
||||
|
Loading…
Reference in New Issue
Block a user