mirror of
https://github.com/atom/atom.git
synced 2026-01-21 04:48:12 -05:00
Base the visible lines on the height instead of the clientHeight
Because overlay scrollbars are invisible unless scrolling and even regular scrollbars can be transparent.
This commit is contained in:
@@ -239,7 +239,7 @@ class DisplayBuffer extends Model
|
||||
unless @getLineHeight() > 0
|
||||
throw new Error("You must assign a non-zero lineHeight before calling ::getVisibleRowRange()")
|
||||
|
||||
heightInLines = Math.ceil(@getClientHeight() / @getLineHeight()) + 1
|
||||
heightInLines = Math.ceil(@getHeight() / @getLineHeight()) + 1
|
||||
startRow = Math.floor(@getScrollTop() / @getLineHeight())
|
||||
endRow = Math.min(@getLineCount(), Math.ceil(startRow + heightInLines))
|
||||
[startRow, endRow]
|
||||
|
||||
Reference in New Issue
Block a user