From 78660102b44b9efddc9e0f771b8dcd0a60bc37b0 Mon Sep 17 00:00:00 2001 From: Rudi Grinberg Date: Fri, 18 Feb 2022 10:21:39 -0700 Subject: [PATCH] fix: broken debouncing ps-id: 633D40D0-FB6D-4307-A570-E16F732E69EB --- CHANGES.md | 3 ++- ocaml-lsp-server/src/ocaml_lsp_server.ml | 1 + submodules/lev | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 55e993e68..339a2f74d 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,8 +1,9 @@ -# 1.10.2 +# 1.10.2 (unreleased) ## Fixes - Catch merlin desturct exceptions (#626) +- Fix broken debouncing (#627) # 1.10.1 diff --git a/ocaml-lsp-server/src/ocaml_lsp_server.ml b/ocaml-lsp-server/src/ocaml_lsp_server.ml index c4a52e96d..5af0dae98 100644 --- a/ocaml-lsp-server/src/ocaml_lsp_server.ml +++ b/ocaml-lsp-server/src/ocaml_lsp_server.ml @@ -159,6 +159,7 @@ let set_diagnostics rpc doc = let+ () = task_if_running state.detached ~f:(fun () -> let timer = Document.timer doc in + let* () = Lev_fiber.Timer.Wheel.cancel timer in Lev_fiber.Timer.Wheel.reset timer; let* res = Lev_fiber.Timer.Wheel.await timer in match res with diff --git a/submodules/lev b/submodules/lev index ab27d3dda..d9cda0df0 160000 --- a/submodules/lev +++ b/submodules/lev @@ -1 +1 @@ -Subproject commit ab27d3dda3110c5ece5081d54026c65a82f46484 +Subproject commit d9cda0df0290e0f1daaf239be2eee2b993d4ee61