mirror of
https://gitee.com/zhangsken/AndroidIDE.git
synced 2026-10-16 07:49:44 +08:00
fix: do not unnecessarily initialize TsScopedVariables to avoid querying the whole tree
This commit is contained in:
+2
-2
@@ -190,11 +190,11 @@ open class TsAnalyzeManager(val languageSpec: TsLanguageSpec, var theme: TsTheme
|
||||
}
|
||||
|
||||
fun updateStyles() {
|
||||
val scopedVariables = TsScopedVariables(tree!!, localText, languageSpec)
|
||||
if (thread != this || !messageQueue.isEmpty()) {
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
val scopedVariables = TsScopedVariables(tree!!, localText, languageSpec)
|
||||
val oldTree = (styles.spans as LineSpansGenerator?)?.tree
|
||||
val copied = tree!!.copy()
|
||||
styles.spans = LineSpansGenerator(
|
||||
|
||||
Reference in New Issue
Block a user