On 05/10/2018 03:10 PM, Scott Kostyshak wrote:
> On Fri, Apr 20, 2018 at 03:48:26AM +0000, Scott Kostyshak wrote:
>> I always thought that LyX ran the plain text routine to put text on the
>> clipboard. Is that true?
>>
>> With the attached file, abcd.lyx, if I select all and press ctrl + c,
>> when I paste it pastes as "abcd". If instead I go to
>>
>>   File > Export > Plain text
>>
>> I get the following:
>>
>>   a
>>   b
>>   c
>>   d
>>
>> Does anyone know what's going on?
> I can investigate further, but first I would like to see if my
> expectation is reasonable. Do others expect that ctrl + c does the same
> as export to plain text? Or does this asymmetry not seem surprising?

No, we don't seem to use the plaintext output routine for this. The
string version is created by
CursorData::selectionAsString, called from cap::copySelection, which
calls Paragraph::toString,
which calls the toString method of each of the insets. By default, that
does nothing, and
InsetNewline does not seem to have an override. Presumably, it could,
but we seem to skip
newline characters here on purpose, since AS_STR_NEWLINE does not get
set. I'm not sure
why that is.

Riki

Reply via email to