Skip to content
This repository was archived by the owner on Mar 3, 2023. It is now read-only.
This repository was archived by the owner on Mar 3, 2023. It is now read-only.

cmd-l in multi-line selection doesn't select beginning of first line #3624

Closed

Description

@colllin

When you you have no selection, with a cursor in the middle of a line, cmd-l selects the entire line, from the left side of the editor to the right side, including the ending newline.

When you have a selection that spans a few lines, cmd-l selects the end of the last line, but doesn't select the beginning of the first line. I expected it to select the beginning of the first line too.
Screen capture

Activity

  1. winstliu commented on Apr 13, 2015

    @winstliu
    Contributor

    Still reproducible in latest master.

  2. colllin commented on Apr 14, 2015

    @colllin
    ContributorAuthor

    I'd be willing to look into it if someone could point me in the right direction.

  3. billyjanitsch commented on Jun 22, 2015

    @billyjanitsch
    Contributor

    Some more inconsistent behavior here: if you click mid-way through a line, then shift+down and cmd+l, you get the behavior @colllin describes. If you do shift+up then cmd+l, the beginning of the first line is selected, but not the end of the last line. So, what seems to be going on is that cmd+l is adding the line containing the cursor to the selection, instead of adding all lines containing selected text to the selection.

    Weirdly, if you click and drag from midway through a line to midway through the line above then cmd+l, it selects all of the upper line but deselects the lower line entirely.

    Also happy to look into this and come up with a PR if someone can suggest where to look.

  4. jeancroy commented on Sep 2, 2015

    @jeancroy
    Contributor

    OK I believe the problem is here
    called by this

    1. It'll only expand the line that contain the cursor.
    2. The cursor is on the last selected line.

    IE

    • select from top to bottom: only last line expand
    • select from bottom to top: only first line expand
  5. maxbrunsfeld commented on Sep 3, 2015

    @maxbrunsfeld
    Contributor

    Fixed via #8646.

  6. colllin commented on Sep 3, 2015

    @colllin
    ContributorAuthor

    YES! 👏 @jeancroy

  7. billyjanitsch commented on Sep 3, 2015

    @billyjanitsch
    Contributor

    Thank you so much @jeancroy!

  8. bronson commented on Sep 3, 2015

    @bronson

    Very nice! 🌈 @jeancroy

  9. lock commented on Jan 20, 2019

    @lock

    This issue has been automatically locked since there has not been any recent activity after it was closed. If you can still reproduce this issue in Safe Mode then please open a new issue and fill out the entire issue template to ensure that we have enough information to address your issue. Thanks!

  10. locked as resolved and limited conversation to collaborators on Jan 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions