Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Rename Symbol" operations combine with the previous undo step #30652

Closed
benblank opened this issue Jul 13, 2017 · 2 comments
Closed

"Rename Symbol" operations combine with the previous undo step #30652

benblank opened this issue Jul 13, 2017 · 2 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug editor-contrib Editor collection of extras verified Verification succeeded
Milestone

Comments

@benblank
Copy link

When editing a JavaScript file (I haven't tested with other file types), renaming multiple symbols in a row, then attempting to undo the last one, will result in all of them being undone.

  • VSCode Version: Code 1.14.0 (b8cd5b9, 2017-07-10T18:24:22.120Z)
  • OS Version: Darwin x64 16.6.0
  • Extensions:
Extension Author (truncated) Version
vscode-eslint dba 1.2.11
gitlens eam 4.3.1
vscode-ember emb 0.1.0
vsc-ember-cli fel 0.3.3
csstriggers kis 0.3.1
cpptools ms- 0.12.0
vscode-icons rob 7.10.1

Steps to Reproduce:

  1. Open a new file (Cmd-N).
  2. Change the language mode to JavaScript (Cmd-Shift-P, "mode", Enter, "javas", Enter).
  3. Type const foo = 1; and press Enter.
  4. Type const bar = 2; and press Enter.
  5. Ctrl-click on the token "foo", select "Rename Symbol", type "foo1", and press Enter.
  6. Ctrl-click on the token "bar", select "Rename Symbol", type "bar2", and press Enter.
  7. Undo a single step (Cmd-Z).
  8. Observe that both rename operations have been undone.

Reproduces without extensions: Yes

@vscodebot vscodebot bot added new release javascript JavaScript support issues labels Jul 13, 2017
@mjbvz mjbvz added editor and removed javascript JavaScript support issues labels Jul 14, 2017
@mjbvz mjbvz assigned rebornix and alexdima and unassigned mjbvz Jul 14, 2017
@mjbvz
Copy link
Contributor

mjbvz commented Jul 14, 2017

This does not seem JavaScript specific. @alexandrudima or @rebornix Can you please take a look since this involves the undo history

@alexdima
Copy link
Member

@jrieken undo stops can be pushed via model.pushStackElement

two calls should be made, before and after the call to model.pushEditOperations in
https://github.com/Microsoft/vscode/blob/7494a1b944e9a81c504a0a6f1bc33f5522cd81cc/src/vs/editor/common/services/bulkEdit.ts#L117

@alexdima alexdima assigned jrieken and unassigned rebornix and alexdima Aug 10, 2017
@jrieken jrieken added bug Issue identified by VS Code Team member as probable bug editor-contrib Editor collection of extras labels Aug 14, 2017
@jrieken jrieken added this to the August 2017 milestone Aug 14, 2017
@roblourens roblourens added the verified Verification succeeded label Aug 31, 2017
@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 17, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug editor-contrib Editor collection of extras verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

7 participants