Closes https://github.com/zed-industries/zed/issues/27619
Fixes issue with right wrapped movement when a multi-byte character is
at the end of the line. This is done by grabbing the last character on
the current row and using that characters size to calculate the
`max_column` variable, which is used to decide if the next right
movement should move down the line or not.
We did notice a bit of code that could be an issue that we wanted to
call out.
[Here](https://github.com/zed-industries/zed/blob/main/crates/editor/src/display_map.rs#L1070)
inside of `clip_at_line_end` it also does a saturating_sub(1), assuming
a single byte character. We didn't run into any issues due to this line
but felt like a similar bug. We can apply a similar fix if wanted to
pose the question first.
Test case: Moving to next line when eol is a multi-byte character
https://github.com/user-attachments/assets/1021ab1f-f49d-4986-8f9a-8cfc7e5c91bc
Release Notes:
- Fixed issue in vim forward spacing when a multi-byte character is at
the eol
---------
Co-authored-by: KyleBarton <kjbarton4@gmail.com>
Python envs created with virtualenvwrapper have the ability to link to
the project directory (via the `.project` file in the virtualenv).
`python-environment-tools` supports this and reports the project path.
Additionally, some tools (e.g virtualfish) recognize special
"environment activation" files in project directories (`.venv` by
default)
[1].
Use the above information to sort reported Python toolchains so that the
correct env for a given worktree is at the top.
[1]
https://virtualfish.readthedocs.io/en/latest/plugins.html#auto-activation-auto-activation
Release Notes:
- python: Improved detection of virtualenvwrapper environments in work
trees
This PR updates the Agent Panel tooltip in the status to use "Agent
Panel" instead of "Assistant Panel".
Also changes the name we use in workspace serialization.
Release Notes:
- N/A
This PR makes it so we include the `default_profile` and `profiles`
settings in the JSON schema.
This provides completions when editing the `settings.json`.
Release Notes:
- N/A
This unblocks work on new debugger UI, where we don't want the
set_active function to be called unconditionally.
Release Notes:
- N/A
---------
Co-authored-by: Anthony Eid <hello@anthonyeid.me>
This PR adds a new `enable_all_context_servers` field to agent profiles
to allow them to enable all context servers without having to opt into
them individually.
The "Write" profile will now have all context servers enabled out of the
box.
Release Notes:
- N/A
Eager and Subtle modes are only supported for Zed as an edit prediction
provider and they were visible if your provider is Copilot, which is
misleading.
Release Notes:
- N/A
Closes#26902
- We used to serialize SSH remote only when opened via recent entries,
and not on first time. This broke restore, when opening same folder for
second time from recent entries. Once opened for second time, restoring
used to. work correctly. This PR fixes this by serializing when opened
for first time.
- We didn't handle window replace post worktree creation in first time
flow, this resulted in project panel not opening automatically like it
does with recent entries, or local projects. This PR fixes it by
following same flow as recent entries.
Release Notes:
- Fixed SSH remote not restoring when opening for second time.
- Fixed project panel not opening when opening new SSH remote folder.
This PR fixes two bugs that cause unexpected behavior with breakpoints.
The first bug made it impossible to delete the last breakpoint in a file
in the workspace's database. This caused deleted breakpoints to remain
in the database and added to new projects.
The second bug was an edge case in the breakpoint context menu where
disabling/enabling a breakpoint would sometimes set a new breakpoint on
top of the old breakpoint.
Release Notes:
- N/A
Motivation for this is to simplify the context types and make it cleaner
to add image context.
Release Notes:
- N/A
---------
Co-authored-by: Nathan Sobo <nathan@zed.dev>
Closes#27728
This stops code actions tooltip from being added when there's a visible
Editor::context_menu
Release Notes:
- Fix code actions tooltip opening on top of code actions menu
This PR adds functionality for loading the diff for an arbitrary git
commit, and displaying it in a tab. To retrieve the diff for the commit,
I'm using a single `git cat-file --batch` invocation to efficiently load
both the old and new versions of each file that was changed in the
commit.
Todo
* Features
* [x] Open the commit view when clicking the most recent commit message
in the commit panel
* [x] Open the commit view when clicking a SHA in a git blame column
* [x] Open the commit view when clicking a SHA in a commit tooltip
* [x] Make it work over RPC
* [x] Allow buffer search in commit view
* [x] Command palette action to open the commit for the current blame
line
* Styling
* [x] Add a header that shows the author, timestamp, and the full commit
message
* [x] Remove stage/unstage buttons in commit view
* [x] Truncate the commit message in the tab
* Bugs
* [x] Dedup commit tabs within a pane
* [x] Add a tooltip to the tab
Release Notes:
- Added the ability to show past commits in Zed. You can view the most
recent commit by clicking its message in the commit panel. And when
viewing a git blame, you can show any commit by clicking its sha.
Reverts the error behavior introduced in #27558. Upper-case keys in
keybindings no longer generate errors, instead they are transformed into
`shift-{KEY}`
e.g. `ctrl-N` becomes `ctrl-shift-n`
The behavior introduced in #27558 where "special" keys such as function
keys, `control`, `shift`, etc. Are parsed case-insensitively is
preserved.
Release Notes:
- Improved how upper-case characters are handled in keybinds. "special"
keys such as the function keys, `control`, `shift`, etc. are now parsed
case-insensitively, so for example `F8`, `CTRL`, `SHIFT` are now
acceptable alternatives to `f8`, `ctrl`, and `shift` when declaring
keybindings. Additionally, upper-case (ascii) characters will now be
converted explicitly to `shift` + the lowercase version of the
character, to match the Vim behavior.
NOTE: Release notes above should replace the release notes from #27558
This PR disables the "Suggest Edits" feature when in the `assistant2`
feature flag.
This functionality has been superseded by the new Agent Panel.
We can remove the feature outright once the Agent Panel is generally
available.
Release Notes:
- N/A
To make it easier to design UIs for some of these scenarios. This PR
adds specifically two variables:
- `ZED_SIMULATE_NO_THREAD_HISTORY`
- `ZED_SIMULATE_NO_LLM_PROVIDER`
Release Notes:
- N/A
---------
Co-authored-by: Agus Zubiaga <hi@aguz.me>
Before this change we didn't explicitly handle vim's exclusive-linewise
edgecase
(https://neovim.io/doc/user/motion.html#exclusive).
Instead we had hard-coded workarounds in a few places to make our tests
pass.
The most pernicious of these workarounds was that we represented a
visual line
selection as including the trailing newline (or leading newline for
files that
end with no newline), which other code had to undo to get back to what
the user
indended.
Closes#21440
Updates #6900
Release Notes:
- vim: Fixed `d]}` to not delete the closing brace
- vim: Fixed `d}` from the start of the line to not delete the paragraph
separator
- vim: Fixed `d}` from the middle of the line to not delete the final
newline