mirror of
https://github.com/rizonesoft/Notepad3.git
synced 2026-06-11 21:03:05 +08:00
+ chg: "Ctrl+D" now duplicates Line or Selection
+ fix: broken Korean IME default setting
This commit is contained in:
parent
0352d70a8b
commit
a09dd1fb38
@ -386,7 +386,8 @@
|
||||
#define IDM_EDIT_SELECTLINE 40312
|
||||
#define IDM_EDIT_MOVELINEUP 40313
|
||||
#define IDM_EDIT_MOVELINEDOWN 40314
|
||||
#define IDM_EDIT_DUPLICATELINE 40315
|
||||
#define IDM_EDIT_DUPLINEORSELECTION 40315
|
||||
//#define IDM_EDIT_SELECTIONDUPLICATE 40329
|
||||
#define IDM_EDIT_LINETRANSPOSE 40316
|
||||
#define IDM_EDIT_CUTLINE 40317
|
||||
#define IDM_EDIT_COPYLINE 40318
|
||||
@ -400,56 +401,55 @@
|
||||
#define IDM_EDIT_INDENT 40326
|
||||
#define IDM_EDIT_UNINDENT 40327
|
||||
#define IDM_EDIT_ENCLOSESELECTION 40328
|
||||
#define IDM_EDIT_SELECTIONDUPLICATE 40329
|
||||
#define IDM_EDIT_PADWITHSPACES 40330
|
||||
#define IDM_EDIT_STRIP1STCHAR 40331
|
||||
#define IDM_EDIT_STRIPLASTCHAR 40332
|
||||
#define IDM_EDIT_TRIMLINES 40333
|
||||
#define IDM_EDIT_COMPRESS_BLANKS 40334
|
||||
#define IDM_EDIT_MERGEBLANKLINES 40335
|
||||
#define IDM_EDIT_REMOVEBLANKLINES 40336
|
||||
#define IDM_EDIT_MODIFYLINES 40337
|
||||
#define IDM_EDIT_SORTLINES 40338
|
||||
#define IDM_EDIT_ALIGN 40339
|
||||
#define IDM_EDIT_CONVERTUPPERCASE 40340
|
||||
#define IDM_EDIT_CONVERTLOWERCASE 40341
|
||||
#define IDM_EDIT_INVERTCASE 40342
|
||||
#define IDM_EDIT_TITLECASE 40343
|
||||
#define IDM_EDIT_SENTENCECASE 40344
|
||||
#define IDM_EDIT_CONVERTTABS 40345
|
||||
#define IDM_EDIT_CONVERTSPACES 40346
|
||||
#define IDM_EDIT_CONVERTTABS2 40347
|
||||
#define IDM_EDIT_CONVERTSPACES2 40348
|
||||
#define IDM_EDIT_INSERT_TAG 40349
|
||||
#define IDM_EDIT_INSERT_ENCODING 40350
|
||||
#define IDM_EDIT_INSERT_SHORTDATE 40351
|
||||
#define IDM_EDIT_INSERT_LONGDATE 40352
|
||||
#define IDM_EDIT_INSERT_FILENAME 40353
|
||||
#define IDM_EDIT_INSERT_PATHNAME 40354
|
||||
#define IDM_EDIT_LINECOMMENT 40355
|
||||
#define IDM_EDIT_STREAMCOMMENT 40356
|
||||
#define IDM_EDIT_URLENCODE 40357
|
||||
#define IDM_EDIT_URLDECODE 40358
|
||||
#define IDM_EDIT_ESCAPECCHARS 40359
|
||||
#define IDM_EDIT_UNESCAPECCHARS 40360
|
||||
#define IDM_EDIT_CHAR2HEX 40361
|
||||
#define IDM_EDIT_HEX2CHAR 40362
|
||||
#define IDM_EDIT_FINDMATCHINGBRACE 40363
|
||||
#define IDM_EDIT_SELTOMATCHINGBRACE 40364
|
||||
#define IDM_EDIT_FIND 40365
|
||||
#define IDM_EDIT_SAVEFIND 40366
|
||||
#define IDM_EDIT_FINDNEXT 40367
|
||||
#define IDM_EDIT_FINDPREV 40368
|
||||
#define IDM_EDIT_REPLACE 40369
|
||||
#define IDM_EDIT_REPLACENEXT 40370
|
||||
#define IDM_EDIT_GOTOLINE 40371
|
||||
#define IDM_EDIT_SELTONEXT 40372
|
||||
#define IDM_EDIT_SELTOPREV 40373
|
||||
#define IDM_EDIT_COMPLETEWORD 40374
|
||||
#define IDM_EDIT_JOINLN_NOSP 40375
|
||||
#define IDM_EDIT_REMOVEDUPLICATELINES 40376
|
||||
#define IDM_EDIT_REMOVEEMPTYLINES 40377
|
||||
#define IDM_EDIT_MERGEEMPTYLINES 40378
|
||||
#define IDM_EDIT_PADWITHSPACES 40329
|
||||
#define IDM_EDIT_STRIP1STCHAR 40330
|
||||
#define IDM_EDIT_STRIPLASTCHAR 40331
|
||||
#define IDM_EDIT_TRIMLINES 40332
|
||||
#define IDM_EDIT_COMPRESS_BLANKS 40333
|
||||
#define IDM_EDIT_MERGEBLANKLINES 40334
|
||||
#define IDM_EDIT_REMOVEBLANKLINES 40335
|
||||
#define IDM_EDIT_MODIFYLINES 40336
|
||||
#define IDM_EDIT_SORTLINES 40337
|
||||
#define IDM_EDIT_ALIGN 40338
|
||||
#define IDM_EDIT_CONVERTUPPERCASE 40339
|
||||
#define IDM_EDIT_CONVERTLOWERCASE 40340
|
||||
#define IDM_EDIT_INVERTCASE 40341
|
||||
#define IDM_EDIT_TITLECASE 40342
|
||||
#define IDM_EDIT_SENTENCECASE 40343
|
||||
#define IDM_EDIT_CONVERTTABS 40344
|
||||
#define IDM_EDIT_CONVERTSPACES 40345
|
||||
#define IDM_EDIT_CONVERTTABS2 40346
|
||||
#define IDM_EDIT_CONVERTSPACES2 40347
|
||||
#define IDM_EDIT_INSERT_TAG 40348
|
||||
#define IDM_EDIT_INSERT_ENCODING 40349
|
||||
#define IDM_EDIT_INSERT_SHORTDATE 40350
|
||||
#define IDM_EDIT_INSERT_LONGDATE 40351
|
||||
#define IDM_EDIT_INSERT_FILENAME 40352
|
||||
#define IDM_EDIT_INSERT_PATHNAME 40353
|
||||
#define IDM_EDIT_LINECOMMENT 40354
|
||||
#define IDM_EDIT_STREAMCOMMENT 40355
|
||||
#define IDM_EDIT_URLENCODE 40356
|
||||
#define IDM_EDIT_URLDECODE 40357
|
||||
#define IDM_EDIT_ESCAPECCHARS 40358
|
||||
#define IDM_EDIT_UNESCAPECCHARS 40359
|
||||
#define IDM_EDIT_CHAR2HEX 40360
|
||||
#define IDM_EDIT_HEX2CHAR 40361
|
||||
#define IDM_EDIT_FINDMATCHINGBRACE 40362
|
||||
#define IDM_EDIT_SELTOMATCHINGBRACE 40363
|
||||
#define IDM_EDIT_FIND 40364
|
||||
#define IDM_EDIT_SAVEFIND 40365
|
||||
#define IDM_EDIT_FINDNEXT 40366
|
||||
#define IDM_EDIT_FINDPREV 40367
|
||||
#define IDM_EDIT_REPLACE 40368
|
||||
#define IDM_EDIT_REPLACENEXT 40369
|
||||
#define IDM_EDIT_GOTOLINE 40370
|
||||
#define IDM_EDIT_SELTONEXT 40371
|
||||
#define IDM_EDIT_SELTOPREV 40372
|
||||
#define IDM_EDIT_COMPLETEWORD 40373
|
||||
#define IDM_EDIT_JOINLN_NOSP 40374
|
||||
#define IDM_EDIT_REMOVEDUPLICATELINES 40375
|
||||
#define IDM_EDIT_REMOVEEMPTYLINES 40376
|
||||
#define IDM_EDIT_MERGEEMPTYLINES 40377
|
||||
|
||||
#define IDM_VIEW_SCHEME 40400
|
||||
#define IDM_VIEW_USE2NDDEFAULT 40401
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -2794,7 +2794,7 @@ LRESULT MsgInitMenu(HWND hwnd, WPARAM wParam, LPARAM lParam)
|
||||
|
||||
EnableCmd(hmenu,IDM_EDIT_MOVELINEUP,!ro);
|
||||
EnableCmd(hmenu,IDM_EDIT_MOVELINEDOWN,!ro);
|
||||
EnableCmd(hmenu,IDM_EDIT_DUPLICATELINE,!ro);
|
||||
EnableCmd(hmenu,IDM_EDIT_DUPLINEORSELECTION,!ro);
|
||||
EnableCmd(hmenu,IDM_EDIT_LINETRANSPOSE,!ro);
|
||||
EnableCmd(hmenu,IDM_EDIT_CUTLINE,!ro);
|
||||
EnableCmd(hmenu,IDM_EDIT_COPYLINE,true);
|
||||
@ -2813,7 +2813,6 @@ LRESULT MsgInitMenu(HWND hwnd, WPARAM wParam, LPARAM lParam)
|
||||
EnableCmd(hmenu,IDM_EDIT_STRIP1STCHAR,!ro);
|
||||
EnableCmd(hmenu,IDM_EDIT_STRIPLASTCHAR,!ro);
|
||||
EnableCmd(hmenu,IDM_EDIT_TRIMLINES,!ro);
|
||||
EnableCmd(hmenu, IDM_EDIT_SELECTIONDUPLICATE, !ro);
|
||||
EnableCmd(hmenu, IDM_EDIT_COMPRESS_BLANKS, !ro);
|
||||
|
||||
EnableCmd(hmenu, IDM_EDIT_MODIFYLINES, !ro);
|
||||
@ -3591,16 +3590,16 @@ LRESULT MsgCommand(HWND hwnd, UINT umsg, WPARAM wParam, LPARAM lParam)
|
||||
break;
|
||||
|
||||
|
||||
case IDM_EDIT_DUPLICATELINE:
|
||||
case IDM_EDIT_DUPLINEORSELECTION:
|
||||
_BEGIN_UNDO_ACTION_;
|
||||
SendMessage(g_hwndEdit,SCI_LINEDUPLICATE,0,0);
|
||||
if (SciCall_IsSelectionEmpty()) { SciCall_LineDuplicate(); } else { SciCall_SelectionDuplicate(); }
|
||||
_END_UNDO_ACTION_;
|
||||
break;
|
||||
|
||||
|
||||
case IDM_EDIT_LINETRANSPOSE:
|
||||
_BEGIN_UNDO_ACTION_;
|
||||
SendMessage(g_hwndEdit, SCI_LINETRANSPOSE,0,0);
|
||||
SciCall_LineTranspose();
|
||||
_END_UNDO_ACTION_;
|
||||
break;
|
||||
|
||||
@ -3619,7 +3618,7 @@ LRESULT MsgCommand(HWND hwnd, UINT umsg, WPARAM wParam, LPARAM lParam)
|
||||
case IDM_EDIT_DELETELINE:
|
||||
{
|
||||
_BEGIN_UNDO_ACTION_;
|
||||
SendMessage(g_hwndEdit, SCI_LINEDELETE, 0, 0);
|
||||
SciCall_LineDelete();
|
||||
_END_UNDO_ACTION_;
|
||||
}
|
||||
break;
|
||||
@ -3628,7 +3627,7 @@ LRESULT MsgCommand(HWND hwnd, UINT umsg, WPARAM wParam, LPARAM lParam)
|
||||
case IDM_EDIT_DELETELINELEFT:
|
||||
{
|
||||
_BEGIN_UNDO_ACTION_;
|
||||
SendMessage(g_hwndEdit, SCI_DELLINELEFT, 0, 0);
|
||||
SciCall_DelLineLeft();
|
||||
_END_UNDO_ACTION_;
|
||||
}
|
||||
break;
|
||||
@ -3637,7 +3636,7 @@ LRESULT MsgCommand(HWND hwnd, UINT umsg, WPARAM wParam, LPARAM lParam)
|
||||
case IDM_EDIT_DELETELINERIGHT:
|
||||
{
|
||||
_BEGIN_UNDO_ACTION_;
|
||||
SendMessage(g_hwndEdit, SCI_DELLINERIGHT, 0, 0);
|
||||
SciCall_DelLineRight();
|
||||
_END_UNDO_ACTION_;
|
||||
}
|
||||
break;
|
||||
@ -3711,17 +3710,6 @@ LRESULT MsgCommand(HWND hwnd, UINT umsg, WPARAM wParam, LPARAM lParam)
|
||||
break;
|
||||
|
||||
|
||||
case IDM_EDIT_SELECTIONDUPLICATE:
|
||||
{
|
||||
BeginWaitCursor(NULL);
|
||||
_BEGIN_UNDO_ACTION_;
|
||||
SendMessage(g_hwndEdit,SCI_SELECTIONDUPLICATE,0,0);
|
||||
_END_UNDO_ACTION_;
|
||||
EndWaitCursor();
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
case IDM_EDIT_PADWITHSPACES:
|
||||
{
|
||||
BeginWaitCursor(NULL);
|
||||
@ -6721,18 +6709,13 @@ void LoadSettings()
|
||||
}
|
||||
g_iBidirectional = (clampi(g_iBidirectional, SC_BIDIRECTIONAL_DISABLED, SC_BIDIRECTIONAL_R2L) > 0) ? SC_BIDIRECTIONAL_R2L : 0;
|
||||
|
||||
#if 0
|
||||
// Settings2 deprecated
|
||||
g_IMEInteraction = IniSectionGetInt(pIniSection, L"IMEInteraction", 111);
|
||||
if ((g_IMEInteraction != 111) && g_bSaveSettings) {
|
||||
// cleanup
|
||||
IniSetString(L"Settings2", L"IMEInteraction", NULL);
|
||||
IniSetInt(L"Settings", L"IMEInteraction", g_iBidirectional);
|
||||
g_IMEInteraction = clampi(IniSectionGetInt(pIniSection, L"IMEInteraction", -1), -1, SC_IME_INLINE);
|
||||
// Korean IME use inline mode by default
|
||||
if (g_IMEInteraction == -1) { // auto detection once
|
||||
// ScintillaWin::KoreanIME()
|
||||
int const codePage = Scintilla_InputCodePage();
|
||||
g_IMEInteraction = ((codePage == 949 || codePage == 1361) ? SC_IME_INLINE : SC_IME_WINDOWED);
|
||||
}
|
||||
g_IMEInteraction = clampi(g_IMEInteraction, 0, 1);
|
||||
#else
|
||||
g_IMEInteraction = clampi(IniSectionGetInt(pIniSection, L"IMEInteraction", SC_IME_WINDOWED), SC_IME_WINDOWED, SC_IME_INLINE);
|
||||
#endif
|
||||
|
||||
g_iSciFontQuality = clampi(IniSectionGetInt(pIniSection, L"SciFontQuality", FontQuality[3]), 0, 3);
|
||||
|
||||
|
||||
@ -85,7 +85,6 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
|
||||
|
||||
IDR_MAINWND ACCELERATORS
|
||||
BEGIN
|
||||
46, /*'.'*/ IDM_EDIT_LINETRANSPOSE, ASCII, ALT, NOINVERT
|
||||
"0", IDM_VIEW_RESETZOOM, VIRTKEY, CONTROL, NOINVERT
|
||||
"0", IDM_VIEW_WORDWRAPSYMBOLS, VIRTKEY, SHIFT, CONTROL, NOINVERT
|
||||
"1", CMD_STRINGIFY, VIRTKEY, CONTROL, NOINVERT
|
||||
@ -111,8 +110,8 @@ BEGIN
|
||||
"C", IDM_EDIT_COPYALL, VIRTKEY, ALT, NOINVERT
|
||||
"C", IDM_EDIT_HEX2CHAR, VIRTKEY, CONTROL, ALT, NOINVERT
|
||||
"C", IDM_EDIT_COPY, VIRTKEY, SHIFT, CONTROL, NOINVERT
|
||||
"D", IDM_EDIT_DUPLICATELINE, VIRTKEY, CONTROL, NOINVERT
|
||||
"D", IDM_EDIT_SELECTIONDUPLICATE, VIRTKEY, ALT, NOINVERT
|
||||
"D", IDM_EDIT_DUPLINEORSELECTION, VIRTKEY, CONTROL, NOINVERT
|
||||
"D", IDM_EDIT_LINETRANSPOSE, VIRTKEY, ALT, NOINVERT
|
||||
"D", IDM_EDIT_DELETELINE, VIRTKEY, SHIFT, CONTROL, NOINVERT
|
||||
"D", IDM_EDIT_REMOVEDUPLICATELINES, VIRTKEY, CONTROL, ALT, NOINVERT
|
||||
"E", IDM_EDIT_COPYADD, VIRTKEY, CONTROL, NOINVERT
|
||||
|
||||
@ -199,7 +199,6 @@ DeclareSciCallV0(Clear, CLEAR)
|
||||
DeclareSciCallV2(CopyRange, COPYRANGE, DocPos, start, DocPos, end)
|
||||
DeclareSciCallV0(Cancel, CANCEL)
|
||||
DeclareSciCallV0(CopyAllowLine, COPYALLOWLINE)
|
||||
DeclareSciCallV0(LineDelete, LINEDELETE)
|
||||
DeclareSciCallV2(CopyText, COPYTEXT, DocPos, length, const char*, text)
|
||||
DeclareSciCallV2(GetText, GETTEXT, DocPos, length, const char*, text)
|
||||
|
||||
@ -278,8 +277,15 @@ DeclareSciCallV2(AutoCShow, AUTOCSHOW, int, len, const char*, list)
|
||||
// Commands
|
||||
//
|
||||
DeclareSciCallV0(NewLine, NEWLINE)
|
||||
DeclareSciCallV0(LineDuplicate, LINEDUPLICATE)
|
||||
DeclareSciCallV0(SelectionDuplicate, SELECTIONDUPLICATE)
|
||||
DeclareSciCallV0(LineTranspose, LINETRANSPOSE)
|
||||
DeclareSciCallV0(MoveSelectedLinesUp, MOVESELECTEDLINESUP)
|
||||
DeclareSciCallV0(MoveSelectedLinesDown, MOVESELECTEDLINESDOWN)
|
||||
DeclareSciCallV0(LineDelete, LINEDELETE)
|
||||
DeclareSciCallV0(DelLineLeft, DELLINELEFT)
|
||||
DeclareSciCallV0(DelLineRight, DELLINERIGHT)
|
||||
|
||||
|
||||
DeclareSciCallR2(FindText, FINDTEXT, DocPos, int, flags, struct Sci_TextToFind*, text)
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user