Skip to content

Commit

Permalink
Remove inappropriate scaling in scrollPastEnd
Browse files Browse the repository at this point in the history
FIX: Improve behavior of `scrollPastEnd` in a scaled editor.

Issue codemirror/dev#1341
  • Loading branch information
marijnh committed Apr 7, 2024
1 parent cb8285b commit 0926f29
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/scrollpastend.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 0926f29

Please sign in to comment.