Commit Graph
25009 Commits
Author SHA1 Message Date
Nathan Sobo b9c1da3278 Remove logging 2021-08-04 17:09:15 -06:00
Nathan Sobo 26cbd05668 Merge branch 'main' into theme-variables 2021-08-04 16:47:43 -06:00
Nathan Sobo 4d685518a8 Match file finder icon color to label color 2021-08-04 16:17:33 -06:00
Nathan Sobo e142b029f2 Pull empty selector label styling from correct place in theme 2021-08-04 16:12:15 -06:00
Nathan Sobo 30146e34aa Specify tab padding in theme 2021-08-04 16:08:15 -06:00
Nathan SoboandMax Brunsfeld 436d0abc4b Reload current theme on cmd-k shift-T
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-08-04 15:52:23 -06:00
Max BrunsfeldandNathan Sobo 20eaa9d759 Test bundled themes and store names on themes
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-08-04 14:16:28 -07:00
Max BrunsfeldandNathan Sobo 662e76d3bc 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
Nathan SoboandMax Brunsfeld 1b7c57daf3 Avoid crashes when laying out lines containing byte order marks
This solution isn't perfect and we'll probably have layout bugs with these lines, but this prevents us from triggering undefined behavior.

Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-08-04 11:52:21 -06:00
Nathan Sobo 370470ace3 Move remaining theme-related code and tests from settings mod to theme mod 2021-08-03 19:42:39 -06:00
Nathan SoboandMax Brunsfeld 37cc3aabf9 Implement themes::ThemeRegistry::get
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-08-03 19:35:15 -06:00
Nathan SoboandMax Brunsfeld 3755b0894d Start on new theme::ThemeRegistry
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-08-03 18:51:06 -06:00
Max Brunsfeld 03bcb5fa11 Restructure Theme with new style objects 2021-08-03 13:36:58 -07:00
Max BrunsfeldandNathan Sobo 51d1664122 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 BrunsfeldandNathan Sobo 9f279062db Extract {Container,Label}Style structs from those elements
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-08-03 11:07:03 -07:00
Nathan Sobo 7119581dec 💄 2021-08-02 20:07:48 -06:00
Nathan Sobo 9087dd6965 Notify all views when a theme is selected 2021-08-02 16:57:10 -06:00
Max BrunsfeldandNathan Sobo 5532f60e2f Add a theme picker
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-08-02 14:55:27 -07:00
Max BrunsfeldandNathan Sobo 8c27ccacce Remove use of replace_with crate for managing element lifecycles
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-08-02 13:11:11 -07:00
Max BrunsfeldandNathan Sobo dbd64ed410 Make Theme::default have a non-empty replica theme vector
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-08-02 13:09:43 -07:00
Antonio Scandurra ae54bdecda Fix moving to next word boundary with multi-byte characters
Previously, for a given point, we would create a char iterator at
the start of the row and the skip `column` characters. This is
however incorrect because display points are expressed in bytes,
and so we could park the anchor midway through a multi-byte character.

This commit fixes the issue by switching `DisplayMap::chars_at` to
take a point instead and skipping characters correctly when a point with
a non-zero column is provided.
2021-08-02 14:11:31 +02:00
Max Brunsfeld 660bc0f2ff Start work on allowing variables in themes 2021-07-30 17:28:22 -07:00
Nate a090ba1603 Ship new Zed icon! 2021-07-30 19:34:35 -04:00
Max Brunsfeld 8464b3d599 Merge pull request #121 from zed-industries/save-file-as-new-worktree
Fix error when saving an untitled file outside of any existing worktree
2021-07-30 14:22:41 -07:00
Max Brunsfeld db7a799e6c Fix saving an untitled file outside of any existing worktree 2021-07-30 14:19:42 -07:00
Max Brunsfeld e5b3aa8be5 Merge pull request #122 from zed-industries/deterministic-random-synchronous-tests
Use deterministic executor in randomized synchronous tests
2021-07-30 14:16:05 -07:00
Max Brunsfeld ed15275a88 Use deterministic executor in randomized synchronous tests
Remove App::test function
2021-07-30 14:07:37 -07:00
Max Brunsfeld a53b742b4e Fix type of Workspace::open_new_file context parameter
Fixes #118
2021-07-30 10:11:46 -07:00
Max Brunsfeld 6871ae3794 Specify zed as the workspace's default member
This way, `cargo run` at the root of the repo will run the Zed app
instead of the server.
2021-07-30 10:00:04 -07:00
Antonio Scandurra 392e8b76ba Don't mark the first row as soft-wrapped when the tree is empty
Also, add a randomized test to verify that soft-wrapped rows are
reported correctly.
2021-07-30 09:50:28 -07:00
Antonio Scandurra 3a839fd072 Highlight active lines 2021-07-30 09:50:28 -07:00
Antonio Scandurra 7e18bba1ac Highlight active row(s) in the gutter 2021-07-30 09:50:28 -07:00
Max Brunsfeld 85fdc91e47 Extract most colors in codebase into theme file. switch to dark 2021-07-30 09:50:28 -07:00
Nathan SoboandMax Brunsfeld e65ad6fe16 Allow more time wrapping to complete synchronously
We're seeing occasional flickers and wondering if this will help.

Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-07-30 09:50:28 -07:00
Nathan Sobo 2893aa6905 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
Max Brunsfeld 6b3ff608a8 WIP - unit test for word-wise movement w/ soft wrap 2021-07-30 09:50:28 -07:00
Nathan SoboandMax Brunsfeld 0f5010d4e1 Add some incomplete tests for movement
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-07-30 09:50:28 -07:00
Nathan SoboandAntonio Scandurra 400a1e05c3 Fix movement across soft wrap boundaries
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2021-07-30 09:50:28 -07:00
Nathan SoboandAntonio Scandurra 25686779a7 Make unfolding inclusive
If the range *touches* the fold, we unfold. This was needed to fix the behavior for unfolding at the current selection position. Previously, there was some kind of translation issue that was allowing us to accidentally work the way we wanted without this.

Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2021-07-30 09:50:28 -07:00
Nathan SoboandAntonio Scandurra 77d8ddc185 Only honor rightward bias for buffer points *inside* of folds
(Not at boundaries)

Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2021-07-30 09:50:28 -07:00
Nathan SoboandAntonio Scandurra dcdb1622a4 Introduce a struct for spanned_rows result
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2021-07-30 09:50:28 -07:00
Nathan SoboandAntonio Scandurra a33aea85a1 Respect buffer row boundaries in line-oriented edit operations
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2021-07-30 09:50:28 -07:00
Nathan SoboandAntonio Scandurra 74fc71c901 Don't let people retry randomized tests
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2021-07-30 09:50:28 -07:00
Nathan SoboandAntonio Scandurra b6e235be86 Reuse FontCache across randomized tests
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2021-07-30 09:50:28 -07:00
Nathan SoboandAntonio Scandurra 731d86616c 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 BrunsfeldandNathan Sobo a88668b83b 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 0587862118 Add a bias parameter when converting buffer points to fold points 2021-07-30 09:50:28 -07:00
Max BrunsfeldandNathan Sobo fdeab5c15e Add randomized test for DisplayMap
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-07-30 09:50:28 -07:00
Antonio Scandurra f9d13d741f WIP 2021-07-30 09:50:28 -07:00
Max BrunsfeldandAntonio Scandurra 5f4d6eb3cc Parse randomized test env vars at runtime
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2021-07-30 09:50:28 -07:00