When using XML tags the editor gets confused about where to insert newlines with Shift+Enter.
This has been happening for some time (I reported this in the 1.7 chat thread), but I did not make the connection to XML tags. I started using XML a lot more after GPT-5 tips and tricks came out recommending this.
Secondary bug, likely not related: I have also noticed re-opening cursor often results in the current chat thread not allowing typing in the prompt. I have to close and reopen the past chat (new chat tabs always work).
Steps to Reproduce
Type XML tags, such as
<goal>
some text
Then click somewhere in the middle and Shift+Enter and the newline happens at the end, not at the cursor location.
If that doesn’t immediately work, try a closing tag and clicking around and trying it. Eventually it gets in a bad state and I have to cut, paste and start at end, or cut it all out to another text editor and paste in to continue in the middle, etc.
Expected Behavior
Shift+Enter should always insert a new line at the cursor location
Operating System
MacOS
Current Cursor Version (Menu → About Cursor → Copy)
Hey, thanks for the report. Unfortunately, I can’t reproduce it. I tried for a long time following your steps. Could you let me know if this happens in a new chat prompt or in the second/third messages, and so on? Also, could you please record a short video of the behavior?
This is still happening in nearly 100% of my chat threads. I have not had a chance to try and reproduce it without any sensitive text to share, but I would think if you are working on a mac and in my version, you should end up with the same issue. Is this not the case? Is there any temp data I can clear that may be unique to my user setup here?
Note I have gotten used to typing an alpha-character and deleting it before doing work when it happens.
This shows that when I click to return focus to the agent prompt, the edit point for things like Shift+Enter and paste is not at the cursor, unless I type an alpha character first:
It is not only Shift+Enter (as I mention above it affects keyboard paste too). Here I select some text and press delete (backspace on non-Macbooks?) and the selection is ignored completely:
…when this happens the only way to bulk-delete text is right-click cut.
It may be unrelated, but in notepads sometimes a list item gets stuck and can not be deleted. Lots of instability in these tools I use constantly all day.
I’ve been reporting this for some time. I hoped it would be fixed in v2 but it persists. I updated the thread there. It happens to me all day every day. I have to constantly type and remove a letter to force the cursor position to act as if it is at the cursor.
Recently in 2.0 copy and paste stops working often as well.