mirror of
https://github.com/rizonesoft/Notepad3.git
synced 2026-06-14 21:09:05 +08:00
+ fix: "single line selection" criteria
This commit is contained in:
parent
687ea1565d
commit
dbb44a1ea3
@ -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);
|
||||
|
||||
@ -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()))
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user