New key codes to stylecode selection

This commit is contained in:
Stas Degteff 2005-09-27 18:30:31 +00:00
parent cdcef282fc
commit b47bb3f0cd
10 changed files with 231 additions and 92 deletions

View File

@ -764,16 +764,26 @@ Here is a small "ruler" for the actual definitions below:
Ins Toggle insert mode Ins Toggle insert mode
Del Delete character at the cursor position Del Delete character at the cursor position
BackSpace Delete character to the left of the cursor BackSpace Delete character to the left of the cursor
Tab Add spaces to the next tab-stop Alt-BackSpace Undo step-by-step
Tab Insert spaces to the next tab-stop
Alt-K, Alt-Y Delete from cursor position to end of line Alt-K, Alt-Y Delete from cursor position to end of line
C-BckSp C-F5 Delete the word to the left of the cursor C-BckSp C-F5 Delete the word to the left of the cursor
Ctrl-T,Ctrl-F6 Delete the word to the right of the cursor Ctrl-T,Ctrl-F6 Delete the word to the right of the cursor
Alt-Z Remove quoted lines from cursor position to bottom.
F4 Duplicates the current line F4 Duplicates the current line
Alt-D, Ctrl-Y Delete the current line. (Move to Killbuffer) Alt-D, Ctrl-Y Delete the current line. (Move to Killbuffer)
Ctrl-U Undelete previously deleted lines Ctrl-U Undelete previously deleted lines
Alt-F5 Clear Killbuffer.
Alt-T Insert the string "[...skipped...]" into cursor position.
Alt-1 Change cursor character to uppercase Alt-1 Change cursor character to uppercase
Alt-2 Change cursor character to lowercase Alt-2 Change cursor character to lowercase
Alt-3 Toggle case of the cursor character Alt-3 Toggle case of the cursor character
Alt-B Remove left trailing spaces for current line
Ctrl-N Set stylecode to normal font face
Ctrl-B Set stylecode to bold font face
Ctrl-I Set stylecode to italic font face
Ctrl-L Set stylecode to underline font face
Ctrl-R Set stylecode to inverce font face
*P *P
Internal Editor Block commands: Internal Editor Block commands:

View File

