From b531213d198405ba0ff1a2982d8b258fb10d7697 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Andr=C3=A9=20Tanner?= Date: Wed, 14 Dec 2016 13:37:47 +0100 Subject: 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`. --- vis-core.h | 1 + 1 file changed, 1 insertion(+) (limited to 'vis-core.h') diff --git a/vis-core.h b/vis-core.h index 842c753..f6999dc 100644 --- a/vis-core.h +++ b/vis-core.h @@ -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; }; -- cgit v1.2.3