aboutsummaryrefslogtreecommitdiff
path: root/helix-term/src/ui
diff options
context:
space:
mode:
authorBlaž Hrastnik2022-10-20 14:11:22 +0000
committerGitHub2022-10-20 14:11:22 +0000
commit78c0cdc519a2c76842441103b1ed716bb7c0a4e1 (patch)
treea7a551c4fd458a6dec3ccb94bc31055f7c8c9077 /helix-term/src/ui
parent8c9bb23650ba3c0c0bc7b25a359f997e130feb25 (diff)
parent756253b43f5ec1d8cc6fce9e6ebcf3f9fee5bc5a (diff)
Merge pull request #2267 from dead10ck/fix-write-fail
Write path fixes
Diffstat (limited to 'helix-term/src/ui')
-rw-r--r--helix-term/src/ui/editor.rs10
-rw-r--r--helix-term/src/ui/mod.rs6
2 files changed, 9 insertions, 7 deletions
diff --git a/helix-term/src/ui/editor.rs b/helix-term/src/ui/editor.rs
index 3cd2130a..73dfd52c 100644
--- a/helix-term/src/ui/editor.rs
+++ b/helix-term/src/ui/editor.rs
@@ -1,7 +1,8 @@
use crate::{
commands,
compositor::{Component, Context, Event, EventResult},
- job, key,
+ job::{self, Callback},
+ key,
keymap::{KeymapResult, Keymaps},
ui::{Completion, ProgressSpinners},
};
@@ -944,9 +945,10 @@ impl EditorView {
// TODO: Use an on_mode_change hook to remove signature help
cxt.jobs.callback(async {
- let call: job::Callback = Box::new(|_editor, compositor| {
- compositor.remove(SignatureHelp::ID);
- });
+ let call: job::Callback =
+ Callback::EditorCompositor(Box::new(|_editor, compositor| {
+ compositor.remove(SignatureHelp::ID);
+ }));
Ok(call)
});
}
diff --git a/helix-term/src/ui/mod.rs b/helix-term/src/ui/mod.rs
index 6ac4dbb7..f99dea0b 100644
--- a/helix-term/src/ui/mod.rs
+++ b/helix-term/src/ui/mod.rs
@@ -14,7 +14,7 @@ mod statusline;
mod text;
use crate::compositor::{Component, Compositor};
-use crate::job;
+use crate::job::{self, Callback};
pub use completion::Completion;
pub use editor::EditorView;
pub use markdown::Markdown;
@@ -121,7 +121,7 @@ pub fn regex_prompt(
if event == PromptEvent::Validate {
let callback = async move {
- let call: job::Callback = Box::new(
+ let call: job::Callback = Callback::EditorCompositor(Box::new(
move |_editor: &mut Editor, compositor: &mut Compositor| {
let contents = Text::new(format!("{}", err));
let size = compositor.size();
@@ -135,7 +135,7 @@ pub fn regex_prompt(
compositor.replace_or_push("invalid-regex", popup);
},
- );
+ ));
Ok(call)
};