summaryrefslogtreecommitdiff
path: root/Userland
diff options
context:
space:
mode:
authorItamar <itamar8910@gmail.com>2021-03-27 18:04:51 +0300
committerAndreas Kling <kling@serenityos.org>2021-03-29 18:05:46 +0200
commitf6cc382403afe97b77c73484d1ee0b2d3a4186fb (patch)
treee131cff45e821392b5b0ac3d50d2d5d56dce94b3 /Userland
parente64a42dd50d40f1d8600451ad3c686f0d6ac0c0b (diff)
downloadserenity-f6cc382403afe97b77c73484d1ee0b2d3a4186fb.zip
TextEditor: Adjust AutoCompleteBox's position to the scroll height
Diffstat (limited to 'Userland')
-rw-r--r--Userland/Libraries/LibGUI/TextEditor.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Libraries/LibGUI/TextEditor.cpp b/Userland/Libraries/LibGUI/TextEditor.cpp
index b9d804b944..da002e0c11 100644
--- a/Userland/Libraries/LibGUI/TextEditor.cpp
+++ b/Userland/Libraries/LibGUI/TextEditor.cpp
@@ -1315,7 +1315,7 @@ void TextEditor::try_show_autocomplete()
m_autocomplete_provider->provide_completions([&](auto completions) {
auto has_completions = !completions.is_empty();
m_autocomplete_box->update_suggestions(move(completions));
- auto position = content_rect_for_position(cursor()).bottom_right().translated(screen_relative_rect().top_left().translated(ruler_width(), 0).translated(10, 5));
+ auto position = content_rect_for_position(cursor()).translated(0, -visible_content_rect().y()).bottom_right().translated(screen_relative_rect().top_left().translated(ruler_width(), 0).translated(10, 5));
if (has_completions)
m_autocomplete_box->show(position);
});