I have a basic Mac app with a stock NSTextView ("Rich Document Content Text View" in Interface Builder), but I have also observed this behavior in TextEdit:
- Create a new bulleted list with 3 items
- Select and copy a single list item
- Paste the list item into the same document
→ The pasted item loses its list formatting, i.e. when I press Return at the end, no new list item is automatically added.
→ When I select two or more list items, it works correctly.
Here's a quick video:
Other observations
I tested the same procedure in Scrivener (which I believe also uses NSTextView), and here copying a single list item places the correct formatting list attributes on the clipboard.
I inspected the clipboard and when I copy a single list item, indeed, the RTF contents are different compared with Scrivener.
NSTextView (one item copied):
\f0\fs36 \cf0 \'95 Regular list item}
Scrivener (one item copied):
\f0\fs32 \cf0 {\listtext \uc0\u8226 }Regular list item}
Note how Scrivener places the correct formatting on the clipboard.
NSTextView (two items copied):
\f0\fs36 \cf0 {\listtext \uc0\u8226 }Regular list item\
{\listtext \uc0\u8226 }Another list item}
When copying two list items, it works as expected.
What am I missing? Or is this a bug/feature and the Scrivener folks are working around this in their app (e.g. detecting when a single list item is copied and fixing its attributes)?
