Hi. Found a bug with editor highlights on startup.
"better-todo-tree.general.tags": [
"TODO",
"FIXME",
"HACK",
"REVIEW",
"NOTE",
"XXX",
"BUG",
"[ ]",
"[/]",
"[x]"
],
"better-todo-tree.highlights.customHighlight": {
"TODO": {
"icon": "check",
"background": "#324a32",
"foreground": "#90cc90",
"iconColour": "#90cc90"
},
"FIXME": {
"icon": "flame",
"background": "#4a3232",
"foreground": "#d98888",
"iconColour": "#d98888"
},
"HACK": {
"icon": "alert",
"background": "#4a3a22",
"foreground": "#d4aa6a",
"iconColour": "#d4aa6a"
},
"REVIEW": {
"icon": "question",
"background": "#32324a",
"foreground": "#9090d4",
"iconColour": "#9090d4"
},
"NOTE": {
"icon": "info",
"background": "#223848",
"foreground": "#6ab0d4",
"iconColour": "#6ab0d4"
},
"XXX": {
"icon": "eye",
"background": "#224432",
"foreground": "#6acc8a",
"iconColour": "#6acc8a"
},
"BUG": {
"icon": "bug",
"background": "#382438",
"foreground": "#b48acc",
"iconColour": "#b48acc"
},
"[ ]": {
"icon": "circle",
"foreground": "#7aba7a",
"iconColour": "#7aba7a"
},
"[/]": {
"icon": "circle-slash",
"foreground": "#baba6a",
"iconColour": "#baba6a"
},
"[x]": {
"icon": "checklist",
"foreground": "#999999",
"iconColour": "#999999"
}
},
"better-todo-tree.highlights.defaultHighlight": {
"type": "text-and-comment",
"gutterIcon": true,
"opacity": 40
},
"better-todo-tree.filtering.excludeGlobs": [
"**/node_modules/**",
"**/dist/**"
],
"better-todo-tree.tree.tagsOnly": true,
"better-todo-tree.tree.buttons.groupByTag": true,
"better-todo-tree.regex.regexCaseSensitive": false,
"better-todo-tree.highlights.enabled": true,
Hi. Found a bug with editor highlights on startup.
Environment:
Steps to reproduce:
Expected behavior — highlights are applied to all open editors on extension activation, including restored tabs.
Actual behavior — highlights are missing for any file that was restored from the previous session. The tree view correctly shows all TODOs. The issue is only with editor decorations. Manual refresh does not help — only physically closing and reopening the file fixes it.
Suspected cause:
On activation, it appears that the
updateDecorations()function is never called for editors that are already open. The extension likely needs to iterate over vscode.window.visibleTextEditors on activation (and possibly on manual refresh) and apply decorations to each editor.Config: