← Back to team overview

zim-wiki team mailing list archive

Re: Copy-pasing verbatim text pastes unwanted newline at the end

 

On 25/04/13 09:38, andré wrote:
> Adrian Fita a écrit :
>> This happens when selecting individual lines as well, not only multiple
>> lines. And I select until the end of the line with Shift+End. Pressing
>> Shift+Right arrow to unselect the last newline actually unselects the
>> last character, so the selection doesn't contain the newline char at the
>> end of the line. But the pasted text contains a newline.
>>
>> Thanks.
>>
>> --
>> Fita Adrian
>>
> 
> Doesn't work like that on Linux.

Hm. I just tested in Linux (the same v0.59) and it happens in Linux as well.

Steps to reproduce:
1. write some lines in a page
2. select the lines and press Ctrl+T (or select Verbatim from the Format
menu)
3. Hit the Home key and copy-paste until the end of the line from the
Verbatim-formatted text in another text editor. The pasted text contains
a newline at the end

> What happens if you add a space at the end of the line, then unselect 
> the space ?

It happens even when I have space at the end and select until the end of
the line, then unselect the last space: the pasted text contains a new
line at the end. The newline is even present when I only select a part
of a line.

But I just figured something: if I don't select from the begining of the
line, the newline is not pasted. So it seems to be related with the
begining of the lines in Verbatim-formatted text.

> Or alternately, select the lines you want by placing the cursor at the 
> beginning of the line, using the down arrow to select the line(s) 
> wanted, then backspacing to the last caracter of the line ?
> (Just in case the shift-end code was still present when you used it.)
> 
> Or again, using only the mouse to select the text, without using shift-end ?
> 
> Regards

Selecting with the mouse is the same.

-- 
Adrian Fita


Follow ups

References