Skip to content

Commit 3a530ec

Browse files
committed
Don't call plugin extension functions when opening session files
Without this, the symbol_highlight_provided() function is called for all the session files which starts LSP servers for all filetypes of the open files instead of lazily as the file tabs of individual files get selected.
1 parent 6a954b9 commit 3a530ec

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/pluginextension.c

+4-2
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,8 @@ void plugin_extension_unregister(PluginExtension *extension)
144144
*/
145145
#define CALL_PROVIDED(f, doc, ext) \
146146
G_STMT_START { \
147-
if (main_status.quitting || main_status.closing_all) \
147+
if (main_status.quitting || main_status.closing_all || \
148+
main_status.opening_session_files) \
148149
return FALSE; \
149150
for (GList *node = all_extensions; node; node = node->next) \
150151
{ \
@@ -170,7 +171,8 @@ void plugin_extension_unregister(PluginExtension *extension)
170171
*/
171172
#define CALL_PERFORM(f_provided, doc, f_perform, args, defret) \
172173
G_STMT_START { \
173-
if (main_status.quitting || main_status.closing_all) \
174+
if (main_status.quitting || main_status.closing_all || \
175+
main_status.opening_session_files) \
174176
return defret; \
175177
for (GList *node = all_extensions; node; node = node->next) \
176178
{ \

0 commit comments

Comments
 (0)