Added EditDeleteSOL

This commit is contained in:
Alexander S. Aganichev 2001-08-31 14:14:27 +00:00
parent abdde902a2
commit c8504d1d43
5 changed files with 29 additions and 0 deletions

View File

@ -594,6 +594,7 @@ tglobalkey globalkeys[] = {
{ CRC_K_CDEL , Key_C_Del , 0 }, // 0x60BC
{ CRC_KK_AUTO , Key_Auto , 0 }, // 0x60E2
{ CRC_READFINDHEADER , KK_ReadFindHeader , KT_R }, // 0x6343
{ CRC_EDITDELETESOL , KK_EditDeleteSOL , KT_E }, // 0x63B4
{ CRC_K_PGUP , Key_PgUp , 0 }, // 0x63CC
{ CRC_HEADERTOGGLEFREQ , KK_HeaderToggleFreq , KT_H }, // 0x63D9
{ CRC_EDITABORT , KK_EditAbort , KT_E }, // 0x6468

View File

@ -76,6 +76,7 @@ const word CRC_EDITCUT = 0xFAE6;
const word CRC_EDITDELCHAR = 0xA3C7;
const word CRC_EDITDELETE = 0x4A37;
const word CRC_EDITDELETEEOL = 0x1143;
const word CRC_EDITDELETESOL = 0x63B4;
const word CRC_EDITDELLEFT = 0x6552;
const word CRC_EDITDELLINE = 0xACCF;
const word CRC_EDITDELLTWORD = 0x3B67;

View File

@ -1515,6 +1515,30 @@ void IEclass::DeleteEOL() {
}
// ------------------------------------------------------------------
void IEclass::DeleteSOL() {
GFTRK("EditDeleteSOL");
if(col == 0) {
GFTRK(NULL);
return;
}
int _oldcol = col;
col = 0;
Undo->PushItem(EDIT_UNDO_DEL_TEXT, currline, col, _oldcol);
currline->txt.erase(col, _oldcol);
wrapdel(&currline, &col, &row);
GFTRK(NULL);
}
// ------------------------------------------------------------------
void IEclass::deleteline(bool zapquotesbelow) {
@ -2122,6 +2146,7 @@ noselecting:
case KK_EditCopyAboveChar: CopyAboveChar(); break;
case KK_EditDelChar: DelChar(); break;
case KK_EditDeleteEOL: DeleteEOL(); break;
case KK_EditDeleteSOL: DeleteSOL(); break;
case KK_EditDelLeft: DelLeft(); break;
case KK_EditDelLine: DelLine(); break;
case KK_EditDelLtWord: DelLtWord(); break;

View File

@ -358,6 +358,7 @@ public:
void CopyAboveChar ();
void DelChar ();
void DeleteEOL ();
void DeleteSOL ();
void DelLeft ();
void DelLine ();
void DelLtWord ();

View File

@ -177,6 +177,7 @@ const gkey KK_EditBlockPgDn = 0xFF01;
const gkey KK_EditBlockPgUp = 0xFF02;
const gkey KK_EditDelete = 0xFF03;
const gkey KK_EditUndo = 0xFF04;
const gkey KK_EditDeleteSOL = 0xFF05;
const gkey KK_FileAbort = 0xFF10;
const gkey KK_FileAskExit = 0xFF11;