Hi,
During a full scan of the workspace, tags are mishandled at tree level:
- either not in tree (but discovered in source)
- error on tag kind (line associated with an other tag)
- associated with a line other than the tag's line
- with truncated text or text corresponding to a different line
When editing a source file, the tags are correctly handled and rendered in the directory tree, but the sorting of the source files is not preserved: the edited file appears at the top of the folder files list.
The problem appears to be partly related to the identification of line numbers during a full scan.
Thanks
Settings used:
Better TODO Tree settings.txt
Regex:
"better-todo-tree.regex.regex": "(//|#|<!--|;|/\\*|\\*>|^......\\*|\\-\\-)\\s*($TAGS)"
Sample text:
*> BUG: COBOL BUG
*> FIXME: COBOL FIXME
*> TODO: COBOL TODO
*> MOMA: COBOL MOMA
*> [ ]: COBOL [ ]
*> [x]: COBOL [x]
-- BUG: SQL BUG
-- FIXME: SQL FIXME
-- TODO: SQL TODO
-- MOMA: SQL MOMA
-- [ ]: SQL [ ]
-- [x]: SQL [x]
Full code (remove .txt extension):
S9TL1B.cbl.txt
Use case "reload window" (or start VS Code, or modify settings):
Log:
Better TODO Tree reload window log.txt
Result:

- line 261: not in tree
- line 262: not in tree
- line 263: error on text in tree
- line 264: error on text in tree
- line 265: error on text in tree
- line 266: ok, ignored in tree
- line 268: error on text in tree
- line 269: error on text in tree
- line 270: error on text in tree
- line 271: error on text in tree
- line 272: error on tag kind, error on text in tree
- line 273: error on tag kind, error on text in tree
Other errors on lines 275, 277, 316, 887, 957 : no tags on these lines.
Use case "modify file":
Log: none
Result:

- file S9TL1B.cbl at top of list
- line 261: ok
- line 262: ok
- line 263: ok
- line 264: ok
- line 265: ok
- line 266: ok, (ignored in tree)
- line 268: ok
- line 269: ok
- line 270: ok
- line 271: ok
- line 272: ok
- line 273: ok, (ignored in tree)
Other tags on lines 315, 880, 950
Thanks.
Hi,
During a full scan of the workspace, tags are mishandled at tree level:
When editing a source file, the tags are correctly handled and rendered in the directory tree, but the sorting of the source files is not preserved: the edited file appears at the top of the folder files list.
The problem appears to be partly related to the identification of line numbers during a full scan.
Thanks
Settings used:
Better TODO Tree settings.txt
Regex:
"better-todo-tree.regex.regex": "(//|#|<!--|;|/\\*|\\*>|^......\\*|\\-\\-)\\s*($TAGS)"Sample text:
Full code (remove .txt extension):
S9TL1B.cbl.txt
Use case "reload window" (or start VS Code, or modify settings):
Log:
Better TODO Tree reload window log.txt
Result:

Other errors on lines 275, 277, 316, 887, 957 : no tags on these lines.
Use case "modify file":
Log: none
Result:

Other tags on lines 315, 880, 950
Thanks.