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:
parent
5dc3c237eb
commit
522b8d662c
1 changed files with 2 additions and 2 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue