zed/crates
Antonio Scandurra a284e7140c Always return valid locations when refreshing anchors
Specifically, with this commit:

- We will now refresh the anchor if it escapes the boundaries of the excerpt by
using the `Excerpt::contains` method. This was not the case before, as we were
just checking if the excerpt id and buffer id of the anchors matched the ones
stored on the excerpt.
- We fixed a bug that was causing the anchor to be outside of the excerpt when
resetting it to one of the excerpt's endpoints after we couldn't keep its
position. This would happen because we were using `anchor_at`, which resolved
the anchor to an offset first and then converted it back into an anchor with
the given bias, which is a lossy operation. We now use `Anchor::bias` to
achieve the same goal: note that this could still lead to the anchor escaping
the excerpt's boundary when the bias doesn't match the endpoint's bias, so we
take extra care to avoid that and `min`/`max` the newly-produced anchor with
the other endpoint.
2022-01-29 10:10:53 +01:00
..
chat_panel Use Rust 2021 edition in all crates 2022-01-26 12:50:31 -08:00
client Use Rust 2021 edition in all crates 2022-01-26 12:50:31 -08:00
clock Use Rust 2021 edition in all crates 2022-01-26 12:50:31 -08:00
collections Name the root file of every crate after the crate to ease navigation 2021-11-30 12:46:39 -07:00
contacts_panel Use Rust 2021 edition in all crates 2022-01-26 12:50:31 -08:00
diagnostics Show non-disk-based diagnostics in project diagnostics 2022-01-27 16:23:50 +01:00
editor Always return valid locations when refreshing anchors 2022-01-29 10:10:53 +01:00
file_finder Use Rust 2021 edition in all crates 2022-01-26 12:50:31 -08:00
fsevent Use Rust 2021 edition in all crates 2022-01-26 12:50:31 -08:00
fuzzy Use Rust 2021 edition in all crates 2022-01-26 12:50:31 -08:00
go_to_line Use Rust 2021 edition in all crates 2022-01-26 12:50:31 -08:00
gpui Use Rust 2021 edition in all crates 2022-01-26 12:50:31 -08:00
gpui_macros Use Rust 2021 edition in all crates 2022-01-26 12:50:31 -08:00
journal Make "go to definition" work in project diagnostics 2022-01-20 17:30:30 +01:00
language Avoid grouping transactions created by different editors 2022-01-27 15:51:46 +01:00
lsp Adjust hover assertion in lsp test after bumping rust-analyzer 2022-01-28 12:11:26 -08:00
outline Make "go to definition" work in project diagnostics 2022-01-20 17:30:30 +01:00
project Filter out supporting diagnostics that contain no messages 2022-01-27 09:51:15 +01:00
project_panel Use Rust 2021 edition in all crates 2022-01-26 12:50:31 -08:00
rpc Fix warning 2022-01-27 15:55:48 +01:00
server Use Rust 2021 edition in all crates 2022-01-26 12:50:31 -08:00
sum_tree Use Rust 2021 edition in all crates 2022-01-26 12:50:31 -08:00
text Always return valid locations when refreshing anchors 2022-01-29 10:10:53 +01:00
theme Use Rust 2021 edition in all crates 2022-01-26 12:50:31 -08:00
theme_selector Use Rust 2021 edition in all crates 2022-01-26 12:50:31 -08:00
util Use Rust 2021 edition in all crates 2022-01-26 12:50:31 -08:00
workspace Merge branch 'project-diagnostics-pinned-tab' into style-project-diagnostics 2022-01-25 12:20:37 -08:00
zed Style empty project diagnostics state 2022-01-27 10:21:26 +01:00