micro-editor / micro-editor/micro

MoveLinesUp/Down works inconsistently with multiple cursors

Open
#1,933 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
29.6k
Forks
1.4k
Avg merge
2d 18h
Merged PRs (30d)
10

Description

Description of the problem or steps to reproduce

1.Put cursors in multiple consecutive lines.
2. Use MoveLinesDown at least once.
3. Use MoveLinesUp.

Expected behavior: Step 3 should undo step 2.
Instead: Line order is changed.

2020-12-09-11-53-39

OS: Debian 10
Terminal: lxterminal
Commit Hash: cfcb2e45

Contributor guide

No contributing guide indexed for this repository

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 consecutive-multicursor case using the MoveLinesDown and MoveLinesUp commands, then locate their implementations in the editor. Trace how cursor positions and line order are updated, and add a regression test showing that moving down and then up restores the original order.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.