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

Prevent _replModeStart line number from becoming negative

Hopefully, this solves:
BUG: 457920
BUG: 458015
parent a69656aa
Pipeline #222726 passed with stage
in 3 minutes and 50 seconds
......@@ -1143,8 +1143,10 @@ void Screen::scrollUp(int from, int n)
scrollPlacements(n);
}
if (_replMode != REPL_None) {
_replModeStart = std::make_pair(_replModeStart.first - 1, _replModeStart.second);
_replModeEnd = std::make_pair(_replModeEnd.first - 1, _replModeEnd.second);
if (_replModeStart.first > 0) {
_replModeStart = std::make_pair(_replModeStart.first - 1, _replModeStart.second);
_replModeEnd = std::make_pair(_replModeEnd.first - 1, _replModeEnd.second);
}
if (_replLastOutputStart.first > -1) {
_replLastOutputStart = std::make_pair(_replLastOutputStart.first - 1, _replLastOutputStart.second);
_replLastOutputEnd = std::make_pair(_replLastOutputEnd.first - 1, _replLastOutputEnd.second);
......
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