mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-06-08 06:38:24 +02:00
Add documentation (comment), and assert for SelStart/SelEnd. Issue #0026902
git-svn-id: trunk@46834 -
This commit is contained in:
parent
388e10fdb2
commit
86edec92f4
@ -881,8 +881,8 @@ type
|
|||||||
|
|
||||||
property BlockBegin: TPoint read GetBlockBegin write SetBlockBegin; // Set Blockbegin. For none persistent also sets Blockend. Setting Caret may undo this and should be done before setting block
|
property BlockBegin: TPoint read GetBlockBegin write SetBlockBegin; // Set Blockbegin. For none persistent also sets Blockend. Setting Caret may undo this and should be done before setting block
|
||||||
property BlockEnd: TPoint read GetBlockEnd write SetBlockEnd;
|
property BlockEnd: TPoint read GetBlockEnd write SetBlockEnd;
|
||||||
property SelStart: Integer read GetSelStart write SetSelStart;
|
property SelStart: Integer read GetSelStart write SetSelStart; // 1-based byte pos of first selected char
|
||||||
property SelEnd: Integer read GetSelEnd write SetSelEnd;
|
property SelEnd: Integer read GetSelEnd write SetSelEnd; // 1-based byte pos of first char after selction end
|
||||||
property SelAvail: Boolean read GetSelAvail;
|
property SelAvail: Boolean read GetSelAvail;
|
||||||
property IsBackwardSel: Boolean read GetIsBackwardSel;
|
property IsBackwardSel: Boolean read GetIsBackwardSel;
|
||||||
property SelText: string read GetSelText write SetSelTextExternal;
|
property SelText: string read GetSelText write SetSelTextExternal;
|
||||||
@ -6967,6 +6967,7 @@ var
|
|||||||
loop: integer;
|
loop: integer;
|
||||||
count: integer;
|
count: integer;
|
||||||
begin
|
begin
|
||||||
|
assert(Value > 0, 'SelStart must be >= 1');
|
||||||
loop := 0;
|
loop := 0;
|
||||||
count := 0;
|
count := 0;
|
||||||
while (loop < FTheLinesView.Count) and (count + llen(FTheLinesView[loop]) < value) do begin
|
while (loop < FTheLinesView.Count) and (count + llen(FTheLinesView[loop]) < value) do begin
|
||||||
@ -7025,6 +7026,7 @@ var
|
|||||||
loop: integer;
|
loop: integer;
|
||||||
count: integer;
|
count: integer;
|
||||||
begin
|
begin
|
||||||
|
assert(Value > 0, 'SelEnd must be >= 1');
|
||||||
loop := 0;
|
loop := 0;
|
||||||
count := 0;
|
count := 0;
|
||||||
while (loop < FTheLinesView.Count) and (count + llen(FTheLinesView[loop]) < value) do begin
|
while (loop < FTheLinesView.Count) and (count + llen(FTheLinesView[loop]) < value) do begin
|
||||||
|
Loading…
Reference in New Issue
Block a user