+ fix: "single line selection" criteria

This commit is contained in:
Rainer Kottenhoff 2018-02-07 23:56:48 +01:00
parent 687ea1565d
commit dbb44a1ea3
2 changed files with 3 additions and 4 deletions

View File

@ -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);

View File

@ -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()))