C14.14 r3: formulas framed after outlining, a file per print job, no source selection in rendered modes (library 8234fcd)
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
8fc5ee2ab2
commit
d9dadb3d0e
8 files changed
+27
-7
No files matched your search
@@ -249,7 +249,7 @@ impl Desk {
|
||||
.and_then(|path| path.parent())
|
||||
.map(PathBuf::from);
|
||||
let (revision, work) = (source.session.revision(), source.work.clone());
|
||||
let pdf = work.join("print.pdf");
|
||||
let pdf = print_copy(&work);
|
||||
log::info!("mark: prints tab {tab}");
|
||||
cx.spawn(async move |desk, cx| {
|
||||
let written = cx
|
||||
@@ -310,5 +310,12 @@ impl Desk {
|
||||
}
|
||||
}
|
||||
|
||||
/// A file of its own for each print job.
|
||||
fn print_copy(work: &std::path::Path) -> PathBuf {
|
||||
static JOBS: std::sync::atomic::AtomicU64 = std::sync::atomic::AtomicU64::new(0);
|
||||
let job = JOBS.fetch_add(1, std::sync::atomic::Ordering::Relaxed);
|
||||
work.join(format!("print-{job}.pdf"))
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests;
|
||||
@@ -86,3 +86,9 @@ fn rich_copy_takes_the_selection_as_html(cx: &mut TestAppContext) {
|
||||
"{html}"
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn each_print_job_writes_its_own_file() {
|
||||
let work = std::path::Path::new("work");
|
||||
assert_ne!(super::print_copy(work), super::print_copy(work));
|
||||
}
|
||||
Reference in new issue
Block a user