Cmd/Ctrl+L does not add editor selection to chat (Windows + macOS)

Hey, thanks for the detailed report.

First, about the !isGlass condition you found: that’s there on purpose. In Agents Window, Cmd/Ctrl+L has its own separate binding that adds the selection from the open file or terminal to the agent chat. So this condition doesn’t disable the default behavior in Agents Window. Your workaround with keybindings.json is fine to keep, it doesn’t break anything. One more thing: if focus is in the inline bar Cmd+K, then Cmd/Ctrl+L sends that prompt to the agent instead of adding the selection. That’s expected.

To understand where it stops working, we need a bit more detail:

  1. Open About Cursor on Windows: Help > About, then send the Layout: line.
  2. Restart Cursor, then open a file from Explorer, not from Changes and not from diff view.
  3. Check that there are no code chips in the chat input.
  4. Select a few lines and press Cmd+L or Ctrl+L on Windows.
  5. Without sending, select another block in the same file and press Cmd/Ctrl+L again.

Did the code get added after step 4 and after step 5? Also, can you confirm if the issue happens when selecting in diff or Changes view instead of a normal file tab? And on Windows, was the terminal focused at any point? There, Ctrl+L goes to the shell by default.

For now, you can also try this: if the chat opens without your code, remove any existing code chips from the input, or send the message, then press Cmd/Ctrl+L again.

A similar case was discussed in this thread:

Take a look in case it matches. Let me know what you find.