Skip to content

fix(edit): Ignore id tags when calculating highlighted line in edit view#302

Open
wilywyrm wants to merge 3 commits intotranxuanthang:mainfrom
wilywyrm:ignore-id-tags-offset
Open

fix(edit): Ignore id tags when calculating highlighted line in edit view#302
wilywyrm wants to merge 3 commits intotranxuanthang:mainfrom
wilywyrm:ignore-id-tags-offset

Conversation

@wilywyrm
Copy link

@wilywyrm wilywyrm commented Jan 28, 2026

Background

The EditLyrics view naively calculates the line to highlight without taking into consideration if lines are not a timed lyric line (such as ID tags like [lang: <language>] or an empty newline). This causes a mismatch during playback if there are any non-time lines in the document.

The non-edit view pre-parses the document to strip out display ID tags and so does not have the same problem.

Screenshot From 2026-01-27 22-30-22

Note that the ID tag is incorrectly highlighted when playback has already progressed past the first lyric line's timestamp.

Implementation

  • Switches the highlighting logic to map lyric numbers to line numbers within the lyric document
  • Caches the line mapping, which resets on document change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant