Skip to content

Commit e6fa455

Browse files
committed
Fix <C-d> and <C-u> scrolling too far
1 parent 1d88ed3 commit e6fa455

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

common/content/buffer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -754,7 +754,7 @@ const Buffer = Module("buffer", {
754754
if (options["scroll"] > 0)
755755
this.scrollLines(options["scroll"] * direction);
756756
else // scroll half a page down in pixels
757-
elem.scrollTop += elem.scrollHeight / 2 * direction;
757+
elem.scrollTop += Buffer.findScrollableWindow().innerHeight / 2 * direction;
758758
},
759759

760760
_scrollByScrollSize: function _scrollByScrollSize(count, direction) {

0 commit comments

Comments
 (0)