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
155cedec
Commit
155cedec
authored
Nov 17, 2020
by
Carlos Alves
Committed by
Tomaz Canabrava
Dec 31, 2020
Browse files
Keep the lines property
Instead of assign LINE_DEFAULT to next line, it will keep the current line property.
parent
bccd0a3f
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/Screen.cpp
View file @
155cedec
...
...
@@ -377,7 +377,7 @@ void Screen::resizeImage(int new_lines, int new_columns)
int
currentPos
=
0
;
int
count_needed_lines
=
0
;
while
(
currentPos
!=
_screenLines
.
count
()
-
1
)
{
// if the line have the '
NextLine' char
, concat with the next line and remove it.
// if the line have the '
LINE_WRAPPED' property
, concat with the next line and remove it.
if
((
_lineProperties
[
currentPos
]
&
LINE_WRAPPED
)
!=
0
)
{
_screenLines
[
currentPos
].
append
(
_screenLines
[
currentPos
+
1
]);
_screenLines
.
remove
(
currentPos
+
1
);
...
...
@@ -417,9 +417,9 @@ void Screen::resizeImage(int new_lines, int new_columns)
auto
values
=
_screenLines
[
currentPos
].
mid
(
new_columns
);
_screenLines
[
currentPos
].
remove
(
new_columns
,
values
.
size
());
_lineProperties
[
currentPos
]
=
_lineProperties
[
currentPos
]
|
LINE_WRAPPED
;
_lineProperties
.
insert
(
currentPos
+
1
,
_lineProperties
[
currentPos
]
)
;
_screenLines
.
insert
(
currentPos
+
1
,
values
);
_lineProperties
.
insert
(
currentPos
+
1
,
LINE_
DEFAULT
)
;
_lineProperties
[
currentPos
]
|=
LINE_
WRAPPED
;
}
currentPos
+=
1
;
}
...
...
Write
Preview
Supports
Markdown
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