@ -1281,21 +1281,23 @@ H
Del “¤ «¥­¨¥ ᨬ¢®«  ­  ¯®§¨æ¨¨ ªãpá®p  Del “¤ «¥­¨¥ ᨬ¢®«  ­  ¯®§¨æ¨¨ ªãpá®p 
BackSpace “¤ «¥­¨¥ ᨬ¢®«  á«¥¢  ®â ¯®§¨æ¨¨ ªãpá®p  BackSpace “¤ «¥­¨¥ ᨬ¢®«  á«¥¢  ®â ¯®§¨æ¨¨ ªãpá®p 
Alt-BackSpace <20>®á«¥¤®¢ â¥«ì­ ï ®â¬¥­  ᤥ« ­­ëå ¨§¬¥­¥­¨© Alt-BackSpace <20>®á«¥¤®¢ â¥«ì­ ï ®â¬¥­  ᤥ« ­­ëå ¨§¬¥­¥­¨©
Tab <20>ст ЂЈть ЏрЎЁЅЋы ЄЎ сЋЅЄующЅЉ ЏЎЇЈцЈЈ т ЁуЋяцЈЈ
Alt-K, Alt-Y “¤ «¥­¨¥ ⥪áâ  ®â ªãpá®p  ¨ ¤® ª®­æ  áâp®ª¨ Alt-K, Alt-Y “¤ «¥­¨¥ ⥪áâ  ®â ªãpá®p  ¨ ¤® ª®­æ  áâp®ª¨
Ctrl-K “¤ «¥­¨¥ ⥪áâ  ®â ªãpá®p  ª ­ ç «ã áâp®ª¨ Ctrl-K “¤ «¥­¨¥ ⥪áâ  ®â ªãpá®p  ª ­ ç «ã áâp®ª¨
Ct-F5, C-BaSp “¤ «¥­¨¥ ل«®¢  ل«¥¢  ®â ھمpل®p  C-F5, C-BckSp <20>Є ЋЅ­ЈЅ сЋЎЂ  сЋЅЂ  Ўт ЊуpсЎp 
Ctrl-F6 “¤ «¥­¨¥ ل«®¢  ل¯p ¢  ®â ھمpل®p  Ctrl-F6,Ctrl-T <20>Є ЋЅ­ЈЅ сЋЎЂ  сЏp Ђ  Ўт ЊуpсЎp 
Alt-Z “¤ «¥­¨¥ áâp®ª æ¨â¨p®¢ ­¨ï ®â ªãpá®p  ¨ ­¨¦¥ Alt-Z “¤ «¥­¨¥ áâp®ª æ¨â¨p®¢ ­¨ï ®â ªãpá®p  ¨ ­¨¦¥
F4 “¤¢ ¨¢ ­¨¥ áâp®ª¨ F4 “¤¢ ¨¢ ­¨¥ áâp®ª¨
Ctrl-Y “¤ «¥­¨¥ â¥ھم饩 لâp®ھ¨ ¢ ،من¥p ¢p¥¬¥­. هp ­¥­¨ï p¥¤ ھâ®p  Ctrl-Y, Alt-D <20>Є ЋЅ­ЈЅ тЅЊущЅЉ стpЎЊЈ Ђ ЁуфЅp ЂpЅЌ. хp ­Ѕ­Јя pЅЄ ЊтЎp 
Ctrl-U ‚لâ ¢ھ  لâp®ھ¨ ¨§ ،من¥p  ¢p¥¬¥­­®£® هp ­¥­¨ï p¥¤ ھâ®p  Ctrl-U <EFBFBD>ст ЂЊ  ЎчЅрЅЄ­ЎЉ стpЎЊЈ ЈЇ ЁуфЅp  ЂpЅЌ. хp ­Ѕ­Јя pЅЄ ЊтЎp 
Alt-F5 Žç¨á⪠ ¡ãä¥p  ¢p¥¬¥­­®£® åp ­¥­¨ï p¥¤ ªâ®p  Alt-F5 Žç¨á⪠ ¡ãä¥p  ¢p¥¬¥­­®£® åp ­¥­¨ï p¥¤ ªâ®p 
Ctrl-T ‚لâ ¢ھ  نp §ë [...skipped...] Alt-T <20>ст ЂЊ  фp Їы [...skipped...]
Alt-1 ‘¬¥­  ᨬ¢®«  ¯®¤ ªãpá®p®¬ ¢ ¢¥på­¨© p¥£¨áâp Alt-1 ‘¬¥­  ᨬ¢®«  ¯®¤ ªãpá®p®¬ ¢ ¢¥på­¨© p¥£¨áâp
Alt-2 ‘¬¥­  ᨬ¢®«  ¯®¤ ªãpá®p®¬ ¢ ­¨¦­¨© p¥£¨áâp Alt-2 ‘¬¥­  ᨬ¢®«  ¯®¤ ªãpá®p®¬ ¢ ­¨¦­¨© p¥£¨áâp
Alt-3 <20>¥p¥ª«î祭¨¥ p¥£¨áâp  ᨬ¢®«  Alt-3 <20>¥p¥ª«î祭¨¥ p¥£¨áâp  ᨬ¢®« 
Alt-B ‘¬¥áâ¨âì ⥪áâ ⥪ã饩 áâp®ª¨ ¢ ­ ç «® áâp®ª¨ Alt-B ‘¬¥áâ¨âì ⥪áâ ⥪ã饩 áâp®ª¨ ¢ ­ ç «® áâp®ª¨
Ctrl-"¬¨­ãá" <20>®á¨¬¢®«ì­®¥ ª®¯¨p®¢ ­¨¥ ⥪áâ  ¨§ ¯p¥¤ë¤ã饩 áâp®ª¨ Ctrl-"¬¨­ãá" <20>®á¨¬¢®«ì­®¥ ª®¯¨p®¢ ­¨¥ ⥪áâ  ¨§ ¯p¥¤ë¤ã饩 áâp®ª¨
*P *P
Š®¬ ­¤ë p ¡®âë á ¡«®ª ¬¨: Š®¬ ­¤ë p ¡®âë á ¡«®ª ¬¨:

