diff --git a/acme.diff b/acme.diff index 718e867..587b1de 100644 --- a/acme.diff +++ b/acme.diff @@ -48,7 +48,7 @@ index e5658a4e..2c79b387 100644 r = Rect(0, 0, Scrollwid+ButtonBorder, font->height+1); diff --git a/src/cmd/acme/text.c b/src/cmd/acme/text.c -index 09422dda..cecdd97b 100644 +index 09422dda..81e5eb36 100644 --- a/src/cmd/acme/text.c +++ b/src/cmd/acme/text.c @@ -692,10 +692,16 @@ texttype(Text *t, Rune r) @@ -172,13 +172,19 @@ index 09422dda..cecdd97b 100644 case Kins: typecommit(t); rp = textcomplete(t); -@@ -844,9 +857,9 @@ texttype(Text *t, Rune r) +@@ -844,9 +857,15 @@ texttype(Text *t, Rune r) typecommit(t); t->iq1 = t->q0; return; - case 0x08: /* ^H: erase character */ - case 0x15: /* ^U: erase line */ - case 0x17: /* ^W: erase word */ ++ case 0x7F: /* DEL: erase character in front */ ++ if (t->q0>=t->file->b.nc) ++ return; ++ if (t->q0 == t->q1) ++ textshow(t, t->q0+1, t->q0+1,TRUE); ++ r = 0x08; + case 0x08: /* ^H: erase character */ + case 0x15: /* ^U: erase line */ + case 0x17: /* ^W: erase word */ diff --git a/acme.txt b/acme.txt index b94ec92..962b9c1 100644 --- a/acme.txt +++ b/acme.txt @@ -7,3 +7,5 @@ Changes to acme - switched behavior of Home/End with ^A/^E - Ctrl+c, Ctrl+x, Ctrl+v now work as expected - Ctrl+z for undo, Ctrl+y for redo + - DELETE key +