Restore comment in get_name_for_new_file.

This commit is contained in:
Philip Daniels 2022-05-26 22:20:18 +01:00
parent abfada5641
commit 180a2baff0
1 changed files with 4 additions and 0 deletions

View File

@ -2249,6 +2249,10 @@ pub fn jump_to_location(
fn get_name_for_new_file(&self) -> String {
const PREFIX: &str = "Untitled-";
// Checking just the current scratch_docs rather than all the different document
// collections seems to be the right thing to do. The user may have genuine 'new N'
// files tucked away somewhere in their workspace.
let new_num = self.scratch_docs
.values()
.filter_map(|doc| match doc.content() {