diff options
author | Lucas CHOLLET <lucas.chollet@free.fr> | 2022-02-10 17:40:16 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-02-28 14:00:27 +0100 |
commit | 9c2e89e8b8be2c2923b76c38c7f1fd316e6a8b18 (patch) | |
tree | e38cfe71c6b3f236a4adc8820729ee2a1b4a6f4c /Userland/Libraries/LibGUI | |
parent | 889315e8aa3dba52d8b368fa9de8bc31f6b4702f (diff) | |
download | serenity-9c2e89e8b8be2c2923b76c38c7f1fd316e6a8b18.zip |
TextEditor: Fix highlighting bug in wrapping mode
Before this patch the highlighted rectangle wasn't placed on the right
spot. Now the red highlighting is correctly placed at the end of the
line. This was due to a function called with a wrong argument.
Diffstat (limited to 'Userland/Libraries/LibGUI')
-rw-r--r-- | Userland/Libraries/LibGUI/TextEditor.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Libraries/LibGUI/TextEditor.cpp b/Userland/Libraries/LibGUI/TextEditor.cpp index 2020430029..ee1a72f092 100644 --- a/Userland/Libraries/LibGUI/TextEditor.cpp +++ b/Userland/Libraries/LibGUI/TextEditor.cpp @@ -652,7 +652,7 @@ void TextEditor::paint_event(PaintEvent& event) if (physical_column < end_of_visual_line) { size_t visual_column = physical_column > start_of_visual_line ? (physical_column - start_of_visual_line) : 0; Gfx::IntRect whitespace_rect { - content_x_for_position({ line_index, visual_column }), + content_x_for_position({ line_index, physical_column }), visual_line_rect.y(), text_width_for_font(visual_line_text.substring_view(visual_column, visual_line_text.length() - visual_column), font()), visual_line_rect.height() |