View File

@ -175,27 +175,33 @@ F3 EDITimporttext
F8 EDITloadfile F8 EDITloadfile
@L EDITlookupcursor @L EDITlookupcursor
#F10 EDITlookupdest #F10 EDITlookupdest
F10 EDITlookuporig F10 EDITlookuporig ; Lokup originate address in the nodelist
Enter EDITnewline Enter EDITnewline ; Start new line (insert a newline char)
@P EDITpaste @P EDITpaste ; Paste text from clipboard
#Ins EDITpaste #Ins EDITpaste
^Q EDITquitnow ^Q EDITquitnow
@B EDITreflow @B EDITreflow
F7 EDITsavefile F7 EDITsavefile ; Save a message to text file, send to
@S EDITsavemsg ; printer or put into clipboard.
^Z EDITsavemsg @S EDITsavemsg ; Save a message to messagebase.
F2 EDITsavemsg ^Z EDITsavemsg ; Save a message to messagebase.
F2 EDITsavemsg ; Save a message to messagebase.
; EDITsoundkill ; EDITsoundkill
F9 EDITspellcheck F9 EDITspellcheck
Tab EDITtab Tab EDITtab ; Insert a "horisontal tab" char
#Tab EDITtabreverse #Tab EDITtabreverse
@3 EDITtogglecase @3 EDITtogglecase ; Toggle case of the char
Ins EDITtoggleinsert Ins EDITtoggleinsert ; Toggle insert/replace editing mode
@2 EDITtolower @2 EDITtolower ; Change char to lower case
@1 EDITtoupper @1 EDITtoupper ; Change char to upper case
^U EDITundelete ^U EDITundelete
@BackSpace EDITundo @BackSpace EDITundo
@Z EDITzapquotebelow @Z EDITzapquotebelow
^N EditSCodeNormal ; Set stylecode to normal font face
^B EditSCodeBold ; Set stylecode to bold font face
^I EditSCodeItalic ; Set stylecode to italic font face
^L EditSCodeUnderline ; Set stylecode to underline font face
^R EditSCodeReverse ; Set stylecode to inverce font face
; ------------------------------------------------------------------ ; ------------------------------------------------------------------
@ -542,4 +548,7 @@ F10 HEADERaddressbook
;F11 EDITmacro ":-)" ;F11 EDITmacro ":-)"
;^F11 EDITmacro ":-(" ;^F11 EDITmacro ":-("
; Insert string "[...skipped...]"
@T EditMacro "[...skipped...]"
; ------------------------------------------------------------------ ; ------------------------------------------------------------------

View File

