diff --git a/src/Edit.c b/src/Edit.c index 5e334f7de..7fc826d05 100644 --- a/src/Edit.c +++ b/src/Edit.c @@ -2714,7 +2714,7 @@ void EditIndentBlock(HWND hwnd, int cmd, BOOL bFormatIndentation) //const DocPos iSelEnd = SciCall_GetSelectionEnd(); const DocLn iCurLine = SciCall_LineFromPosition(iCurPos); const DocLn iAnchorLine = SciCall_LineFromPosition(iAnchorPos); - const BOOL bSingleLine = (iCurLine == iAnchorLine); + const BOOL bSingleLine = IsSingleLineSelection(); const int _bTabIndents = (int)SendMessage(hwnd, SCI_GETTABINDENTS, 0, 0); const int _bBSpUnindents = (int)SendMessage(hwnd, SCI_GETBACKSPACEUNINDENTS, 0, 0); diff --git a/src/SciCall.h b/src/SciCall.h index 448cec996..70fc0f5b8 100644 --- a/src/SciCall.h +++ b/src/SciCall.h @@ -228,11 +228,10 @@ DeclareSciCallV1(SetTechnology, SETTECHNOLOGY, int, technology); // // Utilities // - -#define IsSelThinRectangle() (SciCall_GetSelectionMode() == SC_SEL_THIN) - #define SciClearClipboard() SciCall_CopyText(0, "") +#define IsSelThinRectangle() (SciCall_GetSelectionMode() == SC_SEL_THIN) +#define IsFullLineSelected() (SciCall_GetSelectionMode() == SC_SEL_LINES) #define IsSingleLineSelection() \ (SciCall_LineFromPosition(SciCall_GetCurrentPos()) == SciCall_LineFromPosition(SciCall_GetAnchor()))