-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Autosaving directory for unsaved windows #480
Comments
cshnik
added a commit
that referenced
this issue
Jul 18, 2024
cshnik
added a commit
that referenced
this issue
Jul 18, 2024
cshnik
added a commit
that referenced
this issue
Jul 23, 2024
cshnik
added a commit
that referenced
this issue
Jul 25, 2024
cshnik
added a commit
that referenced
this issue
Jul 27, 2024
cshnik
added a commit
that referenced
this issue
Jul 27, 2024
Done. |
cshnik
added a commit
that referenced
this issue
Jul 27, 2024
INI option |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add a new setting:
DraftsPath
. If set, must point to an existing folder (after expanding%variables%
), causing Notepad 2e to save small files there (as File > Save Copy but never doing Ensure consistent line endings and Strip trailing blanks) after 1 minute of a changed window becoming unfocused.<= FileLoadWarningMB
then set upWM_TIMER
for 1 minute.PID-counter.txt
file name, generated before first autosaving (it's the same for the same process but not for others).PID
alone isn't enough but adding it prevents another process from taking over this process' draft file name (scenario: process A runs, autosaves to1.txt
, then becomes non-dirty, removes1.txt
, process B runs, sees there's no1.txt
and autosaves there so now both A and B autosave to1.txt
). Since two processes with the same ID cannot simultaneously exist, name generation is very simple and doesn't have to be multiprocess-safe. At the same time, two draft files with the samePID
prefix may exist (if Notepad 2e has crashed and a new instance received the same PID).As a result,
DraftsPath
will only contain files corresponding to either currently running or unexpectedly closed processes.The text was updated successfully, but these errors were encountered: