Skip to content

Commit 38374bb

Browse files
committed
Update sources after changes in Ada_XDiff.
1 parent 1f8b89a commit 38374bb

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

source/server/lsp-text_documents.adb

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ with VSS.Strings.Conversions;
2323
with VSS.Strings.Line_Iterators;
2424
with VSS.String_Vectors;
2525
with VSS.Unicode;
26-
with Ada_XDiff;
26+
with XDiff;
2727

2828
package body LSP.Text_Documents is
2929

@@ -172,11 +172,11 @@ package body LSP.Text_Documents is
172172
New_Text : VSS.Strings.Virtual_String;
173173
Edit : out LSP.Structures.TextEdit_Vector)
174174
is
175-
C_Edit : constant Ada_XDiff.Edits := Ada_XDiff.XDiff
175+
C_Edit : constant XDiff.Edits := XDiff.XDiff
176176
(VSS.Strings.Conversions.To_UTF_8_String (Self.Text),
177177
VSS.Strings.Conversions.To_UTF_8_String (New_Text),
178-
Ada_XDiff.XDF_NEED_MINIMAL);
179-
Cur : Ada_XDiff.Edits := C_Edit;
178+
XDiff.XDF_NEED_MINIMAL);
179+
Cur : XDiff.Edits := C_Edit;
180180
New_Lines : constant VSS.String_Vectors.Virtual_String_Vector :=
181181
New_Text.Split_Lines
182182
(Terminators => LSP_New_Line_Function_Set,
@@ -212,22 +212,22 @@ package body LSP.Text_Documents is
212212
-- Discard the first node which is fake and will have -1 for all its
213213
-- value. Only Delete_Line_Start is allowed to have -1 to indicate
214214
-- that nothing should be deleted.
215-
if Ada_XDiff.Delete_Line_End (Cur) /= -1 then
215+
if XDiff.Delete_Line_End (Cur) /= -1 then
216216
Edit.Append
217217
(LSP.Structures.TextEdit'
218-
(a_range => (((if Ada_XDiff.Delete_Line_Start (Cur) = -1
219-
then Ada_XDiff.Delete_Line_End (Cur)
220-
else Ada_XDiff.Delete_Line_Start (Cur) - 1), 0),
221-
(Ada_XDiff.Delete_Line_End (Cur), 0)),
218+
(a_range => (((if XDiff.Delete_Line_Start (Cur) = -1
219+
then XDiff.Delete_Line_End (Cur)
220+
else XDiff.Delete_Line_Start (Cur) - 1), 0),
221+
(XDiff.Delete_Line_End (Cur), 0)),
222222
newText => Get_Slice (New_Lines,
223-
Ada_XDiff.Insert_Line_Start (Cur),
224-
Ada_XDiff.Insert_Line_End (Cur))));
223+
XDiff.Insert_Line_Start (Cur),
224+
XDiff.Insert_Line_End (Cur))));
225225
end if;
226-
exit when not Ada_XDiff.Has_Next (Cur);
227-
Cur := Ada_XDiff.Next_Edit (Cur);
226+
exit when not XDiff.Has_Next (Cur);
227+
Cur := XDiff.Next_Edit (Cur);
228228
end loop;
229229

230-
Ada_XDiff.Free_Edits (C_Edit);
230+
XDiff.Free_Edits (C_Edit);
231231
end Diff_C;
232232

233233
--------------------

0 commit comments

Comments
 (0)