Closed andreyorst closed 1 year ago
I was checking this, it happens in between server checks.
When you are quick enough to check before LanguageTool ends in Server mode, you check with the previous overlay attached, then LanguageTool ends and generates new ones, and you try to replace the previous one that already has been deleted.
I will change the way server
module send request by attaching the idle timer after a edit command. That way, this behavior should be partly corrected
I was checking this, it happens in between server checks.
When you are quick enough to check before LanguageTool ends in Server mode, you check with the previous overlay attached, then LanguageTool ends and generates new ones, and you try to replace the previous one that already has been deleted.
This behaviour was not intended, as the correct command blocks server checking, preventing emacs to send a request to the server while the command is active. When I was testing, if the server is to slow to send a response (e.g. the document is too large) and you check while processing the request, the overlay you are attached to is the one that comes before the response. Then the response arrives, and all the overlays are deleted and recreated. Finally you select a replacement, but the overlay for replacement doesn't exist anymore, throwing the error.
To solve this, in addition to this:
I will change the way
server
module send request by attaching the idle timer after a edit command.
I will cancel the active request if a correction command is in progress.
What version of Emacs are you running?
GNU Emacs 29.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.30, cairo version 1.17.4) of 2022-10-23
What version of LanguageTool are you running?
LanguageTool version 5.7 (2022-03-28 18:24:41 +0000, 35d0d40)
What version of this package are you running?
1.1.0
What is the current behaviour?
Error on applying a correction:
What is you expect to happen?
No error
What do you do to get this bug?