@ -88,7 +88,7 @@ BackSpace EditDelLeft
^F5 EditDelLtWord ; “¤ «¥­¨¥ á«®¢  á«¥¢  ®â ªãàá®à . ^F5 EditDelLtWord ; “¤ «¥­¨¥ á«®¢  á«¥¢  ®â ªãàá®à .
^BackSpace EditDelLtWord ; “¤ «¥­¨¥ á«®¢  á«¥¢  ®â ªãàá®à . ^BackSpace EditDelLtWord ; “¤ «¥­¨¥ á«®¢  á«¥¢  ®â ªãàá®à .
^F6 EditDelRtWord ; “¤ «¥­¨¥ á«®¢  á¯à ¢  ®â ªãàá®à . ^F6 EditDelRtWord ; “¤ «¥­¨¥ á«®¢  á¯à ¢  ®â ªãàá®à .
;^T EditDelRtWord ; <20>λ«® -> “¤ «¥­¨¥ α«®Ά  α―ΰ Ά  ®β <20>γΰα®ΰ ; <20>®¬γ ¨­β¥p¥α­®: ᥩη α ―¥p¥®―p¥¤¥«¥­® ­  ¬ <C2AC>α ¤«ο Άαβ Ά<C2A0>¨ δp §λ [...skipped...]! ^T EditDelRtWord ; “¤ «¥­¨¥ á«®¢  á¯à ¢  ®â ªãàá®à 
@O EditDosShell @O EditDosShell
F4 EditDupLine F4 EditDupLine
@W EditExportText @W EditExportText
@ -147,6 +147,11 @@ Ins EditToggleInsert
#Right EditBlockRight #Right EditBlockRight
@0 EditSoundKill ; <20>४à â¨âì ¢®á¯à®¨§¢¥¤¥­¨¥ §¢ãª®¢®£® ä ©« . @0 EditSoundKill ; <20>४à â¨âì ¢®á¯à®¨§¢¥¤¥­¨¥ §¢ãª®¢®£® ä ©« .
@N EditExitMsg ; H¥¬¥¤«¥­­®¥ ¯p¥ªp é¥­¨¥ p¥¤ ªâ¨p®¢ ­¨ï ¡¥§ á®åp ­¥­¨ï @N EditExitMsg ; H¥¬¥¤«¥­­®¥ ¯p¥ªp é¥­¨¥ p¥¤ ªâ¨p®¢ ­¨ï ¡¥§ á®åp ­¥­¨ï
^N EditSCodeNormal ; ‚ë¡à âì ०¨¬ ¯à®á⮣® èà¨äâ 
^B EditSCodeBold ; ‚ë¡à âì ०¨¬ ¦¨à­®£® èà¨äâ 
^I EditSCodeItalic ; ‚ë¡à âì ०¨¬ ªãàᨢ 
^L EditSCodeUnderline ; ‚ë¡à âì ०¨¬ ¯®¤ç¥àª­ã⮣® èà¨äâ 
^R EditSCodeReverse ; ‚ë¡à âì ०¨¬ ¨­¢¥àâ¨à®¢ ­­®£® èà¨äâ 
; ------------------------------------------------------------------ ; ------------------------------------------------------------------
; Š<>Œ€H„ <E2809A><E280BA><EFBFBD>€ ”€‰<E280B0> ; Š<>Œ€H„ <E2809A><E280BA><EFBFBD>€ ”€‰<E280B0>

View File

