EDIT: Added OA-A 'Select All' function.

This commit is contained in:
Bobbi Webber-Manners 2020-08-17 11:43:51 -04:00
parent 7d07a861bb
commit 3c2f028dfe
2 changed files with 17 additions and 7 deletions

View File

@ -4,6 +4,8 @@
// Bobbi July-Aug 2020
/////////////////////////////////////////////////////////////////////////////
// TODO: Bug in displaying selection *after* cursor. Seems okay until full
// screen redraw.
// TODO: File picker!!
// TODO: Bug - cursor down at EOF succeeds when it should fail
// TODO: Search options - ignore case, complete word.
@ -2013,8 +2015,7 @@ int edit(char *fname) {
page_down();
break;
case 0x80 + ' ': // OA-SPACE start/end selection
tmp = (startsel == 65535U ? 0 : 1); // Prev selection active?
if (tmp) {
if (startsel != 65535U) { // Prev selection active?
endsel = gapbegin;
mode = SEL_NONE;
draw_screen();
@ -2024,6 +2025,14 @@ int edit(char *fname) {
update_status_line();
}
break;
case 0x80 + 'A': // OA-A "Select All"
case 0x80 + 'a': // OA-a
jump_pos(DATASIZE()); // WORKAROUND FOR SELECTION DISPLAY BUG
startsel = 0;
endsel = DATASIZE();
mode = SEL_NONE;
draw_screen();
break;
case 0x80 + 'X': // OA-X "Cut"
case 0x80 + 'x': // OA-x
case 0x18: // ^X "Cut"

View File

@ -13,11 +13,12 @@
{-9 through end of file +-----------------------------------------
--------------------------------------+ Block Commands:
File Management Commands: | {-[Space] Mark start/end of selection
{-I Insert file at cursor | {-X Cut selected text
{-O Open file | {-C Copy selected text
{-N Set file name to save | {-V Paste previous cut or copy
{-S Save file | [Delete] Delete selected text
{-Q Quit | ESC Clear selection
{-I Insert file at cursor | {-A Select all
{-O Open file | {-X Cut selected text
{-N Set file name to save | {-C Copy selected text
{-S Save file | {-V Paste previous cut or copy
{-Q Quit | [Delete] Delete selected text
| ESC Clear selection
--------------------------------------+-----------------------------------------
[Q]uit help | [Any Other Key] Next Page
--------------------------------------+----------------------------------------