sim

the sim text editor
git clone git://ssnf.xyz/sim
Log | Files | Refs | README

commit b99a9a2df22e9f27009816106e7261cd10583299
parent b59977b168ed18b1d21746fb0a23260e64225f67
Author: ssnf <ssnf@ssnf.xyz>
Date:   Mon, 26 Dec 2022 13:15:01 +0000

don't move to the right!!!!

sim would move the cursor to the right when adding a newline
if the last character of the file was not a newline...

What was I thinking?

Diffstat:
Msim.c | 4+---
1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/sim.c b/sim.c @@ -460,10 +460,8 @@ insert(int arg) { String s, c; - if (f->s->s[f->s->n - 1] != '\n') { + if (f->s->s[f->s->n - 1] != '\n') str_addc(f->s, '\n'); - move(Right); - } str_init(&s), str_init(&c); str_addc(&c, '\0'); switch (arg) {