ZIm/crates/language/src
Max Brunsfeld d2c55cbe3d
Rework diff rendering to allow putting the cursor into deleted text, soft-wrapping and scrolling deleted text correctly (#22994)
Closes #12553

* [x] Fix `diff_hunk_before`
* [x] Fix failure to show deleted text when expanding hunk w/ cursor on
second line of the hunk
* [x] Failure to expand diff hunk below the cursor.
* [x] Delete the whole file, and expand the diff. Backspace over the
deleted hunk, panic!
* [x] Go-to-line now counts the diff hunks, but it should not
* [x] backspace at the beginning of a deleted hunk deletes too much text
* [x] Indent guides are rendered incorrectly 
* [ ] Fix randomized multi buffer tests

Maybe:
* [ ] Buffer search should include deleted text (in vim mode it turns
out I use `/x` all the time to jump to the next x I can see).
* [ ] vim: should refuse to switch into insert mode if selection is
fully within a diff.
* [ ] vim `o` command when cursor is on last line of deleted hunk.
* [ ] vim `shift-o` on first line of deleted hunk moves cursor but
doesn't insert line
* [x] `enter` at end of diff hunk inserts a new line but doesn't move
cursor
* [x] (`shift-enter` at start of diff hunk does nothing)
* [ ] Inserting a line just before an expanded hunk collapses it

Release Notes:


- Improved diff rendering, allowing you to navigate with your cursor
inside of deleted text in diff hunks.

---------

Co-authored-by: Conrad <conrad@zed.dev>
Co-authored-by: Cole <cole@zed.dev>
Co-authored-by: Mikayla <mikayla@zed.dev>
Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
Co-authored-by: Michael <michael@zed.dev>
Co-authored-by: Agus <agus@zed.dev>
Co-authored-by: João <joao@zed.dev>
2025-01-24 14:18:22 -07:00
..
syntax_map Use standard injection.language and injection.content captures (#22268) 2025-01-07 18:17:49 +00:00
buffer.rs Rework diff rendering to allow putting the cursor into deleted text, soft-wrapping and scrolling deleted text correctly (#22994) 2025-01-24 14:18:22 -07:00
buffer_tests.rs Rework diff rendering to allow putting the cursor into deleted text, soft-wrapping and scrolling deleted text correctly (#22994) 2025-01-24 14:18:22 -07:00
diagnostic_set.rs Add validation in LspCommand::to_lsp + check for inverted ranges (#22731) 2025-01-06 22:00:36 +00:00
highlight_map.rs Docs for indent_size_for_line and co 2024-01-09 20:50:34 +01:00
language.rs project: Revert project tree impl (again) (#23572) 2025-01-23 16:10:38 -05:00
language_registry.rs project: Revert project tree impl (again) (#23572) 2025-01-23 16:10:38 -05:00
language_settings.rs settings: Rename 'zeta' to 'zed' (#23174) 2025-01-15 10:53:30 +00:00
markdown.rs Make language registry optional in parse_markdown (#23221) 2025-01-16 03:56:46 -07:00
outline.rs Improve StringMatchCandidate::new interface (#22011) 2024-12-14 13:35:36 -07:00
proto.rs lsp: Track completion triggers for each language separately (#20471) 2024-11-10 10:29:10 +01:00
syntax_map.rs inline completion: Add syntax highlighting for edit prediction (#23361) 2025-01-23 17:32:43 +00:00
task_context.rs tasks: Add ability to query active toolchains for languages (#20667) 2024-11-14 14:37:37 +01:00
toolchain.rs toolchains: Do not use as_json representation for PartialEq (#21682) 2024-12-07 14:52:55 +01:00