Skip to content

Commit 5abf904

Browse files
committed
handle calls
1 parent a110627 commit 5abf904

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

crates/ark/src/ui/events.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ pub unsafe extern "C-unwind" fn ps_ui_navigate_to_file(
7676
line: RObject::view(line).try_into()?,
7777
column: RObject::view(column).try_into()?,
7878
kind,
79+
pinned: None,
7980
};
8081

8182
let event = UiFrontendEvent::OpenEditor(params);

crates/ark/src/ui/ui.rs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
use amalthea::comm::comm_channel::CommMsg;
99
use amalthea::comm::ui_comm::CallMethodParams;
1010
use amalthea::comm::ui_comm::DidChangePlotsRenderSettingsParams;
11+
use amalthea::comm::ui_comm::EditorContextChangedParams;
1112
use amalthea::comm::ui_comm::UiBackendReply;
1213
use amalthea::comm::ui_comm::UiBackendRequest;
1314
use amalthea::comm::ui_comm::UiFrontendEvent;
@@ -150,6 +151,9 @@ impl UiComm {
150151
UiBackendRequest::DidChangePlotsRenderSettings(params) => {
151152
self.handle_did_change_plot_render_settings(params)
152153
},
154+
UiBackendRequest::EditorContextChanged(params) => {
155+
self.handle_editor_context_changed(params)
156+
},
153157
}
154158
}
155159

@@ -217,6 +221,18 @@ impl UiComm {
217221
Ok(UiBackendReply::DidChangePlotsRenderSettingsReply())
218222
}
219223

224+
fn handle_editor_context_changed(
225+
&self,
226+
params: EditorContextChangedParams,
227+
) -> anyhow::Result<UiBackendReply, anyhow::Error> {
228+
log::trace!(
229+
"Editor context changed: document_uri={}, is_execution_source={}",
230+
params.document_uri,
231+
params.is_execution_source
232+
);
233+
Ok(UiBackendReply::EditorContextChangedReply())
234+
}
235+
220236
/**
221237
* Send an RPC request to the frontend.
222238
*/

0 commit comments

Comments
 (0)