I don't understand what is happening exactly.
The behavior of my plugin change with Mr red plugin cohabitation but it was not a blocked problem. @baudo if you have investigated, please create a PR to solve the problem.
Many thinks are not included in SB core and have been implement on different way. Consequently, they are not compatible each other. advanced window management must be a part of SB ? @zef and SB should provide a standard way to manage it. No ?
I sented you, this night, a private message to explain the problem.
I rephrase the observation:
your plugin monitors the event "modified" or "saved" (since 01/16) from the editor, whether MarkmapMindmap is loaded into rhs or not
event processing passes over to your main routine (render) with the false parameter (which forces the redraw provided that MM is still open in rhs)
render tests two variables including the one which memorizes the activation state of MM (by hypothesis, false, since at that moment rhs is occupied by another component: Document Explorer or Task Explorer, for example)
he deduces that rhs must be closed !
As indicated previously, debugging was laborious because there was nothing to trace the origin of the rhs closure and there were no error in the console.
I add that it's the same thing with MarpSlides.
The problem is that event.listen is not encapsulated in a plugin launch function. Since the piece of code is positioned at the root of space-lua, it is activated as soon as SilverBullet is loaded.
-- Listen for page modifications
event.listen({
name = "editor:pageSaved",
run = function(e)
render(false)
end
})