diff --git a/crates/editor/src/element.rs b/crates/editor/src/element.rs index a13278a40131c8ee17c9c5784743b8b6ffa78cc5..9a5b7da6ffaa23e4d8fef5449ef8ffb435b45c1b 100644 --- a/crates/editor/src/element.rs +++ b/crates/editor/src/element.rs @@ -7188,7 +7188,7 @@ impl Element for EditorElement { let autoscrolled = if autoscroll_horizontally { editor.autoscroll_horizontally( start_row, - editor_width - (letter_size.width / 2.0), + editor_width - (letter_size.width / 2.0) + style.scrollbar_width, scroll_width, em_width, &line_layouts, @@ -7279,7 +7279,7 @@ impl Element for EditorElement { let autoscrolled = if autoscroll_horizontally { editor.autoscroll_horizontally( start_row, - editor_width - (letter_size.width / 2.0), + editor_width - (letter_size.width / 2.0) + style.scrollbar_width, scroll_width, em_width, &line_layouts,