Commit 7f647bac authored by Tomaz  Canabrava's avatar Tomaz Canabrava Committed by Tomaz Canabrava
Browse files

Simplify logic

parent 51fb3c99
......@@ -1552,15 +1552,11 @@ int Screen::copyLineToStream(int line ,
}
if (appendNewLine) {
if (isBlockSelectionMode) {
characterBuffer[count] = options.testFlag(PreserveLineBreaks) ? Character('\n') : Character(' ');
count++;
} else if ((currentLineProperties & LINE_WRAPPED) != 0) {
// do nothing extra when this line is wrapped.
} else {
// When users ask not to preserve 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.`
// When users ask not to preserve 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.`
const bool isLineWrapped = (currentLineProperties & LINE_WRAPPED) != 0;
if (isBlockSelectionMode || !isLineWrapped) {
characterBuffer[count] = options.testFlag(PreserveLineBreaks) ? Character('\n') : Character(' ');
++count;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment