Skip to content

feat: allow Cmd+L / Cmd+I on empty selection to select the entire line #6711

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

fbricon
Copy link
Contributor

@fbricon fbricon commented Jul 18, 2025

This PR makes it simpler to add code to the Chat context: if no code is selected, the entire line is added to the context by Cmd+I or Cmd+L. This behaviour is similar to what Github Copilot offers.

expand-empty-selection.mp4

Summary by cubic

Cmd+L and Cmd+I now select the entire line if no text is selected, making it easier to add code to the Chat context. This matches the behavior found in GitHub Copilot.

@fbricon fbricon requested a review from a team as a code owner July 18, 2025 17:12
@fbricon fbricon requested review from Patrick-Erichsen and removed request for a team July 18, 2025 17:12
@dosubot dosubot bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Jul 18, 2025
@Patrick-Erichsen
Copy link
Collaborator

I think some of the e2e tests have a valid failure here.

But, I believe at least for cmd + i the current behavior is to insert at the cursor location rather than add the line as context. I think this would also break the ability to toggle open/close the sidebar using cmd + L.

Is your main thought here that Copilot behaves in the way you showed in that video?

cc @sestinj for a second opinion on behavior.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size:M This PR changes 30-99 lines, ignoring generated files.
Projects
Status: Todo
Development

Successfully merging this pull request may close these issues.

2 participants