When session opening starts, this signal is emitted with parameter TRUE, when it stops, with FALSE.
This gives plugins information e.g. whether document opening happens as a result of user action or whether it's part of initial session opening.
For the LSP plugin this is used to detect the finally displayed document for which the server is started, otherwise if "document-open" is used, it would start servers for all open document filetypes immediately on Geany start which is unnecessary and could slow start time. You can view, comment on, or merge this pull request online at:
https://github.com/geany/geany/pull/3707
-- Commit Summary --
* Add "session-opening" signal emitted when session opening starts/stops
-- File Changes --
M doc/pluginsignals.c (12) M src/geanyobject.c (7) M src/geanyobject.h (1) M src/keyfile.c (4) M src/libmain.c (16) M src/main.h (2)
-- Patch Links --
https://github.com/geany/geany/pull/3707.patch https://github.com/geany/geany/pull/3707.diff
Does this fix #3684?
This might also be useful for ProjectOrganizer plugin. It could simplify the code introduced https://github.com/geany/geany-plugins/pull/1290, if the project opening and file parsing happened after Geany opens all the files in session.
This might also be useful for ProjectOrganizer plugin. It could simplify the code introduced https://github.com/geany/geany-plugins/pull/1290, if the project opening and file parsing happened after Geany opens all the files in session.
I'm just afraid that the result would be "stuck on loaded document" instead of "stuck on nothing open" (which looks better) so we'd be back where we were with the idle function...
Does this fix https://github.com/geany/geany/issues/3684?
No. I'm not sure what is the right way to fix #3684 - whether "document-activate" should be fired also for the first tab or how exactly it should behave. But the "session-opening" signal could be used to detect this case and handle it.
Closed #3707.
Closing in favor of https://github.com/geany/geany/pull/3870.
github-comments@lists.geany.org