mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
parent
dc8b0c47b1
commit
0bcc2bf126
@ -901,7 +901,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
|||||||
again not rename the file.
|
again not rename the file.
|
||||||
|
|
||||||
*'backupdir'* *'bdir'*
|
*'backupdir'* *'bdir'*
|
||||||
'backupdir' 'bdir' string (default "$XDG_DATA_HOME/nvim/backup")
|
'backupdir' 'bdir' string (default ".,$XDG_DATA_HOME/nvim/backup")
|
||||||
global
|
global
|
||||||
List of directories for the backup file, separated with commas.
|
List of directories for the backup file, separated with commas.
|
||||||
- The backup file will be created in the first directory in the list
|
- The backup file will be created in the first directory in the list
|
||||||
|
@ -685,9 +685,13 @@ void set_init_1(void)
|
|||||||
#endif
|
#endif
|
||||||
false);
|
false);
|
||||||
|
|
||||||
|
char *backupdir = stdpaths_user_data_subpath("backup", 0);
|
||||||
|
const size_t backupdir_len = strlen(backupdir);
|
||||||
|
backupdir = xrealloc(backupdir, backupdir_len + 3);
|
||||||
|
memmove(backupdir + 2, backupdir, backupdir_len + 1);
|
||||||
|
memmove(backupdir, ".,", 2);
|
||||||
set_string_default("viewdir", stdpaths_user_data_subpath("view", 0), true);
|
set_string_default("viewdir", stdpaths_user_data_subpath("view", 0), true);
|
||||||
set_string_default("backupdir", stdpaths_user_data_subpath("backup", 0),
|
set_string_default("backupdir", backupdir, true);
|
||||||
true);
|
|
||||||
set_string_default("directory", stdpaths_user_data_subpath("swap", 2), true);
|
set_string_default("directory", stdpaths_user_data_subpath("swap", 2), true);
|
||||||
set_string_default("undodir", stdpaths_user_data_subpath("undo", 0), true);
|
set_string_default("undodir", stdpaths_user_data_subpath("undo", 0), true);
|
||||||
// Set default for &runtimepath. All necessary expansions are performed in
|
// Set default for &runtimepath. All necessary expansions are performed in
|
||||||
|
Loading…
Reference in New Issue
Block a user