StackExchange / StackExchange/Stacks-Editor

Remember cursor position when switching modes

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

Nobody has claimed this yet.

enhancement mode - markdown mode - rich text
Dominant language
TypeScript
Stars
437
Forks
61
Avg merge
16h 2m
Merged PRs (30d)
8

Description

Is your feature request related to a problem? Please describe.

When switching between modes the cursor is always set to the top of the document.

Describe the solution you'd like

Your cursor should know where you were in the mode you started in and map that location to the mode you ended in.

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

No files or tests are named in the issue. Start by locating the mode-switching entry point and the editor's cursor or selection state, then trace how positions are represented in each mode. Done means switching modes preserves the starting location by mapping it into the destination mode instead of moving to the document top.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 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.