mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 01:27:34 +00:00
LibGUI: Store Utf32Views in TextEditor::LineVisualData
Previously this stored the position of each visual line break, meaning that all the text would always be painted. By storing each visual line's Utf32View, we can skip over parts of the text, such as for code folding.
This commit is contained in:
parent
b5e1babc26
commit
640f6f476c
2 changed files with 19 additions and 13 deletions
|
@ -423,7 +423,7 @@ private:
|
|||
void for_each_visual_line(size_t line_index, Callback) const;
|
||||
|
||||
struct LineVisualData {
|
||||
Vector<size_t, 1> visual_line_breaks;
|
||||
Vector<Utf32View> visual_lines;
|
||||
Gfx::IntRect visual_rect;
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue