Refactoring command does not count as one action for undo, undoing the next command reverts all refactoring.
Open
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 15.2k
- Forks
- 1.5k
- Avg merge
- 3d 18h
- Merged PRs (30d)
- 6
Description
Describe the bug
Refactoring command does not count as one action for undo.
Undoing the next command reverts all refactoring.
To Reproduce
- Try to rename symbols like a variable name in your project with F2
- o -> type something -> exit edit mode
- Press u to undo. The line disappears as it should but it also reverts all the refactoring.
- Using redo will redo all the refactoring and including the added line. There is no way to go to the state after refactoring and before adding the line using undo/redo.
Environment (please complete the following information):
- Extension Name: vim
- Extension Version: 0.16.0
- OS Version: Darwin x64 17.7.0
- VSCode version: 1.26.1
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 sequence using F2 to rename symbols, then insert a line with o, exit edit mode, and press u followed by redo. Start by tracing how refactoring and subsequent editing are recorded in the undo history; done means undo removes only the inserted line and another undo reaches the state before refactoring, with redo restoring each step separately.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript, vscode
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100