Handle soft wrap modes when computing wrap width#46422
Handle soft wrap modes when computing wrap width#46422Anthony-Eid merged 4 commits intozed-industries:mainfrom
Conversation
|
I believe this is almost identical to the logic in Also, I believe the areas this change could impact already override soft wrap behavior. For example, the AutoHeight Editors I saw for the agent UI seem to use MessageEditor link to soft wrap override. I have tested the prompt message editor and the inline message editor to make sure even with the below settings, the text still wraps to the editor width. {
"soft_wrap": "preferred_line_length",
"preferred_line_length": 72,
} |
|
Hi @mchisolm0, thanks--this change makes sense to me, I like the idea of extracting the logic but happy to merge either with or without that. |
|
|
||
| match soft_wrap { | ||
| SoftWrap::GitDiff => None, | ||
| SoftWrap::None => Some(wrap_width_for(MAX_LINE_LEN as u32 / 2)), |
There was a problem hiding this comment.
I overlooked handling SoftWrap::None initially in the first commit.
The goal is to have the the git panel commit message editor, the main editor, and any other AutoHeight editors match soft wrap behavior, right?
|
Hi @cole-miller thanks! 😁 I have tested the change with each soft wrap setting in multiple places I expected it to affect. Is it expected behavior that this change would impact anything in the agent thread view? I thought my previous testing showed it did not. This time I noticed on Nightly with opencode ACP, a code block in the agent thread seemed to be soft wrapping to my preferred line length but the dev build did not. I think it is unrelated and I can not reproduce it. I just wanted to mention it and ask. |
Partially closes #44748 Release Notes: - Fixed the git side panel to respect soft wrap settings --------- Co-authored-by: Anthony Eid <anthony@zed.dev>
Key changes: - Thermal state detection (zed-industries#45638) - GPUI detects system thermal state, throttles to ~60fps when overheating - Checkerboard shader for side-by-side diff (zed-industries#48417) - visual pattern for diff backgrounds - cosmic-text v0.17 (zed-industries#48504) - fixes font ligatures on Linux - Middle click tab close (zed-industries#44916) - on_aux_click/is_middle_click API additions - Soft wrap modes for wrap width (zed-industries#46422) - Tab switcher mode similar to vim/helix buffer picker (zed-industries#47079) - Multi_buffer optimization batch (zed-industries#48519) - TreeMap for diagnostics (zed-industries#48482) - performance improvement - Semantic token follow-up fixes (zed-industries#48485) - Claude Opus 4.6 and 1M context window model variants (zed-industries#48508) - Anthropic adaptive thinking types (zed-industries#48517) - Side-by-side diff: hunk gutter highlights restored, toolbar buttons for SplittableEditor - Shell quote bypass fix in terminal permission system (zed-industries#48436) - Project panel: Collapse All improvements (zed-industries#47328, zed-industries#48443) - Edit prediction: trailing newlines fix, cursor position in global coords - Properly discard tokens on language server stop (zed-industries#48490) - AgentTool::NAME const instead of hardcoded strings (zed-industries#48506) Conflict resolution: - collab/editor_tests.rs: deleted (collab removed) - vim (helix, motion, increment): deleted (vim removed) - GPUI (17 files): deleted from Glass (handled in Obsydian-HQ/gpui) - editor/items.rs: merged imports (added BufferId, kept Theme) - project_diff.rs: removed old native_button toggle (upstream uses toolbar buttons now) - lsp_store.rs: added SemanticTokenConfig, removed GlobalLogStore/LanguageServerKind - project_panel.rs: merged UI imports (added ContextMenuEntry, ScrollAxes) - Keymaps: took upstream JetBrains bindings Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Partially closes #44748
Release Notes: