1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 04:17:35 +00:00

LibLine: Respect the provided completion static offset

Now that we can resolve these correctly and they're per-suggestion, we
can finally use them for their intended purpose of letting suggestions
overwrite stuff in the buffer.
This commit is contained in:
Ali Mohammad Pur 2022-04-15 01:48:56 +04:30 committed by Ali Mohammad Pur
parent 4ea9ca06b4
commit d5b3998d23
5 changed files with 27 additions and 9 deletions

View file

@ -98,6 +98,9 @@ public:
size_t end;
} offset_region_to_remove { 0, 0 }; // The region to remove as defined by [start, end) translated by (old_cursor + new_cursor_offset)
// This bit of data will be removed, but restored if the suggestion is rejected.
size_t static_offset_from_cursor { 0 };
Vector<Utf32View> insert {};
Optional<Style> style_to_apply {};