ef42d14
Fix `WrapMap::clip_point` at the end of a soft-wrapped line
Click to expand commit body
If that's the case and `Bias` is `Left` we clip to the last
character of the soft-wrapped line.
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
Antonio Scandurra
and
Nathan Sobo
created
915c710
Ensure that we use the `WrapMap` where appropriate in `DisplayMap`
Click to expand commit body
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
Antonio Scandurra
and
Nathan Sobo
created
0875a86
Account for the impact of edits on tab expansion
Click to expand commit body
Tab characters are expanded differently based on the column on which
they appear, which edits can affect. Thus, `TabMap::sync` will now
expand edits to the first tab that appears on the line in which the edit
occurred.
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
Antonio Scandurra
and
Nathan Sobo
created
62ad97a
Add randomized test for `DisplayMap::buffer_rows` and fix logic errors
Antonio Scandurra
created
72fdd3f
Start rendering highlighted text and line numbers via the wrap map
8b34dea
Try to return edits from FoldMap::apply_edits
Click to expand commit body
The goal is to describe how the fold map changed. Hopefully this is correct.
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
Nathan Sobo
and
Max Brunsfeld
created
2c9f730
Give the FoldMap its own edit type that does not have deleted_lines
Click to expand commit body
We want to use this struct to communicate about edits performed to the fold map itself, and it will be simpler if we don't have to communicate this data.
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
Nathan Sobo
and
Max Brunsfeld
created
f561f33
Move DisplayMap's reading methods to DisplayMapSnapshot
Max Brunsfeld
created
2bde549
Move all FoldMap query methods to FoldMapSnapshot
Click to expand commit body
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
Nathan Sobo
and
Max Brunsfeld
created
09afba9
Introduce buffer::Content<'a> struct to share logic with buffer::Snapshot
Click to expand commit body
We want to move a bunch of methods on FoldMap to fold_map::Snapshot. This captures a buffer snapshot, and we'll need a bunch of methods that currently are on Buffer to also be implemented on buffer::Snapshot. This Content reference struct will be a good zero-cost place to store that logic.