vim-patch:9.1.2024: 'fsync' option cannot be set per buffer (#37129)

Problem:  'fsync' option cannot be set per buffer
Solution: Make 'fsync' option global-local
          (glepnir)

closes: vim/vim#19019

4d5b303726

Co-authored-by: glepnir <glephunter@gmail.com>
This commit is contained in:
zeertzjq
2025-12-28 08:14:45 +08:00
committed by GitHub
parent ab5a92bff6
commit 1e44a001ec
10 changed files with 43 additions and 16 deletions

View File

@@ -3002,12 +3002,16 @@ vim.go.fp = vim.go.formatprg
--- - system signals low battery life
--- - Nvim exits abnormally
---
--- This is a `global-local` option, so it can be set per buffer, for
--- example when writing to a slow filesystem.
--- This option cannot be set from a `modeline` or in the `sandbox`, for
--- security reasons.
---
--- @type boolean
vim.o.fsync = true
vim.o.fs = vim.o.fsync
vim.bo.fsync = vim.o.fsync
vim.bo.fs = vim.bo.fsync
vim.go.fsync = vim.o.fsync
vim.go.fs = vim.go.fsync