summaryrefslogtreecommitdiff
path: root/ide-highlights.c
diff options
context:
space:
mode:
authorpommicket <pommicket@gmail.com>2023-08-07 07:39:58 -0400
committerpommicket <pommicket@gmail.com>2023-08-07 07:39:58 -0400
commit3839577f15d9fa8e460e3042d94970fb8b5dc12f (patch)
tree685969ef0750868ed60d0dc051f3c519ce824c13 /ide-highlights.c
parentb146279b48f6a4f4bea8946cb3f0f1f5cc5a9985 (diff)
documentation
Diffstat (limited to 'ide-highlights.c')
-rw-r--r--ide-highlights.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/ide-highlights.c b/ide-highlights.c
index 32874a1..b8c3a94 100644
--- a/ide-highlights.c
+++ b/ide-highlights.c
@@ -12,18 +12,19 @@ void highlights_init(Ted *ted) {
ted->highlights = calloc(1, sizeof *ted->highlights);
}
+static void highlights_close(Ted *ted) {
+ Highlights *hls = ted->highlights;
+ arr_clear(hls->highlights);
+ ted_cancel_lsp_request(ted, &hls->last_request);
+ hls->requested_position = (LSPDocumentPosition){0};
+}
+
void highlights_quit(Ted *ted) {
highlights_close(ted);
free(ted->highlights);
ted->highlights = NULL;
}
-void highlights_close(Ted *ted) {
- Highlights *hls = ted->highlights;
- arr_clear(hls->highlights);
- ted_cancel_lsp_request(ted, &hls->last_request);
- hls->requested_position = (LSPDocumentPosition){0};
-}
static void highlights_send_request(Ted *ted) {
TextBuffer *buffer = ted->active_buffer;