From ce5c29fb470dc5732fe83fcd73260e89942f92e9 Mon Sep 17 00:00:00 2001 From: Nathan Sobo Date: Wed, 7 May 2014 14:39:42 -0600 Subject: [PATCH] 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. --- src/display-buffer.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/display-buffer.coffee b/src/display-buffer.coffee index 041030044..98225df6e 100644 --- a/src/display-buffer.coffee +++ b/src/display-buffer.coffee @@ -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]