aboutsummaryrefslogtreecommitdiff
path: root/vis-cmds.c
diff options
context:
space:
mode:
Diffstat (limited to 'vis-cmds.c')
-rw-r--r--vis-cmds.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/vis-cmds.c b/vis-cmds.c
index bc42268..a220c33 100644
--- a/vis-cmds.c
+++ b/vis-cmds.c
@@ -248,6 +248,21 @@ static bool cmd_set(Vis *vis, Win *win, Command *cmd, const char *argv[], Cursor
case OPTION_HORIZON:
win->horizon = arg.i;
break;
+ case OPTION_SAVE_METHOD:
+ if (strcmp("auto", arg.s) == 0) {
+ win->file->save_method = TEXT_SAVE_AUTO;
+ } else if (strcmp("atomic", arg.s) == 0) {
+ win->file->save_method = TEXT_SAVE_ATOMIC;
+ } else if (strcmp("inplace", arg.s) == 0) {
+ win->file->save_method = TEXT_SAVE_INPLACE;
+ } else {
+ vis_info_show(vis, "Invalid save method `%s', expected "
+ "'auto', 'atomic' or 'inplace'", arg.s);
+ return false;
+ }
+ break;
+ default:
+ return false;
}
return true;