mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-16 23:49:28 +02:00
SynEdit: Added checks for revision 59971 #6bedb95bcd (fix selection with smLine should include folded lines - Issue #0034760) - apply only if AutoExtend is true (indicates user input key/mouse) / Setting Selection from code should not be affected.
git-svn-id: trunk@59983 -
This commit is contained in:
parent
0149572394
commit
f3eefeade7
@ -3301,7 +3301,9 @@ begin
|
||||
if (AnAction.Option <> emcoSelectionContinue) or (not SelAvail) then
|
||||
FBlockSelection.StartLineBytePos := FCaret.LineBytePos;
|
||||
FBlockSelection.ActiveSelectionMode := smLine;
|
||||
FBlockSelection.AutoExtend := True;
|
||||
FBlockSelection.ForceSingleLineSelected := True;
|
||||
FBlockSelection.AutoExtend := AnAction.Option = emcoSelectionContinue;
|
||||
end;
|
||||
emcStartSelectTokens, emcStartSelectWords, emcStartSelectLines: begin
|
||||
FMouseSelectionCmd := ACommand;
|
||||
|
@ -2272,7 +2272,8 @@ begin
|
||||
Value.y := MinMax(Value.y, 1, fLines.Count);
|
||||
|
||||
// ensure folded block at bottom line is in selection
|
||||
if (ActiveSelectionMode = smLine) and (FFoldedView <> nil)
|
||||
if (ActiveSelectionMode = smLine) and (FFoldedView <> nil) and
|
||||
(FAutoExtend or FStickyAutoExtend)
|
||||
then begin
|
||||
if ( (FStartLinePos > Value.y) or
|
||||
( (FStartLinePos = Value.y) and (FStartBytePos > Value.x) )
|
||||
@ -2351,7 +2352,7 @@ begin
|
||||
if WasAvail <> SelAvail then begin
|
||||
// ensure folded block at bottom line is in selection
|
||||
// only when selection is new (WasAvail = False)
|
||||
if SelAvail then begin
|
||||
if SelAvail and (FAutoExtend or FStickyAutoExtend) then begin
|
||||
if IsBackwardSel then
|
||||
FStartLinePos := TSynEditFoldedView(FFoldedView).TextPosAddLines(FStartLinePos, 1) - 1
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user