tlbuf: increase the number of lines after moving the old ones - neatvi - [fork]… | |
git clone git://src.adamsgaard.dk/neatvi | |
Log | |
Files | |
Refs | |
README | |
--- | |
commit d7772d9c05727a0892b134ed83bd2f834a039fa6 | |
parent 1aaf74068c7eee5e00a1743ee660fcb4576ddb30 | |
Author: Ali Gholami Rudi <[email protected]> | |
Date: Fri, 15 May 2015 08:38:22 +0430 | |
lbuf: increase the number of lines after moving the old ones | |
Diffstat: | |
M lbuf.c | 2 +- | |
1 file changed, 1 insertion(+), 1 deletion(-) | |
--- | |
diff --git a/lbuf.c b/lbuf.c | |
t@@ -57,9 +57,9 @@ static void lbuf_insertline(struct lbuf *lb, int pos, char *… | |
lb->ln = nln; | |
lb->ln_sz = nsz; | |
} | |
- lb->ln_n++; | |
memmove(lb->ln + pos + 1, lb->ln + pos, | |
(lb->ln_n - pos) * sizeof(lb->ln[0])); | |
+ lb->ln_n++; | |
lb->ln[pos] = s; | |
} | |