Skip to content

Commit

Permalink
Use G_SOURCE_REMOVE for better clarity
Browse files Browse the repository at this point in the history
  • Loading branch information
techee committed Jun 5, 2024
1 parent 5a3574c commit 74dacc9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions lsp/src/lsp-main.c
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@ static gboolean on_update_idle(gpointer data)
GeanyDocument *doc = data;

if (!lsp_utils_doc_is_valid(doc))
return FALSE;
return G_SOURCE_REMOVE;

plugin_set_document_data(geany_plugin, doc, UPDATE_SOURCE_DOC_DATA, GUINT_TO_POINTER(0));

Expand All @@ -429,7 +429,7 @@ static gboolean on_update_idle(gpointer data)
lsp_symbols_doc_request(doc, lsp_symbol_request_cb, doc);
#endif

return FALSE;
return G_SOURCE_REMOVE;
}


Expand Down Expand Up @@ -487,7 +487,7 @@ static gboolean on_doc_close_idle(gpointer user_data)
if (!document_get_current() && menu_items.parent_item)
update_menu(NULL); // the last open document was closed

return FALSE;
return G_SOURCE_REMOVE;
}


Expand Down
4 changes: 2 additions & 2 deletions lsp/src/lsp-server.c
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ static gboolean free_server_after_delay(gpointer user_data)
{
free_server((LspServer *)user_data);

return FALSE;
return G_SOURCE_REMOVE;
}


Expand Down Expand Up @@ -157,7 +157,7 @@ static gboolean kill_cb(gpointer user_data)
g_subprocess_force_exit(srv->process);
}

return FALSE;
return G_SOURCE_REMOVE;
}


Expand Down

0 comments on commit 74dacc9

Please sign in to comment.