Register repl actions with editor after session started (#20396)
Makes repl actions that are specific to running kernels only come up after a session has been started at least once for the editor. Release Notes: - Only show session oriented `repl::` actions for editors after a session has been created
This commit is contained in:
parent
edb89d8d11
commit
706c385c24
3 changed files with 66 additions and 53 deletions
|
@ -1,4 +1,5 @@
|
|||
use crate::components::KernelListItem;
|
||||
use crate::setup_editor_session_actions;
|
||||
use crate::{
|
||||
kernels::{Kernel, KernelSpecification, RunningKernel},
|
||||
outputs::{ExecutionStatus, ExecutionView},
|
||||
|
@ -207,6 +208,14 @@ impl Session {
|
|||
None => Subscription::new(|| {}),
|
||||
};
|
||||
|
||||
let editor_handle = editor.clone();
|
||||
|
||||
editor
|
||||
.update(cx, |editor, _cx| {
|
||||
setup_editor_session_actions(editor, editor_handle);
|
||||
})
|
||||
.ok();
|
||||
|
||||
let mut session = Self {
|
||||
fs,
|
||||
editor,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue