LanguageClient: Fix semantic token highlight

Ignore unknown modifiers when building up and accessing the text char
format hash.

Change-Id: I7e11e3fb6f4240083045368daec54e417416efa9
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
David Schulz
2021-06-10 08:43:24 +02:00
parent d729835c24
commit 2d31ae0480
2 changed files with 8 additions and 3 deletions

View File

@@ -254,7 +254,9 @@ void addModifiers(int key,
if (tokenModifiers.isEmpty())
return;
int modifier = tokenModifiers.takeLast();
auto addModifier = [&](TextStyle style){
if (modifier < 0)
return;
auto addModifier = [&](TextStyle style) {
if (key & modifier) // already there don't add twice
return;
key = key | modifier;