diff --git a/editor/EditorWidget.cpp b/editor/EditorWidget.cpp index ad1b8ebc..833e7076 100644 --- a/editor/EditorWidget.cpp +++ b/editor/EditorWidget.cpp @@ -9,6 +9,7 @@ #include "EditorWidget.h" #include +#include #include #include #include @@ -42,7 +43,9 @@ Result EditorWidget::load_file(const os::Path& path) m_path = path; - String title = TRY(String::format("Text Editor - %s"_sv, m_path.name().chars())); + auto basename = TRY(PathParser::basename(m_path.name())); + + String title = TRY(String::format("Text Editor - %s"_sv, basename.chars())); window()->set_title(title.view()); TRY(recalculate_lines());