Skip to content

Commit

Permalink
Merge branch 'topic/vadim/25' into '25.1'
Browse files Browse the repository at this point in the history
Don't move cursor forward when it points after last character.

See merge request eng/ide/VSS!343
  • Loading branch information
reznikmm committed Nov 14, 2024
2 parents 3a9fb02 + 8641e53 commit b559b9d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -576,7 +576,9 @@ package body VSS.Implementation.Text_Handlers.UTF8.Dynamic is
return;
end if;

Unchecked_Forward (Self.Pointer.Storage, After);
if To.Index <= Self.Length then
Unchecked_Forward (Self.Pointer.Storage, After);
end if;

Size := After.UTF8_Offset - From.UTF8_Offset;
Length := After.Index - From.Index;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,9 @@ package body VSS.Implementation.Text_Handlers.UTF8.Static is
return;
end if;

Unchecked_Forward (Self.Storage, After);
if To.Index <= Self.Length then
Unchecked_Forward (Self.Storage, After);
end if;

Size := After.UTF8_Offset - From.UTF8_Offset;
Length := After.Index - From.Index;
Expand Down

0 comments on commit b559b9d

Please sign in to comment.