When copying 1 line code and pasting to chat with Command + V, it pasts raw text instead of reference

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

When copying 1 line code and pasting to chat with Command + V, it pasts raw text instead of reference. When copying 2 or more lines, Command + V adds reference to those lines like “file.js (15-20)” instead of raw text. Previously it worked fine when i used to copy 1 line code, but after recent update it no longer works. Also, “Add symbol to current/new chat” buttons do not do anything anymore

Steps to Reproduce

Select 1 line of code or partial text from 1 line of code then do “Command” + “V” in agent chat.

Expected Behavior

Should add reference to code instead of raw text

Operating System

MacOS

Version Information

Version: 3.0.9
VSCode Version: 1.105.1
Commit: 93e276db8a03af947eafb2d10241e2de17806c20
Date: 2026-04-03T02:06:46.446Z
Layout: editor
Build Type: Stable
Release Track: Default
Electron: 39.8.1
Chromium: 142.0.7444.265
Node.js: 22.22.1
V8: 14.2.231.22-electron.0
OS: Darwin arm64 24.6.0

Does this stop you from using Cursor

Sometimes - I can sometimes use Cursor

1 Like

Hi @realTime thanks for your post! This is actually working as intended. The copying reference to code is only applicable if it is more than 1 line of code being copied. So if you copy just one line you’ll see the raw text and if you copy more than that you’ll see the reference instead.

But before the last update, if i selected line like this (attached screenshot), it used to show reference. If this is intended behavior then how can i reference 1 line of code in any other way? If i wanted to paste raw text i could just use Command + Shift + V right? Maybe it is better to allow referencing 1 line of code?

1 Like

You are indeed correct, the behavior of the one-line copying as raw text is new, and it was introduced in a commit in the latest version.

However, you can still have the behavior you’re used to in the past by selecting one line and pressing “Add to Chat, " which will still show as a Reference in the chat rather than Raw text.

Let me know if you still have an issue with the add to chat button.

1 Like

@kevinn I can confirm that the old behavior was pasting it as a reference for single line or multi line. If you want raw text then it should be pasted as Command + Shift + V.

But now copying a single line pastes it as raw text which is annoying since if we want raw text we could have pasted using Command + Shift + V instead.

I hope this gets fixed soon as it is very troublesome for my usecase.

Your suggested fix takes too much time as you’d have to select the part of the line before doing CMD + L.
This means you either need a mouse to highlight it or use multiple keyboard keys.

Instead of the old behavior which you could just CMD + C on the current line even without highlighting anything, and directly paste it to the agent.

Like i’ve said, if you want to paste raw then use CMD + SHIFT + V. This makes it more consistent with the behavior even for multiline.

Thanks for following up. It is indeed a change, but it’s not a bug. We have some test cases written to test this behavior (single-line copy-paste is ineligible for the reference copy), so it is not an accident.

Can you elaborate a bit more on the impact to your workflow? I don’t quite understand the impact.

Thanks for the clarification, but I strongly disagree with this change. It’s a clear regression in usability for keyboard-driven workflows.

The previous behavior was simple and consistent:

  • CMD + C (no selection needed)

  • CMD + V → reference

  • CMD + SHIFT + V → raw text

That separation made perfect sense and required zero friction.

Now:

  • Single-line copy → forced raw text

  • Reference paste requires extra steps (manual selection or additional commands)

This turns what used to be a 2-keystroke operation into a multi-step process, which is a significant downgrade in efficiency.

More importantly, the current behavior is inconsistent and unpredictable:

  • CMD + V behaves differently depending on whether it’s single-line or multi-line

  • This breaks muscle memory and makes the system harder to reason about

The justification that “single-line copy is ineligible for reference” doesn’t align with real usage. In practice, single-line references are one of the most common workflows, especially when iterating with the agent line-by-line.

Also, the suggested workaround (selecting text or using additional commands like CMD + L) is not equivalent:

  • It requires more key presses or mouse usage

  • It interrupts flow

  • It doesn’t scale when doing this repeatedly

This isn’t just a preference issue. It directly impacts speed and usability.

At minimum, there should be:

  • A way to restore the old behavior, or

  • A setting to control paste mode (reference vs raw)

Right now, the change removes a highly efficient workflow and replaces it with a slower, less consistent one.

1 Like

I agree, this change is kinda inconvenient. I usually just click a line (without highlighting anything) and use ctrl C + ctrl V to paste a line reference to the agent, now I have to highlight something and use ctrl L (it doesn’t work if I don’t select anything)