mirror of
https://github.com/KDE/konsole.git
synced 2026-05-02 19:56:46 -04:00
Use SPACE as delimiter when joining multiple lines.
Currently, when users use ctrl+mouse to select and copy multiple lines, those lines are joined into single line in a seamless way. LINEBREAK is simply removed, thus the first character of second line will be positioned right after the last character of the first line. This patch replaces the LINEBREAK with a SPACE. Thanks to Jekyll Wu (adaptee@gmail.com) for patch and research. BUG: 136730 FIXED-IN: 4.8
This commit is contained in:
@@ -1291,9 +1291,12 @@ int Screen::copyLineToStream(int line ,
|
||||
const bool omitLineBreak = (currentLineProperties & LINE_WRAPPED) ||
|
||||
!preserveLineBreaks;
|
||||
|
||||
if ( !omitLineBreak && appendNewLine && (count+1 < MAX_CHARS) )
|
||||
if ( appendNewLine && (count+1 < MAX_CHARS) )
|
||||
{
|
||||
characterBuffer[count] = Character('\n');
|
||||
// When users ask to omit the linebreaks, they usually mean: `treat
|
||||
// LINEBREAK as SPACE , thus joining multiple lines into single line in
|
||||
// the same way as 'J' does in VIM.`
|
||||
characterBuffer[count] = omitLineBreak ? Character(' ') : Character('\n');
|
||||
count++;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user