Max Brunsfeld and Nathan Sobo
802f1f4e78
Get new theme structure working
...
* Fix precedence of extends directives
* Always group color with font properties for text theming
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2021-08-04 14:07:19 -07:00
Max Brunsfeld and Nathan Sobo
ef0ffbe819
Use custom color wrapper type everywhere in gpui & zed
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2021-08-03 12:48:58 -07:00
Max Brunsfeld
92353b6967
Start work on allowing variables in themes
2021-07-30 17:28:22 -07:00
Nathan Sobo
e7d03af942
Fix moving to previous word across a wrap boundary
...
I'm just going to the end of the soft-wrapped line, mirroring the behavior with hard wraps. It's maybe not perfectly technically correct but that behavior would require us to consider word boundaries outside of the current line, which doesn't seem worth the complexity.
2021-07-30 09:50:28 -07:00
Nathan Sobo and Max Brunsfeld
aab51e7576
Add some incomplete tests for movement
...
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com >
2021-07-30 09:50:28 -07:00
Nathan Sobo and Antonio Scandurra
492a09f1be
Fix movement across soft wrap boundaries
...
Co-Authored-By: Antonio Scandurra <me@as-cii.com >
2021-07-30 09:50:28 -07:00
Nathan Sobo and Antonio Scandurra
a1991a7458
Report the end of the current row rather than the start of the next
...
Co-Authored-By: Antonio Scandurra <me@as-cii.com >
2021-07-30 09:50:28 -07:00
Max Brunsfeld and Nathan Sobo
82ed33a924
Fix bugs in {prev,next}_row_boundary
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2021-07-30 09:50:28 -07:00
Max Brunsfeld
05f8a61bc8
Add a bias parameter when converting buffer points to fold points
2021-07-30 09:50:28 -07:00
Max Brunsfeld and Nathan Sobo
c1808d09ef
Add randomized test for DisplayMap
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2021-07-30 09:50:28 -07:00
Antonio Scandurra
576cabea93
WIP
2021-07-30 09:50:28 -07:00
Antonio Scandurra
42e2b9ff4d
Move buffer rows test into WrapMap randomized test
...
Also, change the way we assert on buffer rows to reflect the fact
that we will still show the line as soft-wrapped when there is a
fold that spans multiple buffer rows.
2021-07-30 09:50:28 -07:00
Nathan Sobo
613192974f
Don't render line numbers for soft-wrapped line segments
2021-07-30 09:50:28 -07:00
Antonio Scandurra and Nathan Sobo
694ab0d69d
Fix outdated test assertions after changing wrapping behavior
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2021-07-30 09:50:28 -07:00
Antonio Scandurra and Nathan Sobo
164cafa57d
Preserve indentation when soft-wrapping
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2021-07-30 09:50:28 -07:00
Antonio Scandurra
b647e3ee71
Make WrapMap and DisplayMap models
...
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.
2021-07-26 13:02:31 +02:00
Antonio Scandurra
0004dc6921
Remove remaining I/O nomenclature for DisplayMap coordinates
2021-07-26 11:19:36 +02:00
Nathan Sobo
61b5d66ba8
Eliminate input/output nomenclature from fold_map
...
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.
2021-07-25 08:22:50 -06:00
Nathan Sobo
3bf47be51e
WIP
2021-07-24 08:09:04 -06:00
Nathan Sobo
f81f043058
WIP
2021-07-23 12:25:09 -06:00
Antonio Scandurra
416571e8e0
Fix wrap map randomized tests
2021-07-23 11:26:53 +02:00
Max Brunsfeld and Nathan Sobo
5d22c6c4bd
Start restructuring WrapMap with simpler concurrency
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2021-07-22 16:21:42 -07:00
Antonio Scandurra
80f13dd737
WIP
2021-07-22 18:31:01 +02:00
Antonio Scandurra
f7c8864995
Fix panic in WrapMap::highlighted_chunks_for_rows
...
Also, add a unit test for `DisplayMap` with syntax highlighting when
soft wrap is on.
2021-07-22 10:08:29 +02:00
Antonio Scandurra and Nathan Sobo
ef42d14b8c
Fix WrapMap::clip_point at the end of a soft-wrapped line
...
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 >
2021-07-21 18:32:32 +02:00
Antonio Scandurra and Nathan Sobo
915c710f94
Ensure that we use the WrapMap where appropriate in DisplayMap
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2021-07-21 18:04:58 +02:00
Antonio Scandurra
62ad97a728
Add randomized test for DisplayMap::buffer_rows and fix logic errors
2021-07-21 14:45:25 +02:00
Max Brunsfeld and Nathan Sobo
72fdd3fb9a
Start rendering highlighted text and line numbers via the wrap map
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2021-07-20 18:03:02 -07:00
Max Brunsfeld
d0fdc7b5e8
Get simple unit test passing for soft-wrap in DisplayMap
2021-07-20 15:22:11 -07:00
Max Brunsfeld and Nathan Sobo
7832562675
Add WrapMap as a member of DisplayMap
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2021-07-20 13:03:59 -07:00
Antonio Scandurra and Nathan Sobo
631a6a2f45
Re-enable wrap_map module and fix compile errors
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2021-07-19 18:40:57 +02:00
Antonio Scandurra and Nathan Sobo
359132ac19
Extract tab expansion logic into TabMap
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2021-07-19 17:29:03 +02:00
Antonio Scandurra and Nathan Sobo
5a0d156cc5
Clarify input and output coordinates in display_map
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2021-07-19 16:18:20 +02:00
Antonio Scandurra and Nathan Sobo
1ba9e48271
Start on adding a randomized test for BackgroundWrapper
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2021-07-16 17:53:23 +02:00
Antonio Scandurra
831b620e51
Make writing/reading FoldMap explicit so that we can retrieve edits
2021-07-16 13:49:38 +02:00
Antonio Scandurra
23b55d88d9
Pull snapshot history out of fold map
2021-07-16 13:49:02 +02:00
Max Brunsfeld
e0930ddc09
Add FoldMapSnapshot::edits_since_creation
2021-07-15 18:27:59 -07:00
Max Brunsfeld
f561f33aa9
Move DisplayMap's reading methods to DisplayMapSnapshot
2021-07-15 11:48:57 -07:00
Nathan Sobo and Max Brunsfeld
2bde54971e
Move all FoldMap query methods to FoldMapSnapshot
...
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com >
2021-07-15 11:36:24 -06:00
Antonio Scandurra
a5edc14e3a
WIP: Start on WrapMap
2021-07-14 18:43:48 +02:00
Max Brunsfeld
04c80578bc
Start work on sending buffer operations
2021-06-25 13:46:36 -07:00
Nathan Sobo and Max Brunsfeld
a364839e93
Replace FileHandle with File entity that subscribes to Worktree update events
...
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com >
2021-06-21 20:40:40 -06:00
Max Brunsfeld
ca87dccf47
Rename context parameters to cx in display_map.rs
2021-05-28 15:04:34 -07:00
Max Brunsfeld and Nathan Sobo
139bcb8304
Rename foo/mod.rs files too foo.rs
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2021-05-28 14:41:58 -07:00