Source

Kephra / lib / Kephra / App / Window.pm

Diff from to

lib/Kephra/App/Window.pm

 sub set_title { $_ref->SetTitle( $_[1] ) }
 sub refresh_title {
 	my $self = shift;
-	my $doc = Kephra::API::Doc::active();
-	my $title = (ref $doc and $doc->file_name)
-		? $doc->file_name.' ('.$doc->file_path.')'
-		: Kephra::App::Part::Editor::active_title();
+	my $doc = Kephra::API::document();
+	return $self->set_title( $title_end ) unless defined $doc and $doc;
+
+	my $title = $doc->title;
+	$title .= ' ('.$doc->file_path.')' if $doc->file_path;
 	$self->set_title( $title . " - $title_end" );
 }