# Issue with undo after copying a string inside a string

Bug introduced in 10.0 and persisting through V11.3

Here's a small but annoying issue related to undo and copying of strings.

Steps required to get the problem:

• Type "test"
• Copy "test"
• Put cursor inside "test" (e.g. after "e")
• Paste (==> "te" test "st")
• Undo (==> "te" st ")

as you can see, additional " is left.

The main purpose of that topic is for me to remember that I've reported it already :)

Why this matters?

You want to insert into "test" something you copied. Sometimes you've copied from output where "s are not visible. And you are not sure whether you've copied string or expression. In the first case you want to undo pasting and you will face this issue.

Ah, so the question is, is this a bug?

A support case with the identification [CASE:3618682] was created.

I was able to reproduce the issue about undoing with string "in" a string. Consequently, I filed a report with our development team raising the issues and also shared your contact information with them so you can be notified once the issue is resolved.

• I observe it also with Mathamtica 10.2.0 on Win64bit. And it matters a lot as sometimes I get much bigger mess after undoing a paste. You have found a clear way of reproducing it on the small scale! (+1) – Johu Jun 2 '16 at 10:02
• I experienced this also on OS X with several Mathematica versions, probably the issue was introduced along with the Undo functionality. – shrx Jun 2 '16 at 10:56
• For completeness, in addition to the " there are extraneous spaces left behind. – Bob Hanlon Jun 2 '16 at 14:23
• @Kuba Yes, these always (at least starting from version 5) was a one-time (single) Undo. Redo and multiple Undo were introduced in version 10. – Alexey Popkov Jun 2 '16 at 19:35
• It did not do this in version 7 under Windows. I am considering this a bug introduced in the undo system rewrite. I am tentatively adding the bugs tag. – Mr.Wizard Jun 3 '16 at 0:21