mirror of
https://github.com/rizonesoft/Notepad3.git
synced 2026-06-14 21:09:05 +08:00
+fix: behavior of Ctrl+Shift+X
This commit is contained in:
parent
a4fd0c4d16
commit
13e19ec5f2
@ -2949,14 +2949,14 @@ static int utsort_ln(const void *a, const void *b) {
|
||||
return (_a < _b) ? -1 : ((_a > _b) ? 1 : 0);
|
||||
}
|
||||
|
||||
void EditCutLines(HWND hwnd)
|
||||
void EditCutLines(HWND hwnd, const bool bMSBehavSelEmpty)
|
||||
{
|
||||
if (!Sci_IsMultiOrRectangleSelection())
|
||||
{
|
||||
bool const bInLastLine = Sci_InLastLine();
|
||||
bool const bClearCB = bInLastLine ? (Sci_GetNetLineLength(Sci_GetCurrentLineNumber()) == 0) : false;
|
||||
UndoTransActionBegin();
|
||||
if (SciCall_IsSelectionEmpty()) {
|
||||
if (SciCall_IsSelectionEmpty() && bMSBehavSelEmpty) {
|
||||
SciCall_CopyAllowLine(); // (!) VisualStudio behavior
|
||||
// On Windows, an extra "MSDEVLineSelect" marker is added to the clipboard
|
||||
// which is then used in SCI_PASTE to paste the whole line before the current line.
|
||||
|
||||
@ -69,7 +69,7 @@ void EditMoveUp(HWND hwnd);
|
||||
void EditMoveDown(HWND hwnd);
|
||||
bool EditSetCaretToSelectionStart();
|
||||
bool EditSetCaretToSelectionEnd();
|
||||
void EditCutLines(HWND hwnd);
|
||||
void EditCutLines(HWND hwnd, const bool bMSBehavSelEmpty);
|
||||
void EditCopyMultiSelection(HWND hwnd);
|
||||
void EditModifyLines(const PENCLOSESELDATA pEnclData);
|
||||
void EditIndentBlock(HWND hwnd,int cmd, bool bFormatIndentation, bool bForceAll);
|
||||
|
||||
@ -5143,7 +5143,7 @@ LRESULT MsgCommand(HWND hwnd, UINT umsg, WPARAM wParam, LPARAM lParam)
|
||||
}
|
||||
EditDeleteMarkerInSelection();
|
||||
if (SciCall_IsSelectionEmpty()) {
|
||||
EditCutLines(Globals.hwndEdit);
|
||||
EditCutLines(Globals.hwndEdit, true);
|
||||
} else {
|
||||
SciCall_Cut();
|
||||
}
|
||||
@ -5157,7 +5157,7 @@ LRESULT MsgCommand(HWND hwnd, UINT umsg, WPARAM wParam, LPARAM lParam)
|
||||
}
|
||||
//~ explicit(!): ignore (SciCall_IsSelectionEmpty()) && Settings2.NoCutLineOnEmptySelection)
|
||||
EditDeleteMarkerInSelection();
|
||||
EditCutLines(Globals.hwndEdit);
|
||||
EditCutLines(Globals.hwndEdit, false);
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user