Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Actually split mi and ma into several subcommands #1723

Closed
wants to merge 10 commits into from
19 changes: 4 additions & 15 deletions helix-term/src/application.rs
Original file line number Diff line number Diff line change
Expand Up @@ -272,10 +272,7 @@ impl Application {

pub fn handle_idle_timeout(&mut self) {
use crate::compositor::EventResult;
let editor_view = self
.compositor
.find::<ui::EditorView>()
.expect("expected at least one EditorView");
let editor_view = self.compositor.editor_view();

let mut cx = crate::compositor::Context {
editor: &mut self.editor,
Expand Down Expand Up @@ -622,14 +619,9 @@ impl Application {
log::info!("window/logMessage: {:?}", params);
}
Notification::ProgressMessage(params)
if !self
.compositor
.has_component(std::any::type_name::<ui::Prompt>()) =>
if !self.compositor.has_component::<ui::Prompt>() =>
{
let editor_view = self
.compositor
.find::<ui::EditorView>()
.expect("expected at least one EditorView");
let editor_view = self.compositor.editor_view();
let lsp::ProgressParams { token, value } = params;

let lsp::ProgressParamsValue::WorkDone(work) = value;
Expand Down Expand Up @@ -724,10 +716,7 @@ impl Application {
MethodCall::WorkDoneProgressCreate(params) => {
self.lsp_progress.create(server_id, params.token);

let editor_view = self
.compositor
.find::<ui::EditorView>()
.expect("expected at least one EditorView");
let editor_view = self.compositor.editor_view();
let spinner = editor_view.spinners_mut().get_or_create(server_id);
if spinner.is_stopped() {
spinner.start();
Expand Down
Loading