is it possible to add and remove buffers? So I want to change a fullscreen layout.
For example I want have some layout like this:
layout = VSplit([
Window(content=BufferControl(buffer_name=DEFAULT_BUFFER)),
Window(width=D.exact(1),
content=FillControl('|', token=Token.Line)),
Window(content=BufferControl(buffer_name='RESULT')),
])
Now I want to add another Buffer after some time so that the layout is like this...
layout = VSplit([
Window(content=BufferControl(buffer_name=DEFAULT_BUFFER)),
Window(width=D.exact(1),
content=FillControl('|', token=Token.Line)),
Window(content=BufferControl(buffer_name='RESULT')),
Window(content=BufferControl(buffer_name='NEW_BUFFER')),
])
Is there some layout.addbuffer(...) function or something like this?
This can be done by completely replacing the
layout
attribute of theApplication
. So something like: