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

Test: anchor selection #98087

Closed
2 tasks done
isidorn opened this issue May 18, 2020 · 5 comments
Closed
2 tasks done

Test: anchor selection #98087

isidorn opened this issue May 18, 2020 · 5 comments

Comments

@isidorn
Copy link
Contributor

isidorn commented May 18, 2020

Refs: #95894

Complexity: 2

Create Issue


We have introduced three new editor commands:

"Set Selection Anchor" Ctrl+k, Ctrl+b
"Select From Anchor to Cursor" Ctrl+k, Ctrl+k
"Go to Selection Anchor"

Try out these commands and make sure they works as expected. Thus verify:

  • Set Selection Anchor sets a selection anchor, only one anchor per file is possible
  • Pressing Esc while an anchor is set cancles it
  • Select From Anchor to Cursor select from set anchor to the cursor position
  • Go to selection anchor navigates the cursor to the set anchor
  • The anchor position nicely updates when you change text before it
  • Once a new file is opened in the editor the anchor is no longer set
@isidorn isidorn added this to the May 2020 milestone May 18, 2020
@ArturoDent
Copy link

Should the selection anchor persist after Select From Anchor to Cursor? Perhaps a mistake was made the first time or there is a use case for repeated selections using the same anchor.

@isidorn
Copy link
Contributor Author

isidorn commented May 20, 2020

@ArturoDent currently it is designed in a way that the anchor does not persist. I felt this would make a nicer expereince so user would most of the time not need to manage the anhcor. Though I see that once a new anchor is set the only one is lost, so there is not a lot of managin. I am open for feedback and that we potentially change this.

@jareds
Copy link

jareds commented May 20, 2020

Based on the way I use this feature Select From Anchor to Cursor should destroy the anchor. I'd say I'm cutting or deleting text at least 50% of the time I use this feature. If I delete the text I would expect the anchor to go away. If I'm not deleting text I'd still prefer the anchor to go away since it would be extra complexity to try and remember that because I didn't delete text the anchor is still around.

@ArturoDent
Copy link

I would prefer to manage the anchor myself. Perhaps there are other selections I would like to do begore getting back to the select to anchor action.

I agree with this: "If I delete the text I would expect the anchor to go away" . But if I do a selection that doesn't involve the anchor I want the anchor to stay.

@sana-ajani
Copy link
Contributor

@ArturoDent the anchor goes away after the command "select from anchor to cursor".

@sana-ajani sana-ajani removed their assignment Jun 3, 2020
@dbaeumer dbaeumer closed this as completed Jun 3, 2020
@github-actions github-actions bot locked and limited conversation to collaborators Jul 18, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants