Skip to content
New issue

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

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

Already on GitHub? # to your account

Go Back/Go Forward: preserve selections #89699

Closed
jrieken opened this issue Jan 30, 2020 · 5 comments
Closed

Go Back/Go Forward: preserve selections #89699

jrieken opened this issue Jan 30, 2020 · 5 comments
Assignees
Labels
feature-request Request for new features or functionality verification-needed Verification of issue is requested verified Verification succeeded workbench-history History item issues
Milestone

Comments

@jrieken
Copy link
Member

jrieken commented Jan 30, 2020

  • in file A select multiple lines
  • reveal file B
  • invoke Back-command (ctrl+-)
  • 🐛 the selection file A is now collapsed/empty
@bpasero bpasero added feature-request Request for new features or functionality workbench-history History item issues labels Feb 1, 2020
@bpasero bpasero added this to the Backlog Candidates milestone Feb 1, 2020
@vscodebot
Copy link

vscodebot bot commented Feb 1, 2020

This feature request is now a candidate for our backlog. The community has 60 days to upvote the issue. If it receives 20 upvotes we will move it to our backlog. If not, we will close it. To learn more about how we handle feature requests, please see our documentation.

Happy Coding!

@bpasero
Copy link
Member

bpasero commented Feb 1, 2020

Looks like I am doing this on purpose:

this.textEditorSelection = Selection.isISelection(_selection) ? {
startLineNumber: _selection.startLineNumber,
startColumn: _selection.startColumn
} : undefined;

This might break people's assumptions if we are going to change it because a user may expect that "Go Back" can be invoked and you can type without deleting whatever was in the selection.

However I should probably revisit using the start line/column and not the end line/column.

@bpasero bpasero closed this as completed in f6c0093 Feb 4, 2020
@bpasero bpasero added the verification-needed Verification of issue is requested label Feb 4, 2020
@bpasero
Copy link
Member

bpasero commented Feb 4, 2020

Let's just do it.

Verification: going back/forward restores selections as they were. Note that in order to get a history entry there needs to be at least 10 lines between the positions to consider the entry as new entry.

Kapture 2020-02-04 at 10 01 53

@bpasero bpasero changed the title Go Back command collapses selections Go Back/Go Forward: preserve selections Feb 4, 2020
@jrieken jrieken added the verified Verification succeeded label Feb 26, 2020
@ArturoDent
Copy link

ArturoDent commented Feb 27, 2020

Works well except with the new Column Selection Mode turned on. Then going back only selects the first line of the previous column selection.

@bpasero
Copy link
Member

bpasero commented Feb 27, 2020

Yeah, I think the history is currently NOT multi-cursor aware.

@vscodebot vscodebot bot locked and limited conversation to collaborators Mar 20, 2020
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
feature-request Request for new features or functionality verification-needed Verification of issue is requested verified Verification succeeded workbench-history History item issues
Projects
None yet
Development

No branches or pull requests

3 participants