Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

Enable word wrap in feedback modal (#23893)

Conrad Irwin0ad2aeb2e95b
diff --git a/crates/editor/src/editor.rs b/crates/editor/src/editor.rs
index d24eea221ff..f83cc53c516 100644
--- a/crates/editor/src/editor.rs
+++ b/crates/editor/src/editor.rs
@@ -12167,6 +12167,10 @@ impl Editor {
.update(cx, |map, cx| map.set_wrap_width(width, cx))
}
+ pub fn set_soft_wrap(&mut self) {
+ self.soft_wrap_mode_override = Some(language_settings::SoftWrap::EditorWidth)
+ }
+
pub fn toggle_soft_wrap(&mut self, _: &ToggleSoftWrap, _: &mut Window, cx: &mut Context<Self>) {
if self.soft_wrap_mode_override.is_some() {
self.soft_wrap_mode_override.take();
diff --git a/crates/feedback/src/feedback_modal.rs b/crates/feedback/src/feedback_modal.rs
index 0e56cd1952c..34f8e2fa499 100644
--- a/crates/feedback/src/feedback_modal.rs
+++ b/crates/feedback/src/feedback_modal.rs
@@ -194,6 +194,7 @@ impl FeedbackModal {
editor.set_show_inline_completions(Some(false), window, cx);
editor.set_vertical_scroll_margin(5, cx);
editor.set_use_modal_editing(false);
+ editor.set_soft_wrap();
editor
});