[BRLTTY] Preserving presentation when copying to the clipboard
Dave Mielke
Dave at mielke.cc
Sun Mar 30 21:13:38 UTC 2025
[quoted lines by Sébastien Hinderer on 2025/03/30 at 21:36 +0200]
>Hello,
>
>Dave Mielke (2025/03/30 12:53 -0400):
>> [quoted lines by Sébastien Hinderer on 2025/03/30 at 15:33 +0200]
>>
>> >We believe that, currently, it is not really possible to preserve the
>> >presentation of, say, a block of code when it gets copied to the
>> >clipboard.
>>
>> I haven't had a problem with this. You need to do a rectangular copy.
>
>I just tried this, in a virtual ocnsole.
>
>Assume the following program:
>
>#include <stdio.h>
>#include <stdlib.h>
>
>int main()
>{
> prinf("Short line\n");
> prinf("A looooooooooonger line\n");
> printf("OK\n");
> return 0.
>}
>
>Imagine I would like to duplicate the block consisting of the three
>printf lines. First, I CLIP_NEW on the 'p' of the first printf. Then, I
>COPY_RECT on the semicolon that terminates, the third line.
It's a rectangular cut. If you want all of the longer lines then you need to CLIP_RECT far enough to the right to pick up the ends of the longer lines. That shouldn't be an issue, though, as trailing blanks are trimmed.
--
I believe the Bible to be the very Word of God: http://Mielke.cc/bible/
Dave Mielke | 2213 Fox Crescent | WebHome: http://Mielke.cc/
EMail: Dave at Mielke.cc | Ottawa, Ontario | Twitter: @Dave_Mielke
Phone: +1 613 726 0014 | Canada K2A 1H7 |
http://mielke.cc/xmother.html (Letter from a Feminist ex-Mother)
More information about the BRLTTY
mailing list