diff options
| -rw-r--r-- | internal/lsp/handlers_document.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/internal/lsp/handlers_document.go b/internal/lsp/handlers_document.go index 7c59aa8..25f4223 100644 --- a/internal/lsp/handlers_document.go +++ b/internal/lsp/handlers_document.go @@ -456,8 +456,10 @@ func (s *Server) deferShowDocument(uri string, sel Range) { s.inflight.Add(1) go func() { defer s.inflight.Done() + timer := time.NewTimer(120 * time.Millisecond) + defer timer.Stop() select { - case <-time.After(120 * time.Millisecond): + case <-timer.C: s.clientShowDocument(uri, &sel) case <-ctx.Done(): } |
