From 3542ed50ce271602297e961646a7394a676e9dc6 Mon Sep 17 00:00:00 2001 From: Kelvin Sherlock Date: Mon, 29 Jan 2018 21:22:08 -0500 Subject: [PATCH] fix scroll-right bug (PTSE) --- cpp/Screen.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpp/Screen.cpp b/cpp/Screen.cpp index 8116351..ffe3f79 100644 --- a/cpp/Screen.cpp +++ b/cpp/Screen.cpp @@ -321,7 +321,7 @@ void Screen::scrollRight(iRect rect, int n) { auto xIter = line.begin() + rect.minX(); auto xEnd = line.begin() + rect.maxX(); - auto iter = std::copy(xIter, xEnd-n, xEnd); + auto iter = std::copy_backward(xIter, xEnd-n, xEnd); while (n--) { --iter; *iter = char_info(); } }