1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-10 05:47:34 +00:00

GTextEditor: Simplify computation of visual selection start/end

Add Line::visual_line_containing(int column) to easily convert a column
number into a visual line index.
This commit is contained in:
Andreas Kling 2019-08-25 14:04:46 +02:00
parent 97a695403b
commit fa20dcafb5
2 changed files with 20 additions and 22 deletions

View file

@ -203,6 +203,7 @@ private:
void truncate(int length);
void clear();
void recompute_visual_lines();
int visual_line_containing(int column) const;
template<typename Callback>
void for_each_visual_line(Callback) const;