Introduction
Introduction Statistics Contact Development Disclaimer Help
tRemove 'slide' variable in tresize. - st - [fork] customized build of st, the …
git clone git://src.adamsgaard.dk/st
Log
Files
Refs
README
LICENSE
---
commit c569e3146e6999f6a02acecd145929c87e15b528
parent 39ae1a4de5c471c8626c80ef1e961f0c83f5199d
Author: [email protected] <[email protected]>
Date: Sat, 11 Apr 2015 19:30:36 +0200
Remove 'slide' variable in tresize.
Diffstat:
M st.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
---
diff --git a/st.c b/st.c
t@@ -2769,7 +2769,6 @@ tresize(int col, int row) {
int i;
int minrow = MIN(row, term.row);
int mincol = MIN(col, term.col);
- int slide = term.c.y - row + 1;
bool *bp;
TCursor c;
t@@ -2784,13 +2783,13 @@ tresize(int col, int row) {
* tscrollup would work here, but we can optimize to
* memmove because we're freeing the earlier lines
*/
- for(i = 0; i < slide; i++) {
+ for(i = 0; i <= term.c.y - row; i++) {
free(term.line[i]);
free(term.alt[i]);
}
- if(slide > 0) {
- memmove(term.line, term.line + slide, row * sizeof(Line));
- memmove(term.alt, term.alt + slide, row * sizeof(Line));
+ if(i > 0) {
+ memmove(term.line, term.line + i, row * sizeof(Line));
+ memmove(term.alt, term.alt + i, row * sizeof(Line));
}
for(i += row; i < term.row; i++) {
free(term.line[i]);
You are viewing proxied material from mx1.adamsgaard.dk. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.