Fix edits not being reported when rewrapping
This commit is contained in:
parent
0e1597d385
commit
1b07fd6a70
2 changed files with 1 additions and 4 deletions
|
@ -162,7 +162,7 @@ impl WrapMap {
|
||||||
{
|
{
|
||||||
let tab_snapshot = new_snapshot.tab_snapshot.clone();
|
let tab_snapshot = new_snapshot.tab_snapshot.clone();
|
||||||
let range = TabPoint::zero()..tab_snapshot.max_point();
|
let range = TabPoint::zero()..tab_snapshot.max_point();
|
||||||
let edits = new_snapshot
|
edits = new_snapshot
|
||||||
.update(
|
.update(
|
||||||
tab_snapshot,
|
tab_snapshot,
|
||||||
&[TabEdit {
|
&[TabEdit {
|
||||||
|
|
|
@ -1710,8 +1710,6 @@ impl EditorElement {
|
||||||
SoftWrap::Column(column) => editor_width.min(column as f32 * em_advance),
|
SoftWrap::Column(column) => editor_width.min(column as f32 * em_advance),
|
||||||
};
|
};
|
||||||
|
|
||||||
dbg!(bounds.size.width, gutter_width, gutter_margin, overscroll.width, em_width, em_advance, wrap_width);
|
|
||||||
println!("setting wrap width during paint: {wrap_width:?}");
|
|
||||||
if editor.set_wrap_width(Some(wrap_width), cx) {
|
if editor.set_wrap_width(Some(wrap_width), cx) {
|
||||||
editor.snapshot(cx)
|
editor.snapshot(cx)
|
||||||
} else {
|
} else {
|
||||||
|
@ -4183,7 +4181,6 @@ fn compute_auto_height_layout(
|
||||||
let overscroll = size(em_width, px(0.));
|
let overscroll = size(em_width, px(0.));
|
||||||
|
|
||||||
let editor_width = text_width - gutter_margin - overscroll.width - em_width;
|
let editor_width = text_width - gutter_margin - overscroll.width - em_width;
|
||||||
println!("setting wrap width during layout: {editor_width:?}");
|
|
||||||
if editor.set_wrap_width(Some(editor_width), cx) {
|
if editor.set_wrap_width(Some(editor_width), cx) {
|
||||||
snapshot = editor.snapshot(cx);
|
snapshot = editor.snapshot(cx);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue