microsoft / microsoft/monaco-editor
[Feature Request] Number of undo / redo available (in the stack)
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 46.8k
- Forks
- 4.1k
- Avg merge
- 17h 58m
- Merged PRs (30d)
- 1
Description
Context
- This issue is not a bug report. (please use a different template for reporting a bug)
- This issue is not a duplicate of an existing issue. (please use the search to find existing issues)
Description
I'm trying to find a way to get / know the number of undo and redo available in the stack in order to show them to the user.
I was planning on simply add a counter when a onDidChangeContent was done but there are rules when an undo is added such a moving cursor on the file, time between input etc that made me impossible to count them properly.
Could it be possible to have a property or is there already a way to access this info ?
Monaco Editor Playground Link
No response
Monaco Editor Playground Code
No response
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
The issue names no files or tests, but identifies the onDidChangeContent entry point and Monaco's undo/redo behavior. Start by tracing how content changes and undo grouping are exposed, then determine a supported way to report both stack counts. Done means the API behavior is decided and verified against cursor movement, timing, and undo grouping rules.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, typescript
- Domain
- api, frontend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100