EDIT: Del can now delete selection. Help can show closed apple char.

This commit is contained in:
Bobbi Webber-Manners 2020-08-10 17:15:39 -04:00
parent 8c2ea53a90
commit 9d0ee7d7ab

View File

@ -79,6 +79,9 @@ enum selmode mode;
// Mousetext Open-Apple // Mousetext Open-Apple
char openapple[] = "\x0f\x1b""A\x18\x0e"; char openapple[] = "\x0f\x1b""A\x18\x0e";
// Mousetext Closed-Apple
char closedapple[] = "\x0f\x1b""@\x18\x0e";
/* /*
* Return number of bytes of freespace in gapbuf * Return number of bytes of freespace in gapbuf
*/ */
@ -1382,8 +1385,10 @@ void help(void) {
cont = (s == IOSZ ? 1 : 0); cont = (s == IOSZ ? 1 : 0);
for (i = 0; i < s; ++i) { for (i = 0; i < s; ++i) {
c = p[i]; c = p[i];
if (c == '@') if (c == '{')
printf("%s", openapple); printf("%s", openapple);
if (c == '}')
printf("%s", closedapple);
else if ((c != '\r') && (c != '\n')) else if ((c != '\r') && (c != '\n'))
putchar(c); putchar(c);
} }
@ -1604,7 +1609,10 @@ uint8_t bank_log_to_phys(uint8_t l) {
*/ */
void init_aux_banks(void) { void init_aux_banks(void) {
uint8_t i; uint8_t i;
cprintf("%u 64KB aux banks -> %uKB\n", banktbl[0], banktbl[0]*64); revers(1);
cprintf("EDIT.SYSTEM Bobbi 2020");
revers(0);
cprintf("\n\n\n%u x 64KB aux banks -> %uKB\n", banktbl[0], banktbl[0]*64);
for (i = 1; i < banktbl[0]; ++i) { for (i = 1; i < banktbl[0]; ++i) {
auxbank = bank_log_to_phys(i); auxbank = bank_log_to_phys(i);
// Saves filename[], gapbegin, gapend and modified (85 bytes) // Saves filename[], gapbegin, gapend and modified (85 bytes)
@ -1956,6 +1964,23 @@ int edit(char *fname) {
delete_char(); delete_char();
update_after_delete_char(); update_after_delete_char();
set_modified(1); set_modified(1);
} else if (mode == SEL_SEL) {
tmp = (startsel == 65535U ? 0 : 1); // Selection active?
if (!tmp) {
beep();
break;
}
sprintf(userentry, "Delete selection (%d chars)", abs(endsel - startsel));
if (prompt_okay(userentry) != 0)
break;
order_selection();
mode = SEL_NONE;
jump_pos(startsel);
gapend += (endsel - startsel);
set_modified(1);
startsel = endsel = 65535U;
draw_screen();
break;
} }
break; break;
case 0x09: // Tab case 0x09: // Tab