Skip to content

Commit

Permalink
+ fix: "Toggle Folds": selection must span at least two lines
Browse files Browse the repository at this point in the history
  • Loading branch information
RaiKoHoff committed Apr 21, 2018
1 parent b1fcf08 commit c1f8800
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/Edit.c
Original file line number Diff line number Diff line change
Expand Up @@ -8041,8 +8041,13 @@ void EditToggleFolds(FOLD_ACTION action, bool bForceAll)

if (!bForceAll && !SciCall_IsSelectionEmpty())
{
iStartLine = SciCall_LineFromPosition(SciCall_GetSelectionStart());
iEndLine = SciCall_LineFromPosition(SciCall_GetSelectionEnd());
DocLn const iBegLn = SciCall_LineFromPosition(SciCall_GetSelectionStart());
DocLn const iEndLn = SciCall_LineFromPosition(SciCall_GetSelectionEnd());
// selection range must span at least two lines
if (iBegLn != iEndLn) {
iStartLine = iBegLn;
iEndLine = iEndLn;
}
}

if (action == SNIFF)
Expand Down

0 comments on commit c1f8800

Please sign in to comment.