ref: b5691cfd1c18c76bf7f168d18452339a967b4c33
parent: 67c8b3f622c3a939d7421ca1b95755f72e70030e
author: glenda <glenda@cirno>
date: Tue Apr 1 20:28:47 EDT 2025
adding normal delete key support
--- a/text.c
+++ b/text.c
@@ -715,6 +715,16 @@
case Kesc:
textsetselect(t, 0, t->file->nc);
return;
+ case Kdel: /* handle delete key */
+ typecommit(t);
+ if(t->q1 < t->file->nc){
+ if(t->q0 != t->q1){
+ cut(t, t, nil, TRUE, TRUE, nil, 0);
+ } else {
+ textdelete(t, t->q0, t->q0+1, TRUE);
+ }
+ }
+ return;
case Kleft:
typecommit(t);
if(t->q0 > 0)
--
⑨