From 0926f29a39d308d3e5bc700d310d07d7c27f738e Mon Sep 17 00:00:00 2001 From: Marijn Haverbeke Date: Sun, 7 Apr 2024 09:26:31 +0200 Subject: [PATCH] Remove inappropriate scaling in scrollPastEnd FIX: Improve behavior of `scrollPastEnd` in a scaled editor. Issue https://github.com/codemirror/dev/issues/1341 --- src/scrollpastend.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/scrollpastend.ts b/src/scrollpastend.ts index 5bc0f0ff..79d1e80f 100644 --- a/src/scrollpastend.ts +++ b/src/scrollpastend.ts @@ -7,7 +7,7 @@ const plugin = ViewPlugin.fromClass(class { update(update: ViewUpdate) { let {view} = update - let height = view.viewState.editorHeight * view.scaleY - + let height = view.viewState.editorHeight - view.defaultLineHeight - view.documentPadding.top - 0.5 if (height >= 0 && height != this.height) { this.height = height