mirror of
https://github.com/Microsoft/vscode
synced 2024-09-18 01:58:27 +00:00
Monarch should always return non-null tokens
This commit is contained in:
parent
7efe807786
commit
74b5f506cb
|
@ -336,14 +336,14 @@ class MonarchModernTokensCollector implements IMonarchTokensCollector {
|
|||
let bLen = b.length;
|
||||
let cLen = (c !== null ? c.length : 0);
|
||||
|
||||
// Fast path
|
||||
if (bLen === 0) {
|
||||
if (aLen === 0) {
|
||||
return c;
|
||||
}
|
||||
if (cLen === 0) {
|
||||
return a;
|
||||
}
|
||||
if (aLen === 0 && bLen === 0 && cLen === 0) {
|
||||
return new Uint32Array(0);
|
||||
}
|
||||
if (aLen === 0 && bLen === 0) {
|
||||
return c;
|
||||
}
|
||||
if (bLen === 0 && cLen === 0) {
|
||||
return a;
|
||||
}
|
||||
|
||||
let result = new Uint32Array(aLen + bLen + cLen);
|
||||
|
|
Loading…
Reference in a new issue