Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
temp
Joseph T. Lyonsa80b145d0d26
diff --git a/crates/feedback2/src/feedback_editor.rs b/crates/feedback2/src/feedback_editor.rsindex 258b3553f80..396cd27a6a6 100644--- a/crates/feedback2/src/feedback_editor.rs+++ b/crates/feedback2/src/feedback_editor.rs@@ -33,16 +33,16 @@ actions!(GiveFeedback, SubmitFeedback);// });// }-// #[derive(Serialize)]-// struct FeedbackRequestBody<'a> {-// feedback_text: &'a str,-// email: Option<String>,-// metrics_id: Option<Arc<str>>,-// installation_id: Option<Arc<str>>,-// system_specs: SystemSpecs,-// is_staff: bool,-// token: &'a str,-// }+#[derive(Serialize)]+struct FeedbackRequestBody<'a> {+ feedback_text: &'a str,+ email: Option<String>,+ metrics_id: Option<Arc<str>>,+ installation_id: Option<Arc<str>>,+ system_specs: SystemSpecs,+ is_staff: bool,+ token: &'a str,+}// #[derive(Clone)]// pub(crate) struct FeedbackEditor {diff --git a/crates/feedback2/src/feedback_modal.rs b/crates/feedback2/src/feedback_modal.rsindex 90ddb23ab2c..f04f40541fd 100644--- a/crates/feedback2/src/feedback_modal.rs+++ b/crates/feedback2/src/feedback_modal.rs@@ -1,3 +1,4 @@+use editor::Editor;use gpui::{div, rems, AppContext, DismissEvent, Div, EventEmitter, FocusHandle, FocusableView, Render,ViewContext,@@ -8,7 +9,7 @@ use workspace::Workspace;use crate::feedback_editor::GiveFeedback;pub struct FeedbackModal {- // editor: View<FeedbackEditor>,+ editor: View<Editor>,tmp_focus_handle: FocusHandle, // TODO: should be editor.focus_handle(cx)}@@ -28,7 +29,22 @@ impl FeedbackModal {}pub fn new(cx: &mut ViewContext<Self>) -> Self {+ let line_editor = cx.build_view(|cx| Editor::single_line(cx));+ let line_editor_change = cx.subscribe(&line_editor, Self::on_line_editor_event);++ // let editor = active_editor.read(cx);+ // let cursor = editor.selections.last::<Point>(cx).head();+ // let last_line = editor.buffer().read(cx).snapshot(cx).max_point().row;+ // let scroll_position = active_editor.update(cx, |editor, cx| editor.scroll_position(cx));++ // let current_text = format!(+ // "line {} of {} (column {})",+ // cursor.row + 1,+ // last_line + 1,+ // cursor.column + 1,+ // );Self {+ editor: line_editor,tmp_focus_handle: cx.focus_handle(),}}