this last bit feels like an unrelated bug

There's a misunderstanding. edit thinks the cursor line will be rendered
and doesn't scroll. But edit.draw doesn't actually render the cursor
line.

And this only happens when Viewport.zoom ~= 1.

And lines.love is _definitely_ not seeing this problem.
This commit is contained in:
Kartik K. Agaram 2023-10-25 16:55:42 -07:00
parent 45c1e42de2
commit 40ebc71d58
1 changed files with 2 additions and 0 deletions

View File

@ -20,7 +20,9 @@ on.keychord_press = function(chord, key)
local old_top = {line=Cursor_node.editor.screen_top1.line, pos=Cursor_node.editor.screen_top1.pos}
edit.keychord_press(Cursor_node.editor, chord, key)
if not eq(Cursor_node.editor.screen_top1, old_top) then
print('==', old_top.line, old_top.pos, '=>', Cursor_node.editor.screen_top1.line, Cursor_node.editor.screen_top1.pos)
Viewport.y = Cursor_node.y + y_of_schema1(Cursor_node.editor, Cursor_node.editor.screen_top1)
print('=>', Viewport.y)
A(--[[skip updating screen_top for]] Cursor_node)
return
end