diff options
| author | Marc André Tanner <mat@brain-dump.org> | 2016-12-14 13:37:47 +0100 |
|---|---|---|
| committer | Marc André Tanner <mat@brain-dump.org> | 2016-12-14 14:44:49 +0100 |
| commit | b531213d198405ba0ff1a2982d8b258fb10d7697 (patch) | |
| tree | 3bc3456b7fe4ddb9a66605e9c15a17457e7ec97f /vis-core.h | |
| parent | e80d859867e515d95492e61bf5dca08a1c325130 (diff) | |
| download | vis-b531213d198405ba0ff1a2982d8b258fb10d7697.tar.gz vis-b531213d198405ba0ff1a2982d8b258fb10d7697.tar.xz | |
vis: add new :set savemethod auto|atomic|inplace option
Specifies how the current file should be saved, `atomic` which uses
rename(2) to atomically replace the file, `inplace` which truncates the
file and then rewrites it or `auto` which tries the former before falling
back to the latter. The rename method fails for symlinks, hardlinks,
in case of insufficient directory permissions or when either the file
owner, group, POSIX ACL or SELinux labels can not be restored.
The option defaults to `auto`.
Diffstat (limited to 'vis-core.h')
| -rw-r--r-- | vis-core.h | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -116,6 +116,7 @@ struct File { /* shared state among windows displaying the same file */ struct stat stat; /* filesystem information when loaded/saved, used to detect changes outside the editor */ int refcount; /* how many windows are displaying this file? (always >= 1) */ Mark marks[VIS_MARK_INVALID]; /* marks which are shared across windows */ + enum TextSaveMethod save_method; /* whether the file is saved using rename(2) or overwritten */ File *next, *prev; }; |
