When opening new files via command line, those files should be ignored by Instant Save and Persistent Untitled Documents to not override the provided filename and should not be treated as new files.
I noticed this while using the "Persistent Untitled Documents" feature but it applies to "Instant Save" as well. You can view, comment on, or merge this pull request online at:
https://github.com/geany/geany/pull/4209
-- Commit Summary --
* SaveActions: Ignore files open from CLI for InstantSave and PUD
-- File Changes --
M plugins/saveactions.c (4)
-- Patch Links --
https://github.com/geany/geany/pull/4209.patch https://github.com/geany/geany/pull/4209.diff
How does it happen that `real_path != NULL` but `file_name == NULL`? I thought that `real_path != NULL` implies `file_name != NULL`.
In this case, both are `NULL`. I think when opening a non-existent file from the command line, it should not be handled as to be instantly saved or as untitled persistent document. It is titled actually as the name was provided on the command line.
I think when opening a non-existent file from the command line
Ah, OK, this happens for nonexistent files only - makes sense now.
LGTM.
Merged #4209 into master.
github-comments@lists.geany.org