scenario: move a buffer way outside the initial boundary press C-g to zoom out
Before this commit, C-g always zoomed out to the bounds computed at the start of the session.
YFQRJ4EYPIIUN26G4XKLAXK4YHJ54IKUDI272U4UT6BP2JEXWK6QC initialize_global_viewport = function()local minx, miny, maxx, maxy = surface_bounds(Definitions)-- ensure 1px of white background all around-- just in case the viewport ever goes-- outside canvas bounds while animatingminx,miny, maxx,maxy = minx-1,miny-1, maxx+2,maxy+1local zoomx = App.screen.width/(maxx-minx)local zoomy = App.screen.height/(maxy-miny)local zoom, cw, chif zoomx < zoomy thenzoom = zoomxcw = maxx-minxch = cw*App.screen.height/App.screen.widthelsezoom = zoomych = maxy-minycw = ch*App.screen.width/App.screen.heightendGlobal_viewport = {x=minx, y=miny, w=cw, h=ch, zoom=zoom}end
Global_viewport = nil