@ -10,6 +10,13 @@ ______________________________________________________________________
Notes for GoldED+ 1.1.5, /snapshot/ Notes for GoldED+ 1.1.5, /snapshot/
______________________________________________________________________ ______________________________________________________________________
+ New internal editor keys to stylecode insertions:
^N EditSCodeNormal
^B EditSCodeBold (*bold*)
^I EditSCodeItalic (/italic/)
^L EditSCodeUnderline (_underline_)
^R EditSCodeReverse (#reverse#)
(Patch from Ianos Gnatiuc 2:5030/830.17)
+ New config file token: AKAMatchManually (yes/no). If set to "yes" then manual + New config file token: AKAMatchManually (yes/no). If set to "yes" then manual
selection of the AKA is forced. selection of the AKA is forced.

View File

@ -141,6 +141,11 @@ CmdKey DefaultKeyset[] = {
{ Key_S_Lft , KK_EditBlockLeft , KT_E }, { Key_S_Lft , KK_EditBlockLeft , KT_E },
{ Key_S_Rgt , KK_EditBlockRight , KT_E }, { Key_S_Rgt , KK_EditBlockRight , KT_E },
#endif #endif
{ Key_C_N , KK_EditSCodeNormal , KT_E },
{ Key_C_B , KK_EditSCodeBold , KT_E },
{ Key_C_I , KK_EditSCodeItalic , KT_E },
{ Key_C_L , KK_EditSCodeUnderline , KT_E },
{ Key_C_R , KK_EditSCodeReverse , KT_E },
{ Key_Esc , KK_FileAbort , KT_F }, { Key_Esc , KK_FileAbort , KT_F },
{ Key_A_X , KK_FileAskExit , KT_F }, { Key_A_X , KK_FileAskExit , KT_F },
@ -521,6 +526,7 @@ tglobalkey globalkeys[] = {
{ CRC_HEADERTOGGLELOCAL , KK_HeaderToggleLocal , KT_H }, // 0x47A1 { CRC_HEADERTOGGLELOCAL , KK_HeaderToggleLocal , KT_H }, // 0x47A1
{ CRC_ADDRESSBOOKQUIT , KK_AddressbookQuit , KT_B }, // 0x47C7 { CRC_ADDRESSBOOKQUIT , KK_AddressbookQuit , KT_B }, // 0x47C7
{ CRC_READCHANGEATTRS , KK_ReadChangeAttrs , KT_R }, // 0x47F8 { CRC_READCHANGEATTRS , KK_ReadChangeAttrs , KT_R }, // 0x47F8
{ CRC_EDITSCODEITALIC , KK_EditSCodeItalic , KT_E }, // 0x487F
{ CRC_READSEARCH , KK_ReadSearch , KT_R }, // 0x48EF { CRC_READSEARCH , KK_ReadSearch , KT_R }, // 0x48EF
{ CRC_READMSGPGDN , KK_ReadMsgPgDn , KT_R }, // 0x4908 { CRC_READMSGPGDN , KK_ReadMsgPgDn , KT_R }, // 0x4908
{ CRC_READSTRIPHTML , KK_ReadStripHTML , KT_R }, // 0x499A { CRC_READSTRIPHTML , KK_ReadStripHTML , KT_R }, // 0x499A
@ -615,6 +621,7 @@ tglobalkey globalkeys[] = {
{ CRC_HEADERLOOKUP , KK_HeaderLookup , KT_H }, // 0x64F2 { CRC_HEADERLOOKUP , KK_HeaderLookup , KT_H }, // 0x64F2
{ CRC_AREAGOTOPREV , KK_AreaGotoPrev , KT_A }, // 0x6534 { CRC_AREAGOTOPREV , KK_AreaGotoPrev , KT_A }, // 0x6534
{ CRC_EDITDELLEFT , KK_EditDelLeft , KT_E }, // 0x6552 { CRC_EDITDELLEFT , KK_EditDelLeft , KT_E }, // 0x6552
{ CRC_EDITSCODEBOLD , KK_EditSCodeBold , KT_E }, // 0x657D
{ CRC_EDITSAVEMSG , KK_EditSaveMsg , KT_E }, // 0x660C { CRC_EDITSAVEMSG , KK_EditSaveMsg , KT_E }, // 0x660C
{ CRC_K_CGMUL , Key_C_StrG , 0 }, // 0x66CA { CRC_K_CGMUL , Key_C_StrG , 0 }, // 0x66CA
{ CRC_NODESELECT , KK_NodeSelect , KT_N }, // 0x6A64 { CRC_NODESELECT , KK_NodeSelect , KT_N }, // 0x6A64
@ -736,6 +743,7 @@ tglobalkey globalkeys[] = {
#if !defined(__UNIX__) || defined(__USE_NCURSES__) #if !defined(__UNIX__) || defined(__USE_NCURSES__)
{ CRC_K_SHOME , Key_S_Home , 0 }, // 0xAF9D { CRC_K_SHOME , Key_S_Home , 0 }, // 0xAF9D
#endif #endif
{ CRC_EDITSCODEUNDERLINE , KK_EditSCodeUnderline , KT_E }, // 0xB1D9
{ CRC_READTOGGLEQUOTE , KK_ReadToggleQuote , KT_R }, // 0xB293 { CRC_READTOGGLEQUOTE , KK_ReadToggleQuote , KT_R }, // 0xB293
{ CRC_EDITUNDO , KK_EditUndo , KT_E }, // 0xB295 { CRC_EDITUNDO , KK_EditUndo , KT_E }, // 0xB295
{ CRC_READDIRQUOTEMSG , KK_ReadDirQuoteMsg , KT_R }, // 0xB351 { CRC_READDIRQUOTEMSG , KK_ReadDirQuoteMsg , KT_R }, // 0xB351
@ -808,6 +816,7 @@ tglobalkey globalkeys[] = {
{ CRC_EDITSPELLCHECK , KK_EditSpellCheck , KT_E }, // 0xE167 { CRC_EDITSPELLCHECK , KK_EditSpellCheck , KT_E }, // 0xE167
{ CRC_AREASCAN , KK_AreaScan , KT_A }, // 0xE440 { CRC_AREASCAN , KK_AreaScan , KT_A }, // 0xE440
{ CRC_EDITGOWORDLEFT , KK_EditGoWordLeft , KT_E }, // 0xE48C { CRC_EDITGOWORDLEFT , KK_EditGoWordLeft , KT_E }, // 0xE48C
{ CRC_EDITSCODENORMAL , KK_EditSCodeNormal , KT_E }, // 0xE4CE
{ CRC_READMOVECOMMENTMSG , KK_ReadMoveCommentMsg , KT_R }, // 0xE4E7 { CRC_READMOVECOMMENTMSG , KK_ReadMoveCommentMsg , KT_R }, // 0xE4E7
{ CRC_READGOTOREPLY1ST , KK_ReadGotoReply1st , KT_R }, // 0xE54F { CRC_READGOTOREPLY1ST , KK_ReadGotoReply1st , KT_R }, // 0xE54F
{ CRC_READTOGGLEHEXDUMP , KK_ReadToggleHexdump , KT_R }, // 0xE6D5 { CRC_READTOGGLEHEXDUMP , KK_ReadToggleHexdump , KT_R }, // 0xE6D5
@ -845,6 +854,7 @@ tglobalkey globalkeys[] = {
{ CRC_READCHANGEMSG , KK_ReadChangeMsg , KT_R }, // 0xF99F { CRC_READCHANGEMSG , KK_ReadChangeMsg , KT_R }, // 0xF99F
{ CRC_K_ABSPACE , Key_A_BS , 0 }, // 0xF9D7 { CRC_K_ABSPACE , Key_A_BS , 0 }, // 0xF9D7
{ CRC_EDITCUT , KK_EditCut , KT_E }, // 0xFAE6 { CRC_EDITCUT , KK_EditCut , KT_E }, // 0xFAE6
{ CRC_EDITSCODEREVERSE , KK_EditSCodeReverse , KT_E }, // 0xFC0E
{ CRC_K_CF9 , Key_C_F9 , 0 }, // 0xFD02 { CRC_K_CF9 , Key_C_F9 , 0 }, // 0xFD02
{ CRC_K_CF8 , Key_C_F8 , 0 }, // 0xFD03 { CRC_K_CF8 , Key_C_F8 , 0 }, // 0xFD03
{ CRC_K_CF3 , Key_C_F3 , 0 }, // 0xFD08 { CRC_K_CF3 , Key_C_F3 , 0 }, // 0xFD08

View File

@ -112,6 +112,11 @@ const word CRC_EDITQUITNOW = 0x80BA;
const word CRC_EDITREFLOW = 0x13F9; const word CRC_EDITREFLOW = 0x13F9;
const word CRC_EDITSAVEFILE = 0x64A4; const word CRC_EDITSAVEFILE = 0x64A4;
const word CRC_EDITSAVEMSG = 0x660C; const word CRC_EDITSAVEMSG = 0x660C;
const word CRC_EDITSCODENORMAL = 0xE4CE;
const word CRC_EDITSCODEBOLD = 0x657D;
const word CRC_EDITSCODEITALIC = 0x487F;
const word CRC_EDITSCODEUNDERLINE = 0xB1D9;
const word CRC_EDITSCODEREVERSE = 0xFC0E;
const word CRC_EDITSOUNDKILL = 0xA9A7; const word CRC_EDITSOUNDKILL = 0xA9A7;
const word CRC_EDITSPELLCHECK = 0xE167; const word CRC_EDITSPELLCHECK = 0xE167;
const word CRC_EDITTAB = 0x8C26; const word CRC_EDITTAB = 0x8C26;

View File

@ -2025,6 +2025,86 @@ void IEclass::ToggleCase() {
} }
// ------------------------------------------------------------------
void IEclass::SCodeChange(gkey key)
{
GFTRK("EditSCodeChange");
char _ch = ' ';
switch (key)
{
case KK_EditSCodeBold: _ch = '*'; break;
case KK_EditSCodeUnderline: _ch = '_'; break;
case KK_EditSCodeItalic: _ch = '/'; break;
case KK_EditSCodeReverse: _ch = '#'; break;
}
if (strchr(CFG->stylecodepunct, currline->txt[col]))
{
if (col && !strchr(CFG->stylecodepunct, currline->txt[col-1]))
GoLeft();
else if (!strchr(CFG->stylecodepunct, currline->txt[col+1]))
GoRight();
else
{
if (isspace(currline->txt[col]) && (key != KK_EditSCodeNormal))
{
if ((col > 0) && !isspace(currline->txt[col-1]))
insertchar(' ');
insertchar(_ch);
insertchar(_ch);
GoLeft();
}
GFTRK(NULL);
return;
}
}
uint beg = col;
uint end = col;
while ((beg > 0) && !strchr(CFG->stylecodepunct, currline->txt[beg-1]))
beg--;
while (!strchr(CFG->stylecodepunct, currline->txt[end+1]))
end++;
bool replace = false;
char c1 = currline->txt[beg];
char c2 = currline->txt[end];
if ((_ch == c1) && (c1 == c2))
{
GFTRK(NULL);
return;
}
if ((_ch != c1) && (c1 == c2) &&
((c1 == '*') || (c1 == '/') || (c1 == '_') || (c1 == '#')))
replace = true;
while ((col > 0) && !strchr(CFG->stylecodepunct, currline->txt[col-1]))
GoLeft();
if (replace) DelChar();
if (_ch != ' ') insertchar(_ch);
while (!strchr(CFG->stylecodepunct, currline->txt[col+1]))
GoRight();
if (replace) DelChar();
else GoRight();
if (_ch != ' ') insertchar(_ch);
GoLeft();
GFTRK(NULL);
}
// ------------------------------------------------------------------ // ------------------------------------------------------------------
void IEclass::LookupCursor() { void IEclass::LookupCursor() {
@ -2249,6 +2329,11 @@ noselecting:
case KK_EditUnDelete: UnDelete(); break; case KK_EditUnDelete: UnDelete(); break;
case KK_EditUndo: Undo->PlayItem(); break; case KK_EditUndo: Undo->PlayItem(); break;
case KK_EditZapQuoteBelow: ZapQuoteBelow(); break; case KK_EditZapQuoteBelow: ZapQuoteBelow(); break;
case KK_EditSCodeNormal:
case KK_EditSCodeBold:
case KK_EditSCodeItalic:
case KK_EditSCodeUnderline:
case KK_EditSCodeReverse: SCodeChange(__key); break;
// Block functions // Block functions
case KK_EditAnchor: BlockAnchor(); break; case KK_EditAnchor: BlockAnchor(); break;

View File

@ -399,6 +399,7 @@ public:
void SpellCheck (); void SpellCheck ();
void Tab (); void Tab ();
void ToggleCase (); void ToggleCase ();
void SCodeChange(gkey key);
void ToggleInsert (); void ToggleInsert ();
void ToLower (); void ToLower ();
void ToUpper (); void ToUpper ();

View File

@ -174,6 +174,11 @@ const gkey KK_EditBlockPgUp = 0xFF02;
const gkey KK_EditDelete = 0xFF03; const gkey KK_EditDelete = 0xFF03;
const gkey KK_EditUndo = 0xFF04; const gkey KK_EditUndo = 0xFF04;
const gkey KK_EditDeleteSOL = 0xFF05; const gkey KK_EditDeleteSOL = 0xFF05;
const gkey KK_EditSCodeNormal = 0xFF08;
const gkey KK_EditSCodeBold = 0xFF09;
const gkey KK_EditSCodeItalic = 0xFF0A;
const gkey KK_EditSCodeUnderline = 0xFF0B;
const gkey KK_EditSCodeReverse = 0xFF0C;
const gkey KK_FileAbort = 0xFF10; const gkey KK_FileAbort = 0xFF10;
const gkey KK_FileAskExit = 0xFF11; const gkey KK_FileAskExit = 0xFF11;