lace.text.cursor: Fix bug in the 'advance' procedure.
This commit is contained in:
@@ -80,7 +80,7 @@ is
|
|||||||
|
|
||||||
elsif Count = Repeat + 1
|
elsif Count = Repeat + 1
|
||||||
then
|
then
|
||||||
Self.Current := delimiter_Position - 1;
|
Self.Current := delimiter_Position;
|
||||||
|
|
||||||
else
|
else
|
||||||
Self.Current := delimiter_Position + Delimiter'Length - 1;
|
Self.Current := delimiter_Position + Delimiter'Length - 1;
|
||||||
@@ -143,8 +143,9 @@ is
|
|||||||
declare
|
declare
|
||||||
use ada.Strings.fixed,
|
use ada.Strings.fixed,
|
||||||
ada.Strings.Maps.Constants;
|
ada.Strings.Maps.Constants;
|
||||||
delimiter_Position : constant Natural := (if match_Case then Index (Self.Target.Data, Delimiter, from => Self.Current)
|
delimiter_Position : constant Natural := (if match_Case then Index (Self.Target.Data (Self.Current .. Self.Target.Length), Delimiter, from => Self.Current)
|
||||||
else Index (Self.Target.Data, to_Lower (Delimiter), from => Self.Current, mapping => lower_case_Map));
|
else Index (Self.Target.Data (Self.Current .. Self.Target.Length), to_Lower (Delimiter), from => Self.Current,
|
||||||
|
mapping => lower_case_Map));
|
||||||
begin
|
begin
|
||||||
-- put_Line ("delimiter_Position" & delimiter_Position'Image);
|
-- put_Line ("delimiter_Position" & delimiter_Position'Image);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user