MacDownApp / MacDownApp/macdown

Cursor position after unindenting is still wrong

Open
#367 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Need to consider both

![screen shot 2015-05-04 at 19 28 15](https://cloud.githubusercontent.com/assets/605277/7452711/c20f8de8-f293-11e4-9ab0-fc89525257ce.png)

and

![screen shot 2015-05-04 at 19 28 26](https://cloud.githubusercontent.com/assets/605277/7452715/c71277ba-f293-11e4-88fd-bc7aa1eaf0b9.png)

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

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

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.