mirror of
https://github.com/macvim-dev/macvim.git
synced 2026-02-09 20:26:37 +01:00
MacVim's `:hardcopy` implementation just uses Preview to show the generated PostScript file and lets the user decide what to do with it. macOS 13 Ventura removed PostScript support from Preview, so we now have to manually convert it to PDF first using `pstopdf` (which is thankfully bundled with macOS). While we are at it, update the script so that we actually delete the file after sending it to Preview. Previously MacVim never did that and therefore leaks the file in a temp folder until Vim closes, which isn't ideal for privacy. Now, just set a 10 sec timer to delete the file after it's opened (we just need enough time to allow Preview to open and load the file, which doesn't take much time. The 10 sec timer is to account for slow computers). Fix #1347
4.4 KiB
4.4 KiB