Wire up GoToLine modal

This commit is contained in:
Conrad Irwin 2023-11-07 12:07:04 -07:00
parent 0233864e92
commit 1e6a0f1c7b
3 changed files with 9 additions and 19 deletions

View file

@ -1,12 +1,10 @@
use gpui::{div, px, red, AppContext, Div, Render, Styled, ViewContext, VisualContext};
use serde::Deserialize;
use gpui::{actions, div, px, red, AppContext, Div, Render, Styled, ViewContext, VisualContext};
use workspace::ModalRegistry;
// actions!(go_to_line, [Toggle]);
#[derive(Clone, Default, PartialEq, Deserialize)]
struct Toggle;
actions!(Toggle);
pub fn init(cx: &mut AppContext) {
cx.register_action_type::<Toggle>();
cx.global_mut::<ModalRegistry>()
.register_modal(Toggle, |_, cx| {
// if let Some(editor) = workspace