MacDownApp / MacDownApp/macdown

Post-#933 scroll desync

Open
#1,111 0 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rich Text Format
Stars
9.8k
Forks
1.2k
PR merge metrics
No merged PRs in 30d

Description

Sometimes the new scroll sync algorithm from PR #933 fails. Sometimes it "skips" a header so it's farther down in the preview pane than it should be.

This [demo video on YouTube](https://youtu.be/LXW92lyeWbE) shows the bug on a fairly large file I'm working on, where it "skips" this level 3 header, resulting in the sync being off-by-one:

```
### struct `InlineFormatOptions: OptionSet`
```

I haven't been able to eliminate the specific cause of the bug. The document has a `[TOC]`, but the bug persists even if I delete the ToC. It also persists through re-opening of the app.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing PR #933 and reproducing the scroll-sync failure with the linked demo or a large Markdown file containing the shown level 3 header. Compare the editor and preview positions around that heading, with and without a [TOC]. Done means headers remain aligned after scrolling and after reopening the app.

Written by the indexing model from the issue text.

Assessment

Tech stack
macos, markdown, objective-c
Domain
desktop, frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.