mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
Remove swapsync.
It's complete overkill.
This commit is contained in:
parent
bf7bc4dcf0
commit
62d137ce09
@ -2812,7 +2812,6 @@ A jump table for the options with a short description can be found at |Q_op|.
|
|||||||
will force the harddrive to spin up on Linux systems running in laptop
|
will force the harddrive to spin up on Linux systems running in laptop
|
||||||
mode, so it may be undesirable in some situations. Be warned that
|
mode, so it may be undesirable in some situations. Be warned that
|
||||||
turning this off increases the chances of data loss after a crash.
|
turning this off increases the chances of data loss after a crash.
|
||||||
Also see 'swapsync' for controlling fsync() on swap files.
|
|
||||||
|
|
||||||
*'gdefault'* *'gd'* *'nogdefault'* *'nogd'*
|
*'gdefault'* *'gd'* *'nogdefault'* *'nogd'*
|
||||||
'gdefault' 'gd' boolean (default off)
|
'gdefault' 'gd' boolean (default off)
|
||||||
@ -6204,7 +6203,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
|||||||
When 'swapfile' is reset, the swap file for the current buffer is
|
When 'swapfile' is reset, the swap file for the current buffer is
|
||||||
immediately deleted. When 'swapfile' is set, and 'updatecount' is
|
immediately deleted. When 'swapfile' is set, and 'updatecount' is
|
||||||
non-zero, a swap file is immediately created.
|
non-zero, a swap file is immediately created.
|
||||||
Also see |swap-file| and |'swapsync'|.
|
Also see |swap-file|.
|
||||||
If you want to open a new buffer without creating a swap file for it,
|
If you want to open a new buffer without creating a swap file for it,
|
||||||
use the |:noswapfile| modifier.
|
use the |:noswapfile| modifier.
|
||||||
|
|
||||||
@ -6212,16 +6211,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
|||||||
specify special kinds of buffers. See |special-buffers|.
|
specify special kinds of buffers. See |special-buffers|.
|
||||||
|
|
||||||
*'swapsync'* *'sws'*
|
*'swapsync'* *'sws'*
|
||||||
'swapsync' 'sws' string (default "fsync")
|
'swapsync' 'sws' Removed. |vim-differences| {Nvim}
|
||||||
global
|
|
||||||
When this option is not empty a swap file is synced to disk after
|
|
||||||
writing to it. This takes some time, especially on busy Unix systems.
|
|
||||||
When this option is empty parts of the swap file may be in memory and
|
|
||||||
not written to disk. When the system crashes you may lose more work.
|
|
||||||
On Unix the system does a sync now and then without Vim asking for it,
|
|
||||||
so the disadvantage of setting this option off is small. On some
|
|
||||||
systems the swap file will not be written at all.
|
|
||||||
The 'fsync' option is used for the actual file.
|
|
||||||
|
|
||||||
*'switchbuf'* *'swb'*
|
*'switchbuf'* *'swb'*
|
||||||
'switchbuf' 'swb' string (default "")
|
'switchbuf' 'swb' string (default "")
|
||||||
@ -6708,7 +6698,6 @@ A jump table for the options with a short description can be found at |Q_op|.
|
|||||||
When 'updatecount' is set from zero to non-zero, swap files are
|
When 'updatecount' is set from zero to non-zero, swap files are
|
||||||
created for all buffers that have 'swapfile' set. When 'updatecount'
|
created for all buffers that have 'swapfile' set. When 'updatecount'
|
||||||
is set to zero, existing swap files are not deleted.
|
is set to zero, existing swap files are not deleted.
|
||||||
Also see |'swapsync'|.
|
|
||||||
This option has no meaning in buffers where |'buftype'| is "nofile"
|
This option has no meaning in buffers where |'buftype'| is "nofile"
|
||||||
or "nowrite".
|
or "nowrite".
|
||||||
|
|
||||||
|
@ -873,7 +873,6 @@ Short explanation of each option: *option-list*
|
|||||||
'suffixes' 'su' suffixes that are ignored with multiple match
|
'suffixes' 'su' suffixes that are ignored with multiple match
|
||||||
'suffixesadd' 'sua' suffixes added when searching for a file
|
'suffixesadd' 'sua' suffixes added when searching for a file
|
||||||
'swapfile' 'swf' whether to use a swapfile for a buffer
|
'swapfile' 'swf' whether to use a swapfile for a buffer
|
||||||
'swapsync' 'sws' how to sync the swap file
|
|
||||||
'switchbuf' 'swb' sets behavior when switching to another buffer
|
'switchbuf' 'swb' sets behavior when switching to another buffer
|
||||||
'synmaxcol' 'smc' maximum column to find syntax items
|
'synmaxcol' 'smc' maximum column to find syntax items
|
||||||
'syntax' 'syn' syntax to be loaded for current buffer
|
'syntax' 'syn' syntax to be loaded for current buffer
|
||||||
|
@ -92,10 +92,7 @@ changed, not when you only moved around. The reason why it is not kept up to
|
|||||||
date all the time is that this would slow down normal work too much. You can
|
date all the time is that this would slow down normal work too much. You can
|
||||||
change the 200 character count with the 'updatecount' option. You can set
|
change the 200 character count with the 'updatecount' option. You can set
|
||||||
the time with the 'updatetime' option. The time is given in milliseconds.
|
the time with the 'updatetime' option. The time is given in milliseconds.
|
||||||
After writing to the swap file Vim syncs the file to disk. This takes some
|
After writing to the swap file Vim syncs the file to disk.
|
||||||
time, especially on busy Unix systems. If you don't want this you can set the
|
|
||||||
'swapsync' option to an empty string. The risk of losing work becomes bigger
|
|
||||||
though.
|
|
||||||
|
|
||||||
If the writing to the swap file is not wanted, it can be switched off by
|
If the writing to the swap file is not wanted, it can be switched off by
|
||||||
setting the 'updatecount' option to 0. The same is done when starting Vim
|
setting the 'updatecount' option to 0. The same is done when starting Vim
|
||||||
|
@ -293,7 +293,6 @@ If you really don't want to see this message, you can add the 'A' flag to the
|
|||||||
'updatecount' Number of key strokes after which the swap file is flushed to
|
'updatecount' Number of key strokes after which the swap file is flushed to
|
||||||
disk.
|
disk.
|
||||||
'updatetime' Timeout after which the swap file is flushed to disk.
|
'updatetime' Timeout after which the swap file is flushed to disk.
|
||||||
'swapsync' Whether the disk is synced when the swap file is flushed.
|
|
||||||
'directory' List of directory names where to store the swap file.
|
'directory' List of directory names where to store the swap file.
|
||||||
'maxmem' Limit for memory usage before writing text to the swap file.
|
'maxmem' Limit for memory usage before writing text to the swap file.
|
||||||
'maxmemtot' Same, but for all files in total.
|
'maxmemtot' Same, but for all files in total.
|
||||||
|
@ -203,6 +203,7 @@ Other options:
|
|||||||
'restorescreen'
|
'restorescreen'
|
||||||
'shelltype'
|
'shelltype'
|
||||||
'shortname'
|
'shortname'
|
||||||
|
'swapsync'
|
||||||
'termencoding' (Vim 7.4.852 also removed this for Windows)
|
'termencoding' (Vim 7.4.852 also removed this for Windows)
|
||||||
'textauto'
|
'textauto'
|
||||||
'textmode'
|
'textmode'
|
||||||
|
@ -972,8 +972,6 @@ call <SID>OptionG("dir", &dir)
|
|||||||
call append("$", "swapfile\tuse a swap file for this buffer")
|
call append("$", "swapfile\tuse a swap file for this buffer")
|
||||||
call append("$", "\t(local to buffer)")
|
call append("$", "\t(local to buffer)")
|
||||||
call <SID>BinOptionL("swf")
|
call <SID>BinOptionL("swf")
|
||||||
call append("$", "swapsync\t\"sync\", \"fsync\" or empty; how to flush a swap file to disk")
|
|
||||||
call <SID>OptionG("sws", &sws)
|
|
||||||
call append("$", "updatecount\tnumber of characters typed to cause a swap file update")
|
call append("$", "updatecount\tnumber of characters typed to cause a swap file update")
|
||||||
call append("$", " \tset uc=" . &uc)
|
call append("$", " \tset uc=" . &uc)
|
||||||
call append("$", "updatetime\ttime in msec after which the swap file will be updated")
|
call append("$", "updatetime\ttime in msec after which the swap file will be updated")
|
||||||
|
@ -459,11 +459,9 @@ int mf_sync(memfile_T *mfp, int flags)
|
|||||||
if (hp == NULL || status == FAIL)
|
if (hp == NULL || status == FAIL)
|
||||||
mfp->mf_dirty = false;
|
mfp->mf_dirty = false;
|
||||||
|
|
||||||
if ((flags & MFS_FLUSH) && *p_sws != NUL) {
|
if (flags & MFS_FLUSH) {
|
||||||
if (STRCMP(p_sws, "fsync") == 0) {
|
if (os_fsync(mfp->mf_fd)) {
|
||||||
if (os_fsync(mfp->mf_fd)) {
|
status = FAIL;
|
||||||
status = FAIL;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -535,27 +535,26 @@ EXTERN int p_stmp; /* 'shelltemp' */
|
|||||||
#ifdef BACKSLASH_IN_FILENAME
|
#ifdef BACKSLASH_IN_FILENAME
|
||||||
EXTERN int p_ssl; /* 'shellslash' */
|
EXTERN int p_ssl; /* 'shellslash' */
|
||||||
#endif
|
#endif
|
||||||
EXTERN char_u *p_stl; /* 'statusline' */
|
EXTERN char_u *p_stl; // 'statusline'
|
||||||
EXTERN int p_sr; /* 'shiftround' */
|
EXTERN int p_sr; // 'shiftround'
|
||||||
EXTERN char_u *p_shm; /* 'shortmess' */
|
EXTERN char_u *p_shm; // 'shortmess'
|
||||||
EXTERN char_u *p_sbr; /* 'showbreak' */
|
EXTERN char_u *p_sbr; // 'showbreak'
|
||||||
EXTERN int p_sc; /* 'showcmd' */
|
EXTERN int p_sc; // 'showcmd'
|
||||||
EXTERN int p_sft; /* 'showfulltag' */
|
EXTERN int p_sft; // 'showfulltag'
|
||||||
EXTERN int p_sm; /* 'showmatch' */
|
EXTERN int p_sm; // 'showmatch'
|
||||||
EXTERN int p_smd; /* 'showmode' */
|
EXTERN int p_smd; // 'showmode'
|
||||||
EXTERN long p_ss; /* 'sidescroll' */
|
EXTERN long p_ss; // 'sidescroll'
|
||||||
EXTERN long p_siso; /* 'sidescrolloff' */
|
EXTERN long p_siso; // 'sidescrolloff'
|
||||||
EXTERN int p_scs; /* 'smartcase' */
|
EXTERN int p_scs; // 'smartcase'
|
||||||
EXTERN int p_sta; /* 'smarttab' */
|
EXTERN int p_sta; // 'smarttab'
|
||||||
EXTERN int p_sb; /* 'splitbelow' */
|
EXTERN int p_sb; // 'splitbelow'
|
||||||
EXTERN long p_tpm; /* 'tabpagemax' */
|
EXTERN long p_tpm; // 'tabpagemax'
|
||||||
EXTERN char_u *p_tal; /* 'tabline' */
|
EXTERN char_u *p_tal; // 'tabline'
|
||||||
EXTERN char_u *p_sps; /* 'spellsuggest' */
|
EXTERN char_u *p_sps; // 'spellsuggest'
|
||||||
EXTERN int p_spr; /* 'splitright' */
|
EXTERN int p_spr; // 'splitright'
|
||||||
EXTERN int p_sol; /* 'startofline' */
|
EXTERN int p_sol; // 'startofline'
|
||||||
EXTERN char_u *p_su; /* 'suffixes' */
|
EXTERN char_u *p_su; // 'suffixes'
|
||||||
EXTERN char_u *p_sws; /* 'swapsync' */
|
EXTERN char_u *p_swb; // 'switchbuf'
|
||||||
EXTERN char_u *p_swb; /* 'switchbuf' */
|
|
||||||
EXTERN unsigned swb_flags;
|
EXTERN unsigned swb_flags;
|
||||||
#ifdef IN_OPTION_C
|
#ifdef IN_OPTION_C
|
||||||
static char *(p_swb_values[]) = {"useopen", "usetab", "split", "newtab", NULL};
|
static char *(p_swb_values[]) = {"useopen", "usetab", "split", "newtab", NULL};
|
||||||
|
@ -2296,13 +2296,6 @@ return {
|
|||||||
varname='p_swf',
|
varname='p_swf',
|
||||||
defaults={if_true={vi=true}}
|
defaults={if_true={vi=true}}
|
||||||
},
|
},
|
||||||
{
|
|
||||||
full_name='swapsync', abbreviation='sws',
|
|
||||||
type='string', scope={'global'},
|
|
||||||
vi_def=true,
|
|
||||||
varname='p_sws',
|
|
||||||
defaults={if_true={vi="fsync"}}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
full_name='switchbuf', abbreviation='swb',
|
full_name='switchbuf', abbreviation='swb',
|
||||||
type='string', list='comma', scope={'global'},
|
type='string', list='comma', scope={'global'},
|
||||||
|
Loading…
Reference in New Issue
Block a user