Skip to content

Commit

Permalink
+fix: regression: tab selected if pressed on empty line
Browse files Browse the repository at this point in the history
  • Loading branch information
RaiKoHoff committed Mar 2, 2024
1 parent 54a7cfc commit 431a22d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Edit.c
Original file line number Diff line number Diff line change
Expand Up @@ -3403,12 +3403,12 @@ void EditIndentBlock(HWND hwnd, int cmd, bool bFormatIndentation, bool bForceAll
DocLn const iCurLine = SciCall_LineFromPosition(iCurPos);
DocLn const iAnchorLine = SciCall_LineFromPosition(iAnchorPos);
bool const bSingleLine = Sci_IsSelectionSingleLine();
bool const bCompleteLine = Sci_IsCompleteLineSelected();
bool const bCompleteLineSel = !SciCall_IsSelectionEmpty() && Sci_IsCompleteLineSelected();

bool const bTabIndents = SciCall_GetTabIndents();
bool const bBSpUnindents = SciCall_GetBackSpaceUnIndents();

bFormatIndentation = bFormatIndentation || bCompleteLine;
bFormatIndentation = bFormatIndentation || bCompleteLineSel;

DocPos iDiffCurrent = 0;
DocPos iDiffAnchor = 0;
Expand Down Expand Up @@ -3449,7 +3449,7 @@ void EditIndentBlock(HWND hwnd, int cmd, bool bFormatIndentation, bool bForceAll
if (!bForceAll) {
if (bSingleLine) {
if (bFormatIndentation) {
if (bCompleteLine) {
if (bCompleteLineSel) {
if (iCurPos < iAnchorPos) {
EditSetSelectionEx(SciCall_GetLineEndPosition(iCurLine), SciCall_PositionFromLine(iCurLine), -1, -1);
} else {
Expand Down

0 comments on commit 431a22d

Please sign in to comment.