summaryrefslogtreecommitdiff
path: root/lsp-write.c
diff options
context:
space:
mode:
Diffstat (limited to 'lsp-write.c')
-rw-r--r--lsp-write.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lsp-write.c b/lsp-write.c
index 050d784..0eed987 100644
--- a/lsp-write.c
+++ b/lsp-write.c
@@ -547,7 +547,8 @@ void write_request(LSP *lsp, LSPRequest *request) {
arr_foreach_ptr(change->changes, LSPDocumentChangeEvent, event) {
write_arr_elem(o);
write_obj_start(o);
- write_key_range(o, "range", event->range);
+ if (event->use_range)
+ write_key_range(o, "range", event->range);
write_key_string(o, "text", lsp_request_string(request, event->text));
write_obj_end(o);
}