mirror of
https://github.com/RGBCube/serenity
synced 2025-05-23 19:05:08 +00:00
TextEditor: Show "Untitled" when there's no current document path
This commit is contained in:
parent
7c0e43eb3d
commit
2dc09d1cd7
3 changed files with 8 additions and 3 deletions
|
@ -540,7 +540,10 @@ void TextEditorWidget::set_path(const LexicalPath& lexical_path)
|
|||
void TextEditorWidget::update_title()
|
||||
{
|
||||
StringBuilder builder;
|
||||
builder.append(m_path);
|
||||
if (m_path.is_empty())
|
||||
builder.append("Untitled");
|
||||
else
|
||||
builder.append(m_path);
|
||||
if (m_document_dirty)
|
||||
builder.append(" (*)");
|
||||
builder.append(" - Text Editor");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue