From b370ca6876a274d289a27810337b41c90f7dbfba Mon Sep 17 00:00:00 2001 From: Bobbi Webber-Manners Date: Wed, 2 Sep 2020 20:48:36 -0400 Subject: [PATCH] EDIT: bug fix for new CA-Plus/CA-Minus bank switch commands --- apps/edit.c | 18 +++++++----------- apps/edithelp2.txt | 4 ++-- 2 files changed, 9 insertions(+), 13 deletions(-) diff --git a/apps/edit.c b/apps/edit.c index 08331c9..28dc451 100644 --- a/apps/edit.c +++ b/apps/edit.c @@ -1871,7 +1871,7 @@ void buffer_list(void) { revers(1); cprintf("Active Buffer List (Total number of buffers: %u)", banktbl[0]); revers(0); - gotoxy(0, ++row); + gotoxy(0, row += 2); cprintf(" Buf Size Mod Part Filename\r"); gotoxy(0, ++row); } @@ -2535,12 +2535,8 @@ int edit(char *fname) { help1: help(1); c = cgetc(); - switch (c) { - case ESC: - case 'q': - case 'Q': + if (c == ESC) goto donehelp; - } help(2); c = cgetc(); switch (c) { @@ -2637,14 +2633,14 @@ donehelp: change_aux_bank(tmp); startsel = endsel = 65535U; draw_screen(); - } else if (c == 0x0a) { // CA-Down - tmp = (l_auxbank - 1) % banktbl[0]; + } else if ((c == '-') || (c == '_')) { // CA-minus + tmp = (l_auxbank - 2) % banktbl[0] + 1; change_aux_bank(tmp); startsel = endsel = 65535U; draw_screen(); - } else if (c == 0x0b) { // CA-Up - tmp = (l_auxbank + 1) % banktbl[0]; - change_aux_bank(l_auxbank + 1); + } else if ((c == '+') || (c == '=')) { // CA-plus + tmp = l_auxbank % banktbl[0] + 1; + change_aux_bank(tmp); startsel = endsel = 65535U; draw_screen(); } else if ((c == 'E') || (c == 'e')) { // CA-E "Extend file" diff --git a/apps/edithelp2.txt b/apps/edithelp2.txt index 3ba24d4..b0d8ab0 100644 --- a/apps/edithelp2.txt +++ b/apps/edithelp2.txt @@ -8,8 +8,8 @@ buffers may be used in order to allow files larger than 46KB to be edited. -------------------------------------------------------------------------------- Buffer Management: - }-1 ... Quick jump to buffer 1 ... }-Up Next buffer - }-9 ... through buffer 9 }-Down Previous buffer + }-1 ... Quick jump to buffer 1 ... }-[+] Next buffer + }-9 ... through buffer 9 }-[-] Previous buffer }-B Select buffer by number }-L List active buffers }-T Truncate file here, freeing any subsequent buffers }-E Extend file by appending a new buffer