Commit log

b647e3e Make `WrapMap` and `DisplayMap` models

Click to expand commit body
This removes the need for a lock around in `WrapMap` and also removes
`WrapMap::notifications` because gpui already has a standard way of
notifying when a model updates.

Antonio Scandurra created

b04c574 Set snapshot in the foreground after recomputing it in the background

Antonio Scandurra created

623d574 Fix mistakenly moved line in beginning/end of line editor tests

Antonio Scandurra created

0004dc6 Remove remaining I/O nomenclature for `DisplayMap` coordinates

Antonio Scandurra created

58054c6 Fix panic due to incorrectly calculating editor text size in layout

Antonio Scandurra created

61b5d66 Eliminate input/output nomenclature from fold_map

Click to expand commit body
Instead, just use FoldPoint, FoldOffset, etc. We don't need the naming to be general because we know exactly which layer we're building on at each layer of the DisplayMap.

Nathan Sobo created

da50576 Fix remaining errors and warnings

Nathan Sobo created

9edc8b9 WIP

Nathan Sobo created

3bf47be WIP

Nathan Sobo created

f81f043 WIP

Nathan Sobo created

11285f3 Pass a MutableAppContext to Element::layout and ::dispatch_event

Click to expand commit body
We need to mutate the app in these cases to relay layout state, so this just makes things easier. We won't be able to perform layout in parallel but it's questionable whether we'll ever actually do that. If we do, we can revisit.

Co-Authored-By: Antonio Scandurra <me@as-cii.com>
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>

Nathan Sobo , Antonio Scandurra , and Max Brunsfeld created

61f4580 Optimize `Buffer::edits_since` when the version hasn't changed

Click to expand commit body
Co-Authored-By: Nathan Sobo <nathan@zed.dev>

Antonio Scandurra and Nathan Sobo created

14fcc26 Don't insert empty isomorphic transforms when interpolating

Click to expand commit body
Co-Authored-By: Nathan Sobo <nathan@zed.dev>

Antonio Scandurra and Nathan Sobo created

a8db064 Get wrapping randomized test passing with wrap width as small as 0

Click to expand commit body
Co-Authored-By: Nathan Sobo <nathan@zed.dev>

Antonio Scandurra and Nathan Sobo created

174a546 Expand tabs correctly in `TabMap`'s highlighted chunks iterator

Click to expand commit body
Co-Authored-By: Nathan Sobo <nathan@zed.dev>

Antonio Scandurra and Nathan Sobo created

502f54a Don't poll foreground futures during `DeterministicExecutor::block_on`

Antonio Scandurra created

416571e Fix wrap map randomized tests

Antonio Scandurra created

d61f26d Get randomized test compiling against new WrapMap structure

Click to expand commit body
It doesn't pass.

Max Brunsfeld created

53fd3a1 Move LineWrapper test to line_wrapper.rs

Max Brunsfeld created

5d22c6c Start restructuring WrapMap with simpler concurrency

Click to expand commit body
Co-Authored-By: Nathan Sobo <nathan@zed.dev>

Max Brunsfeld and Nathan Sobo created

80f13dd WIP

Antonio Scandurra created

f7c8864 Fix panic in `WrapMap::highlighted_chunks_for_rows`

Click to expand commit body
Also, add a unit test for `DisplayMap` with syntax highlighting when
soft wrap is on.

Antonio Scandurra created

830f533 Start work on wrapping lines without text shaping

Max Brunsfeld created

f169f8e Ensure that soft wrapped lines don't cause horizontal scrolling

Nathan Sobo created

699e558 Remove logging

Nathan Sobo created

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

Click to expand commit body
Co-Authored-By: Nathan Sobo <nathan@zed.dev>

Max Brunsfeld and Nathan Sobo created

b513df3 WIP

Nathan Sobo created

07e97e6 wip

Max Brunsfeld created

d0fdc7b Get simple unit test passing for soft-wrap in DisplayMap

Max Brunsfeld created

7832562 Add WrapMap as a member of DisplayMap

Click to expand commit body
Co-Authored-By: Nathan Sobo <nathan@zed.dev>

Max Brunsfeld and Nathan Sobo created

dbc8fc3 Fix assertions in fold map test

Click to expand commit body
Co-Authored-By: Nathan Sobo <nathan@zed.dev>

Max Brunsfeld and Nathan Sobo created

61397f2 Avoid holding executor's state lock while parked

Click to expand commit body
Co-Authored-By: Nathan Sobo <nathan@zed.dev>

Max Brunsfeld and Nathan Sobo created

ee21369 Replace DeterministicExecutor::reset with forbid_parking

Click to expand commit body
There's really no point calling reset if we plan on parking afterwards.

Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>

Nathan Sobo and Max Brunsfeld created

64927ab Allow DeterministicExecutor to park until forbid_parking is called

Click to expand commit body
This allows us to perform async setup such as talking to the database.

Nathan Sobo created

f626376 WIP: interpolate edits into snapshot coming from `BackgroundWrapper`

Click to expand commit body
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
Co-Authored-By: Max Brunsfeld <max@zed.dev>

Antonio Scandurra , Nathan Sobo , and Max Brunsfeld created

3d3a14b Add `DeterministicExecutor::block_on(duration, future)`

Click to expand commit body
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
Co-Authored-By: Max Brunsfeld <max@zed.dev>

Antonio Scandurra , Nathan Sobo , and Max Brunsfeld created

3d8c59a Implement `Snapshot::interpolate`

Antonio Scandurra created

b66de06 Ensure that `WrapMap`'s input lines match `TabMap`'s output lines

Antonio Scandurra created

d0113a1 Coalesce contiguous isomorphic transforms

Antonio Scandurra created

3d845f8 Remove stray logging statements

Antonio Scandurra created

39b7349 Make randomized tests pass with one operation

Antonio Scandurra created

3b77b01 Iterate on randomized wrapping test and fix some bugs

Click to expand commit body
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>

Nathan Sobo and Max Brunsfeld created

e0da3fd Get the randomized soft wrap test passing with no edits

Click to expand commit body
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>

Nathan Sobo and Max Brunsfeld created

2ce42ff Honor the last line when wrapping even if it doesn't end in \n

Click to expand commit body
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>

Nathan Sobo and Max Brunsfeld created

f9e13f3 Start work on WrapMap::chunks_at

Click to expand commit body
Co-Authored-By: Nathan Sobo <nathan@zed.dev>

Max Brunsfeld and Nathan Sobo created

8e9a5e0 Fix typo in Point::add_assign

Max Brunsfeld created