zed/crates/editor/src
Massimo Mund e783142528
Fix vertical_scroll_margin not being capped for large vertical_scroll_margin values (#15473)
When switching to function definitions in a new buffer the
`AutoscrollStrategy::Focused` being emitted to scroll to the found
location.
If a large value `vertical_scroll_margin` (e.g.: 99) is set, this leads
to an incorrectly calculated position and the new buffer opens in the
wrong place.

In `autoscroll_vertically()` there is a margin calculated to cap the
value of `vertical_scroll_margin` for certain AutoscrollStrategies. This
margin is being used in `AutoscrollStrategy::Fit` and
`AutoscrollStrategy::Newest` but was probably forgotten for
`AutoscrollStrategy::Focused`.

- Might fix [#15101](https://github.com/zed-industries/zed/issues/15101)

Release Notes:

- N/A
2024-08-09 09:35:57 +02:00
..
display_map assistant: Polish /workflow and steps UI (#15936) 2024-08-08 15:46:33 +02:00
git
scroll Fix vertical_scroll_margin not being capped for large vertical_scroll_margin values (#15473) 2024-08-09 09:35:57 +02:00
signature_help
test
actions.rs lsp: Support Goto Declaration (#15785) 2024-08-06 11:20:51 +02:00
blame_entry_tooltip.rs
blink_manager.rs Hide blinking cursor when window is deactivated (#15408) 2024-07-30 10:49:15 +03:00
debounced_delay.rs
display_map.rs assistant: Polish /workflow and steps UI (#15936) 2024-08-08 15:46:33 +02:00
editor.rs assistant: Polish /workflow and steps UI (#15936) 2024-08-08 15:46:33 +02:00
editor_settings.rs settings_ui: Add line number settings controls (#15310) 2024-07-26 18:31:45 -04:00
editor_settings_controls.rs ui: Give NumericSteppers an ID (#15344) 2024-07-27 13:02:27 -04:00
editor_tests.rs assistant: Polish /workflow and steps UI (#15936) 2024-08-08 15:46:33 +02:00
element.rs assistant: Polish /workflow and steps UI (#15936) 2024-08-08 15:46:33 +02:00
git.rs
highlight_matching_bracket.rs
hover_links.rs
hover_popover.rs Selectable diagnostic popover text (#14518) 2024-07-28 23:13:13 -06:00
hunk_diff.rs assistant: Polish /workflow and steps UI (#15936) 2024-08-08 15:46:33 +02:00
indent_guides.rs
inlay_hint_cache.rs
inline_completion_provider.rs
items.rs Open workflow step editors as preview tabs (#15928) 2024-08-07 19:33:58 -06:00
linked_editing_ranges.rs
mouse_context_menu.rs lsp: Support Goto Declaration (#15785) 2024-08-06 11:20:51 +02:00
movement.rs
persistence.rs
rust_analyzer_ext.rs
scroll.rs Clean up inline assist editor rendering (#15536) 2024-07-31 17:43:08 +02:00
selections_collection.rs vim: Support ranges in command (#15985) 2024-08-08 21:47:27 +01:00
signature_help.rs
tasks.rs
test.rs Feature/fallback fonts (#15306) 2024-07-26 16:42:21 -07:00