Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
disable wrap guides in the assitant panel
Mikayla Makid58f031696ce
diff --git a/crates/ai/src/assistant.rs b/crates/ai/src/assistant.rsindex 8a4c04d3387..957c5e1c063 100644--- a/crates/ai/src/assistant.rs+++ b/crates/ai/src/assistant.rs@@ -1637,6 +1637,7 @@ impl ConversationEditor {let mut editor = Editor::for_buffer(conversation.read(cx).buffer.clone(), None, cx);editor.set_soft_wrap_mode(SoftWrap::EditorWidth, cx);editor.set_show_gutter(false, cx);+ editor.set_show_wrap_guides(false, cx);editor});diff --git a/crates/editor/src/editor.rs b/crates/editor/src/editor.rsindex b4145edb648..5270d6f9518 100644--- a/crates/editor/src/editor.rs+++ b/crates/editor/src/editor.rs@@ -543,6 +543,7 @@ pub struct Editor {show_local_selections: bool,mode: EditorMode,show_gutter: bool,+ show_wrap_guides: Option<bool>,placeholder_text: Option<Arc<str>>,highlighted_rows: Option<Range<u32>>,#[allow(clippy::type_complexity)]@@ -1375,6 +1376,7 @@ impl Editor {show_local_selections: true,mode,show_gutter: mode == EditorMode::Full,+ show_wrap_guides: None,placeholder_text: None,highlighted_rows: None,background_highlights: Default::default(),@@ -7187,6 +7189,10 @@ impl Editor {pub fn wrap_guides(&self, cx: &AppContext) -> SmallVec<[(usize, bool); 2]> {let mut wrap_guides = smallvec::smallvec![];+ if self.show_wrap_guides == Some(false) {+ return wrap_guides;+ }+let settings = self.buffer.read(cx).settings_at(0, cx);if settings.show_wrap_guides {if let SoftWrap::Column(soft_wrap) = self.soft_wrap_mode(cx) {@@ -7244,6 +7250,11 @@ impl Editor {cx.notify();}+ pub fn set_show_wrap_guides(&mut self, show_gutter: bool, cx: &mut ViewContext<Self>) {+ self.show_wrap_guides = Some(show_gutter);+ cx.notify();+ }+pub fn reveal_in_finder(&mut self, _: &RevealInFinder, cx: &mut ViewContext<Self>) {if let Some(buffer) = self.buffer().read(cx).as_singleton() {if let Some(file) = buffer.read(cx).file().and_then(|f| f.as_local()) {