Skip to content
GitLab
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
f1cd6111
Commit
f1cd6111
authored
Oct 04, 2022
by
Matan Ziv-Av
Committed by
Kurt Hindenburg
Oct 21, 2022
Browse files
Track command count in line property
To remember which command each line in the terminal belongs to.
parent
7ff0d2ba
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/Screen.cpp
View file @
f1cd6111
...
...
@@ -1047,6 +1047,7 @@ void Screen::newLine()
}
index
();
_lineProperties
[
_cuY
].
counter
=
commandCounter
;
}
void
Screen
::
checkSelection
(
int
from
,
int
to
)
...
...
@@ -2331,6 +2332,8 @@ void Screen::setReplMode(int mode)
if
(
_replMode
==
REPL_OUTPUT
)
{
_replLastOutputStart
=
_replModeStart
;
_replLastOutputEnd
=
_replModeEnd
;
}
else
if
(
_replMode
==
REPL_PROMPT
)
{
_lineProperties
[
_cuY
].
counter
=
++
commandCounter
;
}
_replMode
=
mode
;
_replModeStart
=
std
::
make_pair
(
_cuY
,
_cuX
);
...
...
src/Screen.h
View file @
f1cd6111
...
...
@@ -843,6 +843,7 @@ private:
std
::
pair
<
int
,
int
>
_replModeEnd
;
std
::
pair
<
int
,
int
>
_replLastOutputStart
;
std
::
pair
<
int
,
int
>
_replLastOutputEnd
;
int
commandCounter
=
0
;
// ----------------------------
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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