Skip to content

Commit

Permalink
Skip New Documents when disambiguating tabs
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeremy Wootten committed Dec 15, 2023
1 parent d499446 commit 791efc2
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/Widgets/DocumentView.vala
Original file line number Diff line number Diff line change
Expand Up @@ -331,8 +331,16 @@ public class Scratch.Widgets.DocumentView : Granite.Widgets.DynamicNotebook {


private void rename_tabs_with_same_title (Services.Document doc) {
if (doc.is_file_temporary) {
return;
}

string doc_tab_name = doc.file.get_basename ();
foreach (var d in docs) {
if (d.is_file_temporary) {
continue;
}

string new_tabname_doc, new_tabname_d;

if (Utils.find_unique_path (d.file, doc.file, out new_tabname_d, out new_tabname_doc)) {
Expand Down

0 comments on commit 791efc2

Please sign in to comment.