summaryrefslogtreecommitdiff
path: root/lsp-write.c
diff options
context:
space:
mode:
authorpommicket <pommicket@gmail.com>2023-09-10 14:49:51 -0400
committerpommicket <pommicket@gmail.com>2023-09-10 14:50:23 -0400
commite0066faf658311c975ef08b05c335ecc2b9ab0a0 (patch)
treee595bbe94811771fbae29b77683776b81393eab8 /lsp-write.c
parent1b49244e6427effb62bae8a05038c22e6bec423f (diff)
fix LSP syncing issue
Diffstat (limited to 'lsp-write.c')
-rw-r--r--lsp-write.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/lsp-write.c b/lsp-write.c
index 974a845..e0beea2 100644
--- a/lsp-write.c
+++ b/lsp-write.c
@@ -330,13 +330,6 @@ static void message_writer_write_and_free(LSP *lsp, JSONWriter *o) {
size_t header_size = strlen(header_str);
char *content = &builder.str[max_header_size - header_size];
memcpy(content, header_str, header_size);
-
- #if LSP_SHOW_C2S
- const int limit = 1000;
- debug_println("%s%.*s%s%s",term_italics(stdout),limit,content,
- strlen(content) > (size_t)limit ? "..." : "",
- term_clear(stdout));
- #endif
if (lsp->log) {
fprintf(lsp->log, "LSP MESSAGE FROM CLIENT TO SERVER\n%s\n\n", content + header_size);
@@ -356,6 +349,13 @@ static void message_writer_write_and_free(LSP *lsp, JSONWriter *o) {
}
str_builder_free(&builder);
+
+ #if LSP_SHOW_C2S
+ const int limit = 1000;
+ debug_println("%s%.*s%s%s",term_bold(stdout),limit,content,
+ strlen(content) > (size_t)limit ? "..." : "",
+ term_clear(stdout));
+ #endif
}
static void write_symbol_tag_support(JSONWriter *o) {