editor: Fix autoscroll flickering regression (#24758)
This PR fixes autoscroll flickering issue caused by recent [#24735](https://github.com/zed-industries/zed/pull/24735) which fixes soft wrap scroll issues. No release notes, as this was few hours ago. Adding vertical scrollbar width to viewport width, so that autoscroll function don't try to that much pixels extra. Release Notes: - N/A
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user