Commit Graph
282 Commits
Author SHA1 Message Date
Antonio Scandurra 82749a0483 Merge remote-tracking branch 'origin/main' into assistant-2 2023-06-06 19:18:22 +02:00
Antonio Scandurra e839eac008 Only remove excerpts when an edit touches them 2023-06-06 12:27:05 +02:00
Joseph Lyons 4b5a7ec94a Fix typos 2023-06-02 22:02:19 -04:00
Piotr Osiewicz 2ff93b2bc5 editor: add select previous command (#2556)
Added a `select previous` command to complement `select next`.
Release Notes:

- Added "Select previous" editor command, mirroring `Select next`.
Ticket number: Z-366
2023-06-02 17:32:34 +02:00
Max Brunsfeld c338c69da7 Make language_settings take a language, not a language name 2023-05-31 15:10:30 -07:00
Max Brunsfeld 6f55841897 Make language settings accessors take an arc dyn file 2023-05-31 14:57:04 -07:00
Max Brunsfeld fb4c174fd1 Start work on respecting project-specific settings 2023-05-29 14:25:49 -07:00
Julia a3bc3f85a9 Clean up final remaining code paths calling old diff update method 2023-05-25 14:41:09 -04:00
Julia ee718b9a33 Remove concept of git diff refresh from Item trait 2023-05-25 14:29:28 -04:00
JuliaandMax Brunsfeld 7331f2ce3f Project level git diff recalc handling
This avoids an issue where in a many-buffer multi-buffer, each modified
buffer could complete its recalc independently, causing a cascade of
repeated notifies

Now all recalcs started at the same time must complete before
 A: Starting another recalc pass
 B: The master notify occurring

Each buffer can still show its new diff if something else triggers it
to notify earlier, this is desirable and does not have the same negative
effects as the notify cascade as those re-layouts would need to happen
anyway

Co-Authored-By: Max Brunsfeld <max@zed.dev>
2023-05-25 14:10:27 -04:00
Antonio Scandurra 6d264ad544 Fix opening excerpt when the cursor is at the end of a multi-buffer
This was caused by seeking with a right bias, which in the case of the
last excerpt in the buffer would seek past the end of the buffer.  This
commit changes the behavior to move the cursor back to the previous excerpt
if we overshoot, to ensure we always land on an excerpt.
2023-05-24 15:02:57 +02:00
Mikayla Makiandmax b9fb1b649a Make scrollbar content detection cheaper
Remove scrollbars from multibuffers

co-authored-by: max <max@zed.dev>
2023-05-22 10:55:44 -07:00
Mikayla Maki b72cdb7362 Refactored apart the forward and the backwards iterator for diff hunks 2023-05-19 18:09:47 -07:00
Max Brunsfeld 0ba61e19b9 Avoid unnecessary code action requests when applying leader updates to an editor 2023-05-18 14:46:23 -07:00
Max Brunsfeld 30e678a450 Remove optional path argument when getting settings 2023-05-17 15:05:20 -07:00
Max Brunsfeld c261a01c7f Define theme/ui text style settings in theme crate 2023-05-17 14:44:59 -07:00
Max Brunsfeld 56f2ff64ed Define language settings in the language crate 2023-05-16 17:29:53 -07:00
Julia cac502638d Fixup cases using buffer model handle id as buffer id 2023-05-04 12:32:31 -04:00
Max Brunsfeld 1486f1e91a Add copilot.disabled_globs setting 2023-05-01 13:45:47 -07:00
Julia 3321d699dc Finish getting multiple diagnostics sources building and running 2023-04-20 08:58:41 -07:00
Julia 6081351ee7 Incomplete refactor to allow for multiple adapters per language 2023-04-20 08:58:39 -07:00
Antonio Scandurra 3d716ae700 Reopen file in Copilot language server when language or URI changes 2023-04-20 09:34:20 +02:00
Max Brunsfeld 5bcf6da6ea Fix 'invalid insertion' panic when following
Wait for the necessary buffer operations to arrive before attempting to
set selections and scroll top.
2023-04-18 16:13:18 -07:00
Nathan Sobo d937660683 Merge MutableAppContext into AppContext
There may have been a good reason for the difference at some point, or I was
still learning Rust. But now it's just &mut AppContext vs &AppContext.
2023-04-06 15:49:03 -06:00
93db8b20e2 Fix prefix/suffix calculation when determining copilot suggestion
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
Co-Authored-By: Mikayla Maki <mikayla@zed.dev>
2023-03-31 18:05:07 +02:00
Mikayla Makiandmax 4a5337e031 Fix boundary condition in buffer_line_len when at the end of a file
co-authored-by: max <max@zed.dev>
2023-03-17 16:56:44 -07:00
Antonio Scandurra f8d24f66a2 Return last excerpt in MultiBuffer::excerpt_containing if overshooting 2023-03-10 17:28:08 +01:00
Max Brunsfeld 853c34fdfb Merge pull request #2187 from zed-industries/save-untitled-buffer-bugs
Fix newly-discovered bugs in saving untitled buffers
2023-02-20 10:05:58 -08:00
Kay Simmons 15cd99c013 Fix failing test 2023-02-17 22:00:39 -08:00
Max Brunsfeld 61d5482bd5 Start work on making save and save_as code paths more similar 2023-02-17 15:52:13 -08:00
Kay Simmons 327c58fdc3 fix vim percent motion to better match the docs and observed behavior 2023-02-17 14:55:19 -08:00
Kay Simmons 3e152b5d33 wip 2023-02-16 12:23:45 -08:00
Kay Simmons 66b98aa2cc fix comment typo 2023-02-15 14:11:00 -08:00
Kay Simmons 6f1c04827f use more predictable rules for selecting which bracket to jump to and where 2023-02-15 14:04:16 -08:00
Max BrunsfeldandJulia Risley b3dc191963 Implement scope-specific bracket matching and comment toggling
Co-authored-by: Julia Risley <julia@zed.dev>
2023-01-19 15:04:27 -08:00
Max BrunsfeldandJulia Risley 786ff5ab05 Start work on language config overrides
Co-authored-by: Julia Risley <julia@zed.dev>
2023-01-19 12:32:08 -08:00
Antonio Scandurra 89ccd53f33 Merge branch 'main' into optimize-large-multi-buffers 2023-01-19 16:18:21 +01:00
Antonio Scandurra 33f4c816d5 Add test for stream_excerpts_with_context_lines 2023-01-19 15:54:32 +01:00
Antonio Scandurra f6c378366f Introduce MultiBuffer::stream_excerpts_with_context_lines
This allows us to push excerpts in a streaming fashion without blocking
the main thread.
2023-01-19 15:42:14 +01:00
Max Brunsfeld c0730db60e Replace MultiBuffer::files with ::for_each_buffer 2023-01-17 16:16:44 -08:00
Max BrunsfeldandNathan Sobo c07f90cb54 Assert that buffers' file state matches in randomized collab test
Co-authored-by: Nathan Sobo <nathan@zed.dev>
2022-12-21 15:38:44 -08:00
Antonio Scandurra 55c5989abc Synchronize buffers when either the host or a guest reconnects 2022-12-21 14:20:56 +01:00
Julia 6fb3bad2e8 Merge pull request #1983 from zed-industries/multi-buffer-git-gutter
Multi buffer git gutter
2022-12-19 10:53:42 -05:00
JuliaandNathan Sobo da9a238d26 Handle reversed=true for multi-buffer git-hunks-in-range iteration
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-12-15 18:17:32 -05:00
JuliaandMax Brunsfeld 48c0db49da Rewrite multi-buffer aware git hunks in range to be more correct
Less ad-hoc state tracking, rely more on values provided by the
underlying data

Co-Authored-By: Max Brunsfeld <max@zed.dev>
2022-12-15 17:09:09 -05:00
Julia c0c47139aa Get tests building again 2022-12-15 00:17:28 -05:00
Julia 9f81f1f5c7 Clamp end of visual git hunk to requested range 2022-12-13 13:58:50 -05:00
Julia 4c2ee3d972 Cleanup 2022-12-13 12:35:58 -05:00
Julia d100acd3b1 Initial hacky displaying of git gutter in multi-buffers 2022-12-13 12:35:58 -05:00
Max Brunsfeld ce0c9a8dd4 Start work on following in multi-buffers 2022-11-29 14:50:43 -08:00