bugfix: scrolling with arrow keys after +/- zoom
scenario: * zoom in or out * focus cursor in a large box of text that overflows viewport both above and below * position cursor near bottom, hit down arrow repeatedly. cursor should remain in viewport, with the viewport panning as necessary. * position cursor near top, hit up arrow repeatedly. cursor should remain in viewport, with the viewport panning as necessary. Again, I don't really understand when I'm supposed to scale coordinates vs not. But at least we have a manual test pinned down now, and it passes.
This commit is contained in:
parent
fe4e1395d0
commit
0ca5bb0e8d
|
@ -7,7 +7,7 @@ update_editor_box = function(node)
|
|||
end
|
||||
node.editor.top = vy(node.y)
|
||||
else
|
||||
node.editor.screen_top1, node.editor.top = schema1_of_y(node.editor, scale(Viewport.y-node.y)) -- scale y because editor's font is scaled
|
||||
node.editor.screen_top1, node.editor.top = schema1_of_y(node.editor, Viewport.y-node.y)
|
||||
end
|
||||
node.editor.left = math.floor(vx(node.x))
|
||||
node.editor.right = math.ceil(vx(node.x+node.w))
|
||||
|
|
Loading…
Reference in New Issue