summaryrefslogtreecommitdiffstatshomepage
path: root/runtime/lua/vim/_meta/options.gen.lua
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2026-04-22 11:01:43 +0800
committerGitHub <noreply@github.com>2026-04-22 11:01:43 +0800
commit56fb9ed82de5082f2ce2ff869fdca42225a0204e (patch)
treeab817505804e15d855741d930499c7b6275a86d2 /runtime/lua/vim/_meta/options.gen.lua
parent1569a71c8a51287628cb5257e45d2e68f1181551 (diff)
parent25b7fe5ada09a987352298f3674dc36f6409ece8 (diff)
Merge pull request #39248 from zeertzjq/vim-9.2.0356
vim-patch: 'scrolloffpad'
Diffstat (limited to 'runtime/lua/vim/_meta/options.gen.lua')
-rw-r--r--runtime/lua/vim/_meta/options.gen.lua30
1 files changed, 28 insertions, 2 deletions
diff --git a/runtime/lua/vim/_meta/options.gen.lua b/runtime/lua/vim/_meta/options.gen.lua
index 3842c9a56d..38fdaa774c 100644
--- a/runtime/lua/vim/_meta/options.gen.lua
+++ b/runtime/lua/vim/_meta/options.gen.lua
@@ -5488,8 +5488,8 @@ vim.go.sj = vim.go.scrolljump
--- Minimal number of screen lines to keep above and below the cursor.
--- This will make some context visible around where you are working. If
--- you set it to a very large value (999) the cursor line will always be
---- in the middle of the window (except at the start or end of the file or
---- when long lines wrap).
+--- in the middle of the window (except at the start or end of the file,
+--- see 'scrolloffpad', or when long lines wrap).
--- After using the local value, go back the global value with one of
--- these two:
---
@@ -5507,6 +5507,32 @@ vim.wo.so = vim.wo.scrolloff
vim.go.scrolloff = vim.o.scrolloff
vim.go.so = vim.go.scrolloff
+--- When 'scrolloff' and 'scrolloffpad' are greater than zero, allow
+--- the cursor to remain centered when at the end of the file.
+--- Normally, 'scrolloff' will not keep the cursor centered at the
+--- end of the file.
+---
+--- A value of 0 disables this feature. Any value above 0 enables it.
+--- For a window-local value, -1 means to use the global value.
+--- Values below -1 are invalid.
+---
+--- After using the local value, go back the global value with one of
+--- these two:
+---
+--- ```vim
+--- setlocal scrolloffpad<
+--- setlocal scrolloffpad=-1
+--- ```
+---
+---
+--- @type integer
+vim.o.scrolloffpad = 0
+vim.o.sop = vim.o.scrolloffpad
+vim.wo.scrolloffpad = vim.o.scrolloffpad
+vim.wo.sop = vim.wo.scrolloffpad
+vim.go.scrolloffpad = vim.o.scrolloffpad
+vim.go.sop = vim.go.scrolloffpad
+
--- This is a comma-separated list of words that specifies how
--- 'scrollbind' windows should behave. 'sbo' stands for ScrollBind
--- Options.