MacDownApp / MacDownApp/macdown
Cursor position after unindenting is still wrong
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
Need to consider both

and

Currently the first situation works fine, but the second one does not. The second one also includes cases where the selection does not go all the way to the beginning of line before unindenting, but will after it (e.g. three of the four leading spaces are selected).
Unindenting without selection is similar. If the cursor is at the beginning of the line, it will be put at a weird place after unindenting.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the two screenshot scenarios in the MacDown editor, including partial selections and unindenting with the cursor at the line start. Trace the existing unindent behavior and verify that the cursor or selection remains at the expected position in every described case.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- macos, objective-c
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100