summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibGUI/EditingEngine.cpp
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2023-03-06 17:16:25 +0100
committerAndreas Kling <kling@serenityos.org>2023-03-06 23:46:35 +0100
commit359d6e7b0b0ef7add9eb2015d0dd664a82cf73d7 (patch)
treebe51963e0f0dc7e1eeeb670188c8fe1fa5eea37f /Userland/Libraries/LibGUI/EditingEngine.cpp
parent689ca370d4eca80eb5c3856a69c3eed4ed848a29 (diff)
downloadserenity-359d6e7b0b0ef7add9eb2015d0dd664a82cf73d7.zip
Everywhere: Stop using NonnullOwnPtrVector
Same as NonnullRefPtrVector: weird semantics, questionable benefits.
Diffstat (limited to 'Userland/Libraries/LibGUI/EditingEngine.cpp')
-rw-r--r--Userland/Libraries/LibGUI/EditingEngine.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/Userland/Libraries/LibGUI/EditingEngine.cpp b/Userland/Libraries/LibGUI/EditingEngine.cpp
index 984690e3ab..6a18ded445 100644
--- a/Userland/Libraries/LibGUI/EditingEngine.cpp
+++ b/Userland/Libraries/LibGUI/EditingEngine.cpp
@@ -171,7 +171,7 @@ void EditingEngine::move_one_left()
m_editor->set_cursor(m_editor->cursor().line(), new_column);
} else if (m_editor->cursor().line() > 0) {
auto new_line = m_editor->cursor().line() - 1;
- auto new_column = m_editor->lines()[new_line].length();
+ auto new_column = m_editor->lines()[new_line]->length();
m_editor->set_cursor(new_line, new_column);
}
}
@@ -362,7 +362,7 @@ void EditingEngine::move_to_first_line()
void EditingEngine::move_to_last_line()
{
- m_editor->set_cursor(m_editor->line_count() - 1, m_editor->lines()[m_editor->line_count() - 1].length());
+ m_editor->set_cursor(m_editor->line_count() - 1, m_editor->lines()[m_editor->line_count() - 1]->length());
};
void EditingEngine::get_selection_line_boundaries(Badge<MoveLineUpOrDownCommand>, size_t& first_line, size_t& last_line)