Commit f1cd6111 authored by Matan Ziv-Av's avatar Matan Ziv-Av Committed by Kurt Hindenburg
Browse files

Track command count in line property

To remember which command each line in the terminal belongs to.
parent 7ff0d2ba
......@@ -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);
......
......@@ -843,6 +843,7 @@ private:
std::pair<int, int> _replModeEnd;
std::pair<int, int> _replLastOutputStart;
std::pair<int, int> _replLastOutputEnd;
int commandCounter = 0;
// ----------------------------
......
Supports Markdown
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