delete key
This commit is contained in:
parent
f4be7cb739
commit
ff7c8efd36
10
acme.diff
10
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 */
|
||||
|
|
Loading…
Reference in New Issue
Block a user