be

based editor
git clone git://git.kocotian.pl/be.git
Log | Files | Refs | README | LICENSE

commit a81c2863bc8fd14fd6c0cfd53a88d2fba9e6cf74
parent 4a1ab6695ab83de53fd0910dbeedfc474f175a73
Author: kocotian <kocotian@kocotian.pl>
Date:   Mon, 19 Apr 2021 08:55:17 +0200

Removing char and opening line fixes

Diffstat:
Mbe.c | 8++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/be.c b/be.c @@ -560,10 +560,10 @@ removechar(const Arg *arg) { (void)arg; if (CURBUF(editor).x <= 0) return; - --(CURBUF(editor).rows.data[CURBUF(editor).y].len); memmove(CURBUF(editor).rows.data[CURBUF(editor).y].data + CURBUF(editor).x - 1, CURBUF(editor).rows.data[CURBUF(editor).y].data + CURBUF(editor).x, - CURBUF(editor).rows.data[CURBUF(editor).y].len - (unsigned)CURBUF(editor).x + 1); + CURBUF(editor).rows.data[CURBUF(editor).y].len - (unsigned)CURBUF(editor).x); + --(CURBUF(editor).rows.data[CURBUF(editor).y].len); --CURBUF(editor).x; } @@ -580,8 +580,8 @@ openline(const Arg *arg) if (arg->i != 1) ++CURBUF(editor).y; CURBUF(editor).rows.data[CURBUF(editor).y].data = malloc(CURBUF(editor).rows.data[CURBUF(editor).y].len = - (CURBUF(editor).rows.data[CURBUF(editor).y - 1].len - - (unsigned)CURBUF(editor).x)); + (unsigned)((signed)CURBUF(editor).rows.data[CURBUF(editor).y - 1].len - + CURBUF(editor).x)); if (arg->i == 2) { memmove(CURBUF(editor).rows.data[CURBUF(editor).y].data, CURBUF(editor).rows.data[CURBUF(editor).y - 1].data + CURBUF(editor).x,