Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Utilities
Konsole
Commits
7f647bac
Commit
7f647bac
authored
Jun 16, 2021
by
Tomaz Canabrava
Committed by
Tomaz Canabrava
Jun 18, 2021
Browse files
Simplify logic
parent
51fb3c99
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/Screen.cpp
View file @
7f647bac
...
...
@@ -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
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment