mirror of
https://github.com/SpartanJ/eepp.git
synced 2026-08-16 14:05:07 +03:00
eepp: Improved String::unescape. Improved JavaScript+TypeScript regex tokenization. Minor fix for unescaped search in text highlights in UICodeEditor.
ecode: Avoid reloading plugins when a new instance of ecode is opened. Improved plugins logs.
This commit is contained in:
@@ -140,11 +140,12 @@ void LSPDocumentClient::requestSemanticHighlighting() {
|
||||
LSPDocumentClient* docClient = this;
|
||||
URI uri = mDoc->getURI();
|
||||
LSPClientServer* server = mServer;
|
||||
Uint64 docModId = mDoc->getModificationId();
|
||||
mServer->documentSemanticTokensFull(
|
||||
mDoc->getURI(), delta, reqId, range,
|
||||
[docClient, uri, server]( const auto&, const LSPSemanticTokensDelta& deltas ) {
|
||||
[docClient, uri, server, docModId]( const auto&, const LSPSemanticTokensDelta& deltas ) {
|
||||
if ( server->hasDocument( uri ) )
|
||||
docClient->processTokens( deltas );
|
||||
docClient->processTokens( deltas, docModId );
|
||||
} );
|
||||
}
|
||||
|
||||
@@ -219,7 +220,13 @@ static std::string semanticTokenTypeToSyntaxType( const std::string& type,
|
||||
return "normal";
|
||||
}
|
||||
|
||||
void LSPDocumentClient::processTokens( const LSPSemanticTokensDelta& tokens ) {
|
||||
void LSPDocumentClient::processTokens( const LSPSemanticTokensDelta& tokens,
|
||||
const Uint64& docModificationId ) {
|
||||
// If the document has already being modified after requesting the semantic highlighting,
|
||||
// re-request the changes
|
||||
if ( docModificationId != mDoc->getModificationId() )
|
||||
return requestSemanticHighlightingDelayed();
|
||||
|
||||
mRunningSemanticTokens = true;
|
||||
|
||||
if ( !tokens.resultId.empty() )
|
||||
|
||||
Reference in New Issue
Block a user