Commit Graph
2292 Commits
Author SHA1 Message Date
030b20ace9 Fix scroll jitter by ignoring autoscroll events if following
When following someone else we saw jitter because
`ScrollPositionChanged` events were battling `SelectionsChanged` events,
both of which were scrolling the viewport.

This ignores the ScrollPositionChanged if autoscrolling is on.

Co-authored-by: Antonio <antonio@zed.dev>
Co-authored-by: Julia <julia@zed.dev>
2024-01-23 16:16:21 +01:00
Thorsten BallandAntonio c8c605d23a Fix horizontal scroll going too far to the left
Previously one could scroll infinitely to the left. This clams it to 0.

Co-authored-by: Antonio <antonio@zed.dev>
2024-01-23 12:28:50 +01:00
Conrad Irwin ce0833eadf Fix off-by-one highlighting in hover tooltip (#4206)
rust analyzer has a tendency to return markdown of the form:

```rust
 // <-- note the leading space
blah blah blah
```

This is clearly defectuous, so we used to .trim() the output.

Unfortunately we trim after applying syntax highlighting, so that causes
the output to look goofy.

Fix this by updating the highlighting when we trim.

[[PR Description]]

Release Notes:

- Fixed a bug where syntax highlighting was off in hover tooltips
2024-01-22 23:12:08 -07:00
Julia f2eb78bbfc Avoid overwriting mouse wheel scroll with selection auto-scroll (#4207)
Release Notes:

- Fixed an issue where mouse wheel events could be ignored while
selecting text near the top or bottom of the editor with the mouse.
2024-01-22 19:07:03 -05:00
Julia a2aa47aba2 Avoid overwriting mouse wheel scroll with selection auto-scroll 2024-01-22 18:12:25 -05:00
Conrad Irwin fd8d2d41b0 One off 2024-01-22 15:53:12 -07:00
Conrad Irwin 98d514f5bf Fix off-by-one highlighting in hover tooltip
rust analyzer has a tendency to return markdown of the form:

```rust
 // <-- note the leading space
blah blah blah
```

This is clearly defectuous, so we used to .trim() the output.

Unfortunately we trim after applying syntax highlighting, so that causes
the output to look goofy.

Fix this by updating the highlighting when we trim.
2024-01-22 15:23:37 -07:00
Conrad Irwin 53b47c15ac Hide editor hovers when a menu is open 2024-01-22 13:33:13 -07:00
JuliaandNathan Sobo 2c3d9805a4 Store a z-index id per-layer
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2024-01-22 10:16:59 -05:00
Kirill Bulatov 7aa3d9d1fb Fix lightning bolt hover and git gutter mark overlapping 2024-01-22 16:01:32 +02:00
Antonio Scandurra f76a2502bb Show diagnostics on hover 2024-01-22 12:01:53 +01:00
Mikayla c05edee2b5 Port the rest of the app 2024-01-21 20:26:33 -08:00
Conrad Irwin 3b84291343 Updates to chat after Hack#2 (#4175)
Release Notes:

- Channels: Improved font sizes in chat
- Channels: Added a link preview when hovering over links in chat
- Channels: Fixed rendering of newlines in chat messages
- Added a new setting "use_autoclose" (defaulting to true) that lets you
disable autoclose per language.
([#1420](https://github.com/zed-industries/community/issues/1420))
([#1903](https://github.com/zed-industries/community/issues/1903))
2024-01-20 20:03:37 -07:00
Conrad Irwin 29ac1fd081 Merge remote-tracking branch 'origin/main' into chat-font-size 2024-01-20 14:51:53 -07:00
Conrad Irwin 778856c101 Add a setting "use_autoclose" to control autoclose
Also disable autoclose for Chat
2024-01-20 13:33:03 -07:00
Mikayla 33105486aa Make platform input handler private
Automatically record the context on non-view input handlers
Simplify the async window context update() method
2024-01-20 06:56:19 -08:00
Max Brunsfeld 0858db9ebb Autocomplete mentions (#4171)
Release Notes:

- Added autocomplete for @-mentions in the chat panel.
2024-01-19 17:03:56 -08:00
Max Brunsfeld 8fb0270b4a Make applying of additional completion edits go through the CompletionProvider 2024-01-19 16:56:28 -08:00
Max Brunsfeld 739d1179e3 Stop propagation when confirming a completion 2024-01-19 16:02:51 -08:00
Max Brunsfeld 4fb3e6d812 Ensure editors context menus get at least 3 lines of height 2024-01-19 15:47:42 -08:00
Mikayla eaa0e93112 Fix hover popovers showing up over zoomed panels 2024-01-19 14:52:49 -08:00
Conrad Irwin af30a9b814 Show cursors sligthly longer 2024-01-19 14:38:17 -07:00
139986d080 Start work on autocomplete for chat mentions
Co-authored-by: Conrad <conrad@zed.dev>
Co-authored-by: Nathan <nathan@zed.dev>
Co-authored-by: Marshall <marshall@zed.dev>
2024-01-19 13:12:57 -08:00
Max BrunsfeldandConrad 1ceccdf03b Move the details of completion-resolution logic into Project
Co-authored-by: Conrad <conrad@zed.dev>
2024-01-19 11:52:28 -08:00
Joseph T. Lyons 595428a8b1 Rename show cursors to display cursor names 2024-01-19 11:37:57 -05:00
Joseph T. Lyons cb1b7915ee Allow cursors to be shown via a command (#4153) 2024-01-19 11:09:49 -05:00
Joseph T. Lyons bcc13e151c Change struct field name 2024-01-19 07:52:28 -05:00
Kirill Bulatov a4a0a02dc3 Avoid gutter resizes on line number increase/decrease (#4135) 2024-01-19 10:25:55 +02:00
Joseph T. Lyons 0062cc000b Allow cursors to be shown via a command 2024-01-19 02:58:30 -05:00
Conrad Irwin 276032398b Fix overflow in hover handler 2024-01-18 16:53:05 -07:00
Conrad Irwin e513020fbb Fine tune 2024-01-18 15:59:13 -07:00
Kirill Bulatov bf8e57098d Avoid gutter resizes on line number increase/decrease
Reserves 4 characters for the line number in the gutter to avoid editor bounds jumping when editing small files like commit messages.
2024-01-18 23:11:05 +02:00
Conrad Irwin bfee008bb2 Merge branch 'main' into cursors 2024-01-18 14:03:27 -07:00
Piotr Osiewicz 9506fa461f Start documenting display_map module 2024-01-18 16:38:06 +01:00
Mikayla Maki 933fb87013 Fix editor selection issue (#4110)
Release Notes:

- Fixes a bug where, editor selections would update in the wrong pane
when split.
2024-01-17 17:16:56 -08:00
Mikayla Maki aa7351041d Add typo detection to CI (#4107)
Adding the typos crate to our CI will take some doing, as we have
several tests which rely on typos in various ways (e.g. checking state
as the user types), but I thought I'd take a first stab at fixing what
it finds.

Release Notes:

- N/A
2024-01-17 17:13:47 -08:00
Mikayla edb204511c Fix selection bug in editor causing selections to be un-ended 2024-01-17 16:30:01 -08:00
Mikayla 078fd35f4f WIP 2024-01-17 15:52:54 -08:00
Piotr OsiewiczandKirill 6cbc49e5f0 Editor docs (#4097)
Release Notes:

- N/A

---------

Co-authored-by: Kirill <kirill@zed.dev>
2024-01-18 00:48:37 +01:00
Mikayla 57400e9687 Fix typos detected by crate-ci/typos 2024-01-17 14:31:21 -08:00
Conrad Irwin ef0432da0d Hide cursors by default, but show some 2024-01-17 10:14:20 -07:00
Julia 2fbf42d7df Z index shenanigans (#4089)
Release Notes:

- Fixed a bug allowing certain UI elements to render incorrectly when
overlapping.
2024-01-17 09:48:08 -05:00
Julia 977832a04e Refresh window, bypassing view cache, when opening hover or context menu 2024-01-17 09:40:16 -05:00
Conrad Irwin 0ca9f286c6 Show cursors for remote participants 2024-01-16 21:54:49 -07:00
1cbdf2ba22 Fix overlapping block headers when using custom line height
This fixes block headers overlapping over text in the buffer when using
a custom line height of 1.25.

It fixes the issue by making the parent container a v-flex,
vertically-justifying the content and moving from relative padding to
absolute padding for the header itself.

Co-authored-by: antonio <antonio@zed.dev>
Co-authored-by: julia <julia@zed.dev>
Co-authored-by: marshall <marshall@zed.dev>
2024-01-16 17:20:27 +01:00
Kirill Bulatov ec3cfc33d6 Adds a way to select items under multiple carets (#4067)
Deals with https://github.com/zed-industries/community/issues/2374

Release Notes:

- Added a way to select items under multiple carets with
`editor::SelectNext` and `editor::SelectPrevious` commands
2024-01-16 11:08:48 +02:00
Kirill Bulatov 25abe8f981 Fix the tests 2024-01-16 10:58:27 +02:00
Kirill Bulatov fbb363e83a Add tests 2024-01-16 10:07:31 +02:00
Max Brunsfeld 8f262892a0 Notify editors on buffer font size changes 2024-01-15 14:53:24 -08:00
Kirill Bulatov 55671eac40 Select next/previous word for multiple carets if possible 2024-01-15 23:42:36 +02:00