diff options
| -rw-r--r-- | TODO | 1 | ||||
| -rw-r--r-- | src/edbox.c | 8 |
2 files changed, 7 insertions, 2 deletions
@@ -12,7 +12,6 @@ FujiChat features, we're almost at parity! Other stuff: -- Make ctrl-insert toggle between insert and typeover mode (The_Doctor__). - Make control + 1 through 7 switch windows (same as Start), because the XEGS and 1200XL Start keys are hard to reach while typing (brad and MarkG). diff --git a/src/edbox.c b/src/edbox.c index d3b0b11..b7287e5 100644 --- a/src/edbox.c +++ b/src/edbox.c @@ -11,6 +11,7 @@ char *old_edbox[EDBOX_SIZE]; static u16 old_len; +static int typeover; int edbox_visible = 0; static u16 edbox_pos; /* range 0 to EDBOX_SIZE - 1 */ @@ -65,7 +66,9 @@ void edbox_putc(char c) { if(!c) return; /* no inserting nulls */ - memmove(edit_box + edbox_pos + 1, edit_box + edbox_pos, EDBOX_SIZE - edbox_pos - 1); + if(!typeover) + memmove(edit_box + edbox_pos + 1, edit_box + edbox_pos, EDBOX_SIZE - edbox_pos - 1); + edit_box[edbox_pos] = c; if(edbox_pos < EDBOX_SIZE - 1) { edbox_pos++; @@ -229,6 +232,9 @@ static void normal_keystroke(void) { case CH_TAB: comp_complete(); break; + case 0xff: /* ctrl-insert */ + typeover = !typeover; + break; default: edbox_putc(c); break; |
