mirror of
https://github.com/bobbimanners/emailler.git
synced 2025-08-09 05:24:58 +00:00
EDIT: Modifield selection delete logic so OA-A, [Del] deletes whole buffer
This commit is contained in:
18
apps/edit.c
18
apps/edit.c
@@ -5,7 +5,8 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
// TODO: File picker!!
|
// TODO: File picker!!
|
||||||
// TODO: Bug - cursor down at EOF succeeds when it should fail
|
// TODO: Bug - cursor down at EOF succeeds when it should fail. Seems to happen
|
||||||
|
// after one inserts a CR at EOF.
|
||||||
// TODO: Search options - ignore case, complete word.
|
// TODO: Search options - ignore case, complete word.
|
||||||
|
|
||||||
// Note: Use my fork of cc65 to get a flashing cursor!!
|
// Note: Use my fork of cc65 to get a flashing cursor!!
|
||||||
@@ -2223,16 +2224,13 @@ donehelp:
|
|||||||
draw_screen();
|
draw_screen();
|
||||||
break;
|
break;
|
||||||
case DELETE: // DEL "BACKSPACE"
|
case DELETE: // DEL "BACKSPACE"
|
||||||
if (mode == SEL_NONE) {
|
if (startsel == 65535U) { // No selection
|
||||||
delete_char();
|
if (mode == SEL_NONE) {
|
||||||
update_after_delete_char();
|
delete_char();
|
||||||
set_modified(1);
|
update_after_delete_char();
|
||||||
} else if (mode == SEL_SELECT) {
|
set_modified(1);
|
||||||
tmp = (startsel == 65535U ? 0 : 1); // Selection active?
|
|
||||||
if (!tmp) {
|
|
||||||
beep();
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
snprintf(userentry, 80,
|
snprintf(userentry, 80,
|
||||||
"Delete selection (%d chars)", abs(endsel - startsel));
|
"Delete selection (%d chars)", abs(endsel - startsel));
|
||||||
if (prompt_okay(userentry) != 0)
|
if (prompt_okay(userentry) != 0)
|
||||||
|
Reference in New Issue
Block a user