ZIm/crates
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
..
activity_indicator chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
anthropic Fix older Anthropic models not supporting -latest tags (#23372) 2025-01-20 13:19:15 -05:00
assets chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
assistant 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
assistant2 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
assistant_context_editor assistant2: Adjust empty state when there is no provider (#23609) 2025-01-24 12:51:14 -03:00
assistant_settings chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
assistant_slash_command Add assistant_context_editor crate (#23429) 2025-01-21 21:22:59 +00:00
assistant_slash_commands chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
assistant_tool chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
assistant_tools chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
audio chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
auto_update chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
auto_update_ui chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
breadcrumbs chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
call Allow filling co-authors in the git panel's commit input (#23329) 2025-01-18 22:57:17 +02:00
channel Allow filling co-authors in the git panel's commit input (#23329) 2025-01-18 22:57:17 +02:00
cli chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
client Require accepting ToS when enabling zeta (#23255) 2025-01-20 11:48:49 -03:00
clock chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
collab 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
collab_ui Allow filling co-authors in the git panel's commit input (#23329) 2025-01-18 22:57:17 +02:00
collections chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
command_palette Load all key bindings that parse and use markdown in error notifications (#23113) 2025-01-18 22:27:08 +00:00
command_palette_hooks chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
context_server chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
context_server_settings chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
copilot project: Revert project tree impl (again) (#23572) 2025-01-23 16:10:38 -05:00
db chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
diagnostics 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
docs_preprocessor Prefer later bindings in keymap section for display in UI (#23378) 2025-01-20 23:20:15 +00:00
editor 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
evals chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
extension chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
extension_api chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
extension_cli chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
extension_host chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
extensions_ui chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
feature_flags feature_flags: Enable assistant2 for all staff (#23502) 2025-01-22 23:02:53 +00:00
feedback chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
file_finder 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
file_icons chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
fireworks chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
fs search: Add heuristic for discarding matching of binary files (#23581) 2025-01-23 22:15:58 +00:00
fsevent chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
fuzzy chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
git 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
git_hosting_providers chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
git_ui git: Disable "stage all" checkbox when no entries (#23608) 2025-01-24 15:29:34 -05:00
go_to_line 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
google_ai chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
gpui Fix single line edit prediction detection (#23456) 2025-01-22 10:00:43 -03:00
gpui_macros project: Revert project tree impl (again) (#23572) 2025-01-23 16:10:38 -05:00
html_to_markdown html_to_markdown: Restore ability to publish (#23293) 2025-01-17 17:57:13 +00:00
http_client chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
image_viewer chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
indexed_docs chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
inline_completion inline completion: Add syntax highlighting for edit prediction (#23361) 2025-01-23 17:32:43 +00:00
inline_completion_button Toggle inline completion menu from keyboard (#23380) 2025-01-20 19:11:13 -03:00
install_cli chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
journal chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
language 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
language_extension Omit tsdk_path from the servers' options if it does not exist (#23525) 2025-01-23 11:17:32 +00:00
language_model open_ai: Move from o1-preview to o1 for OpenAI Assistant provider (#23425) 2025-01-21 15:05:21 -05:00
language_model_selector chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
language_models assistant: Adjust the ToS acceptance card design (#23599) 2025-01-24 09:44:09 -03:00
language_selector chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
language_tools 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
languages Support yaml-language-server as formatter without lsp settings (#23612) 2025-01-24 12:51:16 -05:00
livekit_client chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
livekit_client_macos chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
livekit_server chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
lmstudio chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
lsp project: Revert project tree impl (again) (#23572) 2025-01-23 16:10:38 -05:00
markdown chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
markdown_preview Load all key bindings that parse and use markdown in error notifications (#23113) 2025-01-18 22:27:08 +00:00
media chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
menu chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
multi_buffer 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
node_runtime chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
notifications chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
ollama ollama: Set default max_tokens for llama3.3 (#23558) 2025-01-23 17:38:43 +00:00
open_ai open_ai: Move from o1-preview to o1 for OpenAI Assistant provider (#23425) 2025-01-21 15:05:21 -05:00
outline chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
outline_panel 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
paths chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
picker chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
prettier project: Revert project tree impl (again) (#23572) 2025-01-23 16:10:38 -05:00
project 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
project_panel project_panel: Adjust entry background and border colors (#23403) 2025-01-21 11:13:46 -03:00
project_symbols chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
prompt_library Dedupe PromptBuilder construction (#23496) 2025-01-22 22:17:36 +00:00
proto project: Revert project tree impl (again) (#23572) 2025-01-23 16:10:38 -05:00
recent_projects terminal: Add scrollbar (#23256) 2025-01-18 17:36:41 +01:00
refineable project: Revert project tree impl (again) (#23572) 2025-01-23 16:10:38 -05:00
release_channel chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
remote chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
remote_server 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
repl Fix terminal memory leak by deduping alacritty events on background thread (#23593) 2025-01-24 10:25:03 +00:00
reqwest_client chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
rich_text chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
rope 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
rpc chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
search chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
semantic_index chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
semantic_version chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
session chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
settings Display keymap errors on initial load (#23394) 2025-01-21 07:14:46 +00:00
settings_ui chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
snippet chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
snippet_provider chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
snippets_ui chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
sqlez chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
sqlez_macros chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
story chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
storybook Load all key bindings that parse and use markdown in error notifications (#23113) 2025-01-18 22:27:08 +00:00
streaming_diff chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
sum_tree 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
supermaven inline completion: Add syntax highlighting for edit prediction (#23361) 2025-01-23 17:32:43 +00:00
supermaven_api chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
tab_switcher tab_switcher: Preserve selected position on closed tabs (#22861) 2025-01-20 14:15:25 +02:00
task task: Always use untruncated label if it is short (#23611) 2025-01-24 16:46:48 +00:00
tasks_ui task: Always use untruncated label if it is short (#23611) 2025-01-24 16:46:48 +00:00
telemetry chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
telemetry_events chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
terminal Fix terminal memory leak by deduping alacritty events on background thread (#23593) 2025-01-24 10:25:03 +00:00
terminal_view 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
text 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
theme theme: Add version control colors (#23529) 2025-01-23 07:56:49 -05:00
theme_extension chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
theme_importer chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
theme_selector chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
time_format chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
title_bar title_bar: Use an IconButton for the user menu (#23601) 2025-01-24 09:49:50 -03:00
toolchain_selector chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
ui assistant2: Adjust spacing and icons on the context picker (#23607) 2025-01-24 12:34:11 -03:00
ui_input chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
ui_macros project: Revert project tree impl (again) (#23572) 2025-01-23 16:10:38 -05:00
util search: Move invalid UTF-8 errors to debug level (#23602) 2025-01-24 14:11:45 +01:00
vcs_menu chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
vim 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
vim_mode_setting chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
welcome Update "Book Onboarding" destination link (#23464) 2025-01-22 16:24:39 +00:00
workspace 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
worktree Remove unwrap in GitTraversal::synchronize_statuses (#23555) 2025-01-23 12:13:20 -05:00
zed 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
zed_actions assistant2: Add button to open the prompt library (#23500) 2025-01-22 22:53:54 +00:00
zed_predict_tos Require accepting ToS when enabling zeta (#23255) 2025-01-20 11:48:49 -03:00
zeta inline completion: Add syntax highlighting for edit prediction (#23361) 2025-01-23 17:32:43 +00:00