diff --git a/golded3/gckeys.cpp b/golded3/gckeys.cpp index 2ee7dfb..3635063 100644 --- a/golded3/gckeys.cpp +++ b/golded3/gckeys.cpp @@ -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 diff --git a/golded3/gckeys.h b/golded3/gckeys.h index ea64b74..cd71bf5 100644 --- a/golded3/gckeys.h +++ b/golded3/gckeys.h @@ -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; diff --git a/golded3/geedit.cpp b/golded3/geedit.cpp index 3290940..744298d 100644 --- a/golded3/geedit.cpp +++ b/golded3/geedit.cpp @@ -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; diff --git a/golded3/geedit.h b/golded3/geedit.h index 49778d6..a0dedf4 100644 --- a/golded3/geedit.h +++ b/golded3/geedit.h @@ -358,6 +358,7 @@ public: void CopyAboveChar (); void DelChar (); void DeleteEOL (); + void DeleteSOL (); void DelLeft (); void DelLine (); void DelLtWord (); diff --git a/golded3/gekeys.h b/golded3/gekeys.h index 570d522..b708e50 100644 --- a/golded3/gekeys.h +++ b/golded3/gekeys.h @@ -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;