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);
|
r = Rect(0, 0, Scrollwid+ButtonBorder, font->height+1);
|
||||||
diff --git a/src/cmd/acme/text.c b/src/cmd/acme/text.c
|
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
|
--- a/src/cmd/acme/text.c
|
||||||
+++ b/src/cmd/acme/text.c
|
+++ b/src/cmd/acme/text.c
|
||||||
@@ -692,10 +692,16 @@ texttype(Text *t, Rune r)
|
@@ -692,10 +692,16 @@ texttype(Text *t, Rune r)
|
||||||
|
@ -172,13 +172,19 @@ index 09422dda..cecdd97b 100644
|
||||||
case Kins:
|
case Kins:
|
||||||
typecommit(t);
|
typecommit(t);
|
||||||
rp = textcomplete(t);
|
rp = textcomplete(t);
|
||||||
@@ -844,9 +857,9 @@ texttype(Text *t, Rune r)
|
@@ -844,9 +857,15 @@ texttype(Text *t, Rune r)
|
||||||
typecommit(t);
|
typecommit(t);
|
||||||
t->iq1 = t->q0;
|
t->iq1 = t->q0;
|
||||||
return;
|
return;
|
||||||
- case 0x08: /* ^H: erase character */
|
- case 0x08: /* ^H: erase character */
|
||||||
- case 0x15: /* ^U: erase line */
|
- case 0x15: /* ^U: erase line */
|
||||||
- case 0x17: /* ^W: erase word */
|
- 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 0x08: /* ^H: erase character */
|
||||||
+ case 0x15: /* ^U: erase line */
|
+ case 0x15: /* ^U: erase line */
|
||||||
+ case 0x17: /* ^W: erase word */
|
+ case 0x17: /* ^W: erase word */
|
||||||
|
|
2
acme.txt
2
acme.txt
|
@ -7,3 +7,5 @@ Changes to acme
|
||||||
- switched behavior of Home/End with ^A/^E
|
- switched behavior of Home/End with ^A/^E
|
||||||
- Ctrl+c, Ctrl+x, Ctrl+v now work as expected
|
- Ctrl+c, Ctrl+x, Ctrl+v now work as expected
|
||||||
- Ctrl+z for undo, Ctrl+y for redo
|
- Ctrl+z for undo, Ctrl+y for redo
|
||||||
|
- DELETE key
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user