Relayout open windows on terminal resize
NAWS mid-session updates now propagate to the window stack: Application re-runs each open window's relayout on resize. Window#relayout re-centers (clamped to the screen edge) by shifting all descendants; MasterDetail recomputes its full geometry and re-renders the detail at the new width. ButtonBar placement is extracted into ButtonBar.place for reuse. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -236,6 +236,7 @@ module BBS
|
||||
@next = FrameBuffer.new(c, r)
|
||||
|
||||
relayout!
|
||||
@windows.each { |w| w.relayout(self) } if resized
|
||||
|
||||
@next.fill(x: 1, y: 1, width: c, height: r, sgr: @theme[:screen])
|
||||
@root.render(@next)
|
||||
|
||||
Reference in New Issue
Block a user