// set scroll region (this will place the cursor in the top left)
std::cout << "\033[0;" << nr_rows - 1 << "r";
// restore cursor but ensure its inside the scrolling area
// set scroll region (this will place the cursor in the top left)
std::cout << "\033[0;" << nr_rows - 1 << "r";
// restore cursor but ensure its inside the scrolling area