2023-10-26 00:46:03 +01:00
|
|
|
update_editor_box = function(node, skip_updating_screen_top_for)
|
2023-01-03 11:15:03 +00:00
|
|
|
if node.editor == nil then return end
|
2023-10-26 05:25:08 +01:00
|
|
|
if node.editor.font_height ~= scale(20) then
|
|
|
|
edit.update_font_settings(node.editor, scale(20))
|
|
|
|
end
|
|
|
|
node.editor.left = math.floor(vx(node.x)) + Line_number_width*App.width('m')
|
2023-10-26 05:17:00 +01:00
|
|
|
node.editor.right = math.ceil(vx(node.x+node.w))
|
|
|
|
node.editor.width = node.editor.right - node.editor.left
|
|
|
|
Text.redraw_all(node.editor)
|
2023-10-23 03:50:08 +01:00
|
|
|
if node.y > Viewport.y then
|
2023-10-26 02:05:38 +01:00
|
|
|
if node ~= skip_updating_screen_top_for then
|
2023-01-03 11:15:03 +00:00
|
|
|
node.editor.screen_top1.line = 1
|
|
|
|
node.editor.screen_top1.pos = 1
|
|
|
|
end
|
|
|
|
node.editor.top = vy(node.y)
|
|
|
|
else
|
2023-10-26 02:05:38 +01:00
|
|
|
if node ~= skip_updating_screen_top_for then
|
2023-10-26 04:05:50 +01:00
|
|
|
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.top = node.editor.top + Menu_bar_height
|
2022-12-26 00:56:47 +00:00
|
|
|
end
|
2023-01-03 11:15:03 +00:00
|
|
|
end
|
2023-04-03 01:10:21 +01:00
|
|
|
end
|