Fix soft-wrapping with fold creases (#28029)
Release Notes: - Fixed a rendering bug that caused context in the agent to not wrap properly. --------- Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com> Co-authored-by: Zed AI <ai+claude-3.7@zed.dev>
This commit is contained in:
parent
ed3722023e
commit
e123c4bced
9 changed files with 456 additions and 128 deletions
|
@ -58,7 +58,7 @@ use clock::ReplicaId;
|
|||
use collections::{BTreeMap, HashMap, HashSet, VecDeque};
|
||||
use convert_case::{Case, Casing};
|
||||
use display_map::*;
|
||||
pub use display_map::{DisplayPoint, FoldPlaceholder};
|
||||
pub use display_map::{ChunkRenderer, ChunkRendererContext, DisplayPoint, FoldPlaceholder};
|
||||
use editor_settings::GoToDefinitionFallback;
|
||||
pub use editor_settings::{
|
||||
CurrentLineHighlight, EditorSettings, HideMouseMode, ScrollBeyondLastLine, SearchSettings,
|
||||
|
@ -15045,6 +15045,15 @@ impl Editor {
|
|||
self.active_indent_guides_state.dirty = true;
|
||||
}
|
||||
|
||||
pub fn update_fold_widths(
|
||||
&mut self,
|
||||
widths: impl IntoIterator<Item = (FoldId, Pixels)>,
|
||||
cx: &mut Context<Self>,
|
||||
) -> bool {
|
||||
self.display_map
|
||||
.update(cx, |map, cx| map.update_fold_widths(widths, cx))
|
||||
}
|
||||
|
||||
pub fn default_fold_placeholder(&self, cx: &App) -> FoldPlaceholder {
|
||||
self.display_map.read(cx).fold_placeholder.clone()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue