From 6616def8739f746ac247c65723452b8cf0b6d7a8 Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Wed, 1 Apr 2026 03:25:36 -0400 Subject: Rewrite backspace() in asm. 5363 bytes free. --- doc/ideas.txt | 4 ++++ src/edbox.c | 12 ++---------- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/doc/ideas.txt b/doc/ideas.txt index b9c9627..15d44dc 100644 --- a/doc/ideas.txt +++ b/doc/ideas.txt @@ -2,6 +2,10 @@ These are not really TODOs, they're "might do" or "hope to do". Features that should be implemented: +- /r to reply to the last person/channel who msg'd you, /a to msg the + last person/channel you msg'ed (server and private screens). Idea + comes from phigan (thanks!) + - Support for (some of) the extra RAM in 64K machines. Can get an extra 4K because we don't need the international font or the floating point routines, and we can plop our custom font directly diff --git a/src/edbox.c b/src/edbox.c index 39b142b..821955d 100644 --- a/src/edbox.c +++ b/src/edbox.c @@ -14,6 +14,7 @@ void show_cursor(void); void storechr(char c); void copy_to_old(void); void restore_old(void); +void backspace(void); char old_edbox[EDBOX_SIZE]; char old_len; @@ -87,7 +88,7 @@ void edbox_putc(char c) { } -static void del_char(void) { +void del_char(void) { if(!edbox_len) return; memmove(edit_box + edbox_pos, edit_box + edbox_pos + 1, EDBOX_MAXPOS - edbox_pos); edbox_len--; @@ -98,15 +99,6 @@ static void del_to_end(void) { del_char(); } -static void backspace(void) { - if(!edbox_pos) return; - edbox_pos--; - if(typeover) - edit_box[edbox_pos] = ' '; - else - del_char(); -} - static void up(void) { if(!edbox_len) { restore_old(); -- cgit v1.2.3