-
Notifications
You must be signed in to change notification settings - Fork 17
Description
Originally posted by @SamT123 in posit-dev/positron#8205:
Hi!
I think there may be a bug with breadcrumbs when using comment-defined sections in R (i.e. "# title ------") – but want to check here before opening an issue.
When not using comment-defined sections, breadcrumbs.focus
starts with the "highlighting" focussed on the part of the code you are currently in, which is very useful for navigation:
i.e. if I do breadcrumbs.focus
when my cursor is here, in my_fun_2.2
:

breadcrumbs starts with my_fun_2.2 highlighted, and I can navigate from there with the arrow keys:

But, if there is are comment-defined sections above it, breadcrumbs seemingly doesn't know where I am in the code:

EDIT:
The hierarchy / structure of the document in breadcrumbs is correct, its just that the highlighting doesn't start in the right place. Here I've have expanded out the folded sections:

Positron Version: 2025.07.0 (Universal) build 134
Code - OSS Version: 1.100.0
Commit: 572a37b9b646af0b813dbe4d424bc9bfa1629646
Date: 2025-06-18T03:33:46.852Z
Electron: 34.5.1
Chromium: 132.0.6834.210
Node.js: 20.19.0
V8: 13.2.152.41-electron.0
OS: Darwin arm64 24.4.0
Any help much appreciated!
Sam