mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-16 20:09:10 +02:00
SynEdit: Fixed some utf8 issues in smColumn mode blocks
git-svn-id: trunk@21065 -
This commit is contained in:
parent
41133ceb24
commit
68d8d80a23
@ -882,8 +882,8 @@ var
|
||||
if xe > xb then
|
||||
FLines.EditDelete(xb, y, xe - xb);
|
||||
end;
|
||||
BB.X := Min(BB.X, BE.X);
|
||||
FInternalCaret.LineBytePos := BB;
|
||||
FInternalCaret.LineCharPos := Point(l, BB.Y);
|
||||
BB := FInternalCaret.LineBytePos;
|
||||
// Column deletion never removes a line entirely, so no mark
|
||||
// updating is needed here.
|
||||
end;
|
||||
@ -1297,9 +1297,17 @@ end;
|
||||
|
||||
function TSynEditSelection.SelAvail : Boolean;
|
||||
begin
|
||||
Result := (not FHide) and
|
||||
( (FStartBytePos <> FEndBytePos) or
|
||||
((FStartLinePos <> FEndLinePos) and (FActiveSelectionMode <> smColumn)) );
|
||||
if FHide then exit(False);
|
||||
if (FActiveSelectionMode = smColumn) then begin
|
||||
Result := (FStartBytePos <> FEndBytePos) and (FStartLinePos = FEndLinePos);
|
||||
if (not Result) and (FStartLinePos <> FEndLinePos) then begin
|
||||
// Todo: Cache values, but we need notification, if ines are modified (even only by change of tabwidth...)
|
||||
Result := Lines.LogicalToPhysicalPos(StartLineBytePos).X <>
|
||||
Lines.LogicalToPhysicalPos(EndLineBytePos).X;
|
||||
end;
|
||||
end
|
||||
else
|
||||
Result := (FStartBytePos <> FEndBytePos) or (FStartLinePos <> FEndLinePos);
|
||||
end;
|
||||
|
||||
function TSynEditSelection.SelCanContinue(ACaret: TSynEditCaret): Boolean;
|
||||
|
Loading…
Reference in New Issue
Block a user