st
simple terminal
git clone https://9o.is/git/st.git
commit dcf0a5bffab4b01d3846f24f16ea46e46b89b670 parent 703f6c6c842a7c5449dce3db6796f5d0c092ed7b Author: noname <noname@inventati.org> Date: Sun, 20 Apr 2014 17:26:39 +0400 Style fixes in tscrollup. Diffstat:
| M | st.c | | | 7 | ++++--- |
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/st.c b/st.c @@ -1414,15 +1414,16 @@ void tscrollup(int orig, int n) { int i; Line temp; + LIMIT(n, 0, term.bot-orig+1); tclearregion(0, orig, term.col-1, orig+n-1); tsetdirt(orig+n, term.bot); for(i = orig; i <= term.bot-n; i++) { - temp = term.line[i]; - term.line[i] = term.line[i+n]; - term.line[i+n] = temp; + temp = term.line[i]; + term.line[i] = term.line[i+n]; + term.line[i+n] = temp; } selscroll(orig, -n);