mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 22:28:11 +00:00
TextEditor: Avoid an unnecessary whole-file copy when opening something
This was left over from before we had the StringView(const ByteBuffer&) constructor to help us.
This commit is contained in:
parent
5768b384b9
commit
d56786ccd8
1 changed files with 1 additions and 1 deletions
|
@ -199,6 +199,6 @@ void TextEditorWidget::open_sesame(const String& path)
|
|||
GMessageBox::show(String::format("Opening \"%s\" failed: %s", path.characters(), strerror(errno)), "Error", GMessageBox::Type::Error, GMessageBox::InputType::OK, window());
|
||||
}
|
||||
|
||||
m_editor->set_text(String::copy(file.read_all()));
|
||||
m_editor->set_text(file.read_all());
|
||||
set_path(FileSystemPath(path));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue