aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSeth Jackson <sethjackson@gmail.com>2016-01-13 21:08:32 -0500
committerSeth Jackson <sethjackson@gmail.com>2016-01-14 13:13:32 -0500
commit62d137ce09692e7c85a489fce6ae07a7c7ad004c (patch)
treeec525228cc6065c2b3daa223f9ae6d99e1376dff
parentbf7bc4dcf0023eb493c0b1d7860e72f3dcd04d78 (diff)
downloadrneovim-62d137ce09692e7c85a489fce6ae07a7c7ad004c.tar.gz
rneovim-62d137ce09692e7c85a489fce6ae07a7c7ad004c.tar.bz2
rneovim-62d137ce09692e7c85a489fce6ae07a7c7ad004c.zip
Remove swapsync.
It's complete overkill.
-rw-r--r--runtime/doc/options.txt15
-rw-r--r--runtime/doc/quickref.txt1
-rw-r--r--runtime/doc/recover.txt5
-rw-r--r--runtime/doc/usr_11.txt1
-rw-r--r--runtime/doc/vim_diff.txt1
-rw-r--r--runtime/optwin.vim2
-rw-r--r--src/nvim/memfile.c8
-rw-r--r--src/nvim/option_defs.h41
-rw-r--r--src/nvim/options.lua7
9 files changed, 27 insertions, 54 deletions
diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt
index 718125d9dc..11ca87fb2d 100644
--- a/runtime/doc/options.txt
+++ b/runtime/doc/options.txt
@@ -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
mode, so it may be undesirable in some situations. Be warned that
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' 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
immediately deleted. When 'swapfile' is set, and 'updatecount' is
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,
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|.
*'swapsync'* *'sws'*
-'swapsync' 'sws' string (default "fsync")
- 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.
+'swapsync' 'sws' Removed. |vim-differences| {Nvim}
*'switchbuf'* *'swb'*
'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
created for all buffers that have 'swapfile' set. When 'updatecount'
is set to zero, existing swap files are not deleted.
- Also see |'swapsync'|.
This option has no meaning in buffers where |'buftype'| is "nofile"
or "nowrite".
diff --git a/runtime/doc/quickref.txt b/runtime/doc/quickref.txt
index 1346a83fdd..0280db2503 100644
--- a/runtime/doc/quickref.txt
+++ b/runtime/doc/quickref.txt
@@ -873,7 +873,6 @@ Short explanation of each option: *option-list*
'suffixes' 'su' suffixes that are ignored with multiple match
'suffixesadd' 'sua' suffixes added when searching for a file
'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
'synmaxcol' 'smc' maximum column to find syntax items
'syntax' 'syn' syntax to be loaded for current buffer
diff --git a/runtime/doc/recover.txt b/runtime/doc/recover.txt
index 34a579f499..0c65b243b1 100644
--- a/runtime/doc/recover.txt
+++ b/runtime/doc/recover.txt
@@ -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
change the 200 character count with the 'updatecount' option. You can set
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
-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.
+After writing to the swap file Vim syncs the file to disk.
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
diff --git a/runtime/doc/usr_11.txt b/runtime/doc/usr_11.txt
index 2a810af6c2..1a72c300d7 100644
--- a/runtime/doc/usr_11.txt
+++ b/runtime/doc/usr_11.txt
@@ -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
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.
'maxmem' Limit for memory usage before writing text to the swap file.
'maxmemtot' Same, but for all files in total.
diff --git a/runtime/doc/vim_diff.txt b/runtime/doc/vim_diff.txt
index a1d7c7d62c..f6e240a00c 100644
--- a/runtime/doc/vim_diff.txt
+++ b/runtime/doc/vim_diff.txt
@@ -203,6 +203,7 @@ Other options:
'restorescreen'
'shelltype'
'shortname'
+ 'swapsync'
'termencoding' (Vim 7.4.852 also removed this for Windows)
'textauto'
'textmode'
diff --git a/runtime/optwin.vim b/runtime/optwin.vim
index 03e44abeb3..a092f18d23 100644
--- a/runtime/optwin.vim
+++ b/runtime/optwin.vim
@@ -972,8 +972,6 @@ call <SID>OptionG("dir", &dir)
call append("$", "swapfile\tuse a swap file for this buffer")
call append("$", "\t(local to buffer)")
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("$", " \tset uc=" . &uc)
call append("$", "updatetime\ttime in msec after which the swap file will be updated")
diff --git a/src/nvim/memfile.c b/src/nvim/memfile.c
index 9f5e4247b5..137c7c49d3 100644
--- a/src/nvim/memfile.c
+++ b/src/nvim/memfile.c
@@ -459,11 +459,9 @@ int mf_sync(memfile_T *mfp, int flags)
if (hp == NULL || status == FAIL)
mfp->mf_dirty = false;
- if ((flags & MFS_FLUSH) && *p_sws != NUL) {
- if (STRCMP(p_sws, "fsync") == 0) {
- if (os_fsync(mfp->mf_fd)) {
- status = FAIL;
- }
+ if (flags & MFS_FLUSH) {
+ if (os_fsync(mfp->mf_fd)) {
+ status = FAIL;
}
}
diff --git a/src/nvim/option_defs.h b/src/nvim/option_defs.h
index 938aa9bc83..7a837de45c 100644
--- a/src/nvim/option_defs.h
+++ b/src/nvim/option_defs.h
@@ -535,27 +535,26 @@ EXTERN int p_stmp; /* 'shelltemp' */
#ifdef BACKSLASH_IN_FILENAME
EXTERN int p_ssl; /* 'shellslash' */
#endif
-EXTERN char_u *p_stl; /* 'statusline' */
-EXTERN int p_sr; /* 'shiftround' */
-EXTERN char_u *p_shm; /* 'shortmess' */
-EXTERN char_u *p_sbr; /* 'showbreak' */
-EXTERN int p_sc; /* 'showcmd' */
-EXTERN int p_sft; /* 'showfulltag' */
-EXTERN int p_sm; /* 'showmatch' */
-EXTERN int p_smd; /* 'showmode' */
-EXTERN long p_ss; /* 'sidescroll' */
-EXTERN long p_siso; /* 'sidescrolloff' */
-EXTERN int p_scs; /* 'smartcase' */
-EXTERN int p_sta; /* 'smarttab' */
-EXTERN int p_sb; /* 'splitbelow' */
-EXTERN long p_tpm; /* 'tabpagemax' */
-EXTERN char_u *p_tal; /* 'tabline' */
-EXTERN char_u *p_sps; /* 'spellsuggest' */
-EXTERN int p_spr; /* 'splitright' */
-EXTERN int p_sol; /* 'startofline' */
-EXTERN char_u *p_su; /* 'suffixes' */
-EXTERN char_u *p_sws; /* 'swapsync' */
-EXTERN char_u *p_swb; /* 'switchbuf' */
+EXTERN char_u *p_stl; // 'statusline'
+EXTERN int p_sr; // 'shiftround'
+EXTERN char_u *p_shm; // 'shortmess'
+EXTERN char_u *p_sbr; // 'showbreak'
+EXTERN int p_sc; // 'showcmd'
+EXTERN int p_sft; // 'showfulltag'
+EXTERN int p_sm; // 'showmatch'
+EXTERN int p_smd; // 'showmode'
+EXTERN long p_ss; // 'sidescroll'
+EXTERN long p_siso; // 'sidescrolloff'
+EXTERN int p_scs; // 'smartcase'
+EXTERN int p_sta; // 'smarttab'
+EXTERN int p_sb; // 'splitbelow'
+EXTERN long p_tpm; // 'tabpagemax'
+EXTERN char_u *p_tal; // 'tabline'
+EXTERN char_u *p_sps; // 'spellsuggest'
+EXTERN int p_spr; // 'splitright'
+EXTERN int p_sol; // 'startofline'
+EXTERN char_u *p_su; // 'suffixes'
+EXTERN char_u *p_swb; // 'switchbuf'
EXTERN unsigned swb_flags;
#ifdef IN_OPTION_C
static char *(p_swb_values[]) = {"useopen", "usetab", "split", "newtab", NULL};
diff --git a/src/nvim/options.lua b/src/nvim/options.lua
index cdac6ffd5c..dd959c1ece 100644
--- a/src/nvim/options.lua
+++ b/src/nvim/options.lua
@@ -2297,13 +2297,6 @@ return {
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',
type='string', list='comma', scope={'global'},
deny_duplicates=true,