I am developer of tiny plugin https://github.com/alkuzad/CloseMinimapOnMultiView,
one of users complains about incompatibility with Origami plugin, which seems to use window.set_layout (documented only on unofficial doc http://docs.sublimetext.info/en/latest/reference/api.html?highlight=event#sublime.Window.set_layout) method. This method indeed does what it needs to - it sets layout.
But why it’s different from standard Window command call ?
window.run_command("set_layout", {"cols": [0, 0.5, 1],"rows": [0, 1],"cells": [[0, 0, 1, 1], [1, 0, 2, 1]]}) will set layout and send event to plugins, debug:
>>> window.run_command("set_layout", {"cols": [0, 0.5, 1],"rows": [0, 1],"cells": [[0, 0, 1, 1], [1, 0, 2, 1]]})
Window Command send <sublime.Window object at 0x0000028E4BD0A9B0> = set_layout - {'cells': [[0, 0, 1, 1], [1, 0, 2, 1]], 'cols': [0, 0.5, 1], 'rows': [0, 1]}
window.set_layout({"cols": [0, 0.5, 1],"rows": [0, 1],"cells": [[0, 0, 1, 1], [1, 0, 2, 1]]}) will set layout but do not send event, as nothing happens:
>>> window.set_layout({'cells': [[0, 0, 1, 1]], 'cols': [0.0, 1.0], 'rows': [0.0, 1.0]})
Is this incosistency bug or some hidden feature ?