Skip to content

Support multi-line selection when staging lines #5738

Closed

Description

@cheshire137

When I have many adjacent lines changed in a file, it can be tedious to go through them individually and select only some of them. This happens, for example, when I've added a few new methods and wait until the end to make my commits, as opposed to making commits as I go. I'd like the commits to be atomic by committing only one method at a time, which currently requires me to click each individual line of the method to stage it.

I was thinking a nice interface would be to click a line, hold down Shift, and click a line several lines away, causing Desktop to add the second clicked line and all lines between it and the first line I clicked.

Activity

  1. billygriffin commented on Sep 25, 2018

    @billygriffin
    Contributor

    @cheshire137 Thanks for the issue! If I'm understanding your problem correctly, I typically do this by just clicking, holding, and dragging from the first line to the last if they're adjacent. I've seen lots of other people do this as well, and it seems to work well. Thoughts?

  2. added
    more-info-needed
    on Sep 25, 2018
  3. cheshire137 commented on Sep 25, 2018

    @cheshire137
    ContributorAuthor

    😭 It works! I have clicked so many individual lines but no more! Thanks!

    Maybe a tooltip could be shown when first clicking lines/hunks that tells the user about the drag feature? Unless that already exists and I missed it! Relevant: #1688.

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

    more-info-needed

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions