diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2025-04-05 06:01:40 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-04-05 06:01:40 -0700 |
commit | 57d99a515f57454370b6c122545ea53685d22d1b (patch) | |
tree | 5e64895a115ed130904d04ecdafb030f14f5e19b /runtime/lua/vim/_meta/vimfn.lua | |
parent | e8785c2e94508eeabf6ff63e1fe1bcaecceef946 (diff) | |
download | rneovim-57d99a515f57454370b6c122545ea53685d22d1b.tar.gz rneovim-57d99a515f57454370b6c122545ea53685d22d1b.tar.bz2 rneovim-57d99a515f57454370b6c122545ea53685d22d1b.zip |
docs: clipboard, eval #33223
Diffstat (limited to 'runtime/lua/vim/_meta/vimfn.lua')
-rw-r--r-- | runtime/lua/vim/_meta/vimfn.lua | 34 |
1 files changed, 18 insertions, 16 deletions
diff --git a/runtime/lua/vim/_meta/vimfn.lua b/runtime/lua/vim/_meta/vimfn.lua index 157799f36e..3b0d51a429 100644 --- a/runtime/lua/vim/_meta/vimfn.lua +++ b/runtime/lua/vim/_meta/vimfn.lua @@ -10881,14 +10881,13 @@ function vim.fn.wincol() end --- @return string function vim.fn.windowsversion() end ---- The result is a Number, which is the height of window {nr}. ---- {nr} can be the window number or the |window-ID|. ---- When {nr} is zero, the height of the current window is ---- returned. When window {nr} doesn't exist, -1 is returned. ---- An existing window always has a height of zero or more. ---- This excludes any window toolbar line. +--- Gets the height of |window-ID| {nr} (zero for "current +--- window"), excluding any 'winbar' and 'statusline'. Returns -1 +--- if window {nr} doesn't exist. An existing window always has +--- a height of zero or more. +--- --- Examples: >vim ---- echo "The current window has " .. winheight(0) .. " lines." +--- echo "Current window has " .. winheight(0) .. " lines." --- < --- --- @param nr integer @@ -11040,18 +11039,21 @@ function vim.fn.winrestview(dict) end --- @return vim.fn.winsaveview.ret function vim.fn.winsaveview() end ---- The result is a Number, which is the width of window {nr}. ---- {nr} can be the window number or the |window-ID|. ---- When {nr} is zero, the width of the current window is ---- returned. When window {nr} doesn't exist, -1 is returned. ---- An existing window always has a width of zero or more. ---- Examples: >vim ---- echo "The current window has " .. winwidth(0) .. " columns." +--- Gets the width of |window-ID| {nr} (zero for "current +--- window"), including columns (|sign-column|, 'statuscolumn', +--- etc.). Returns -1 if window {nr} doesn't exist. An existing +--- window always has a width of zero or more. +--- +--- Example: >vim +--- echo "Current window has " .. winwidth(0) .. " columns." --- if winwidth(0) <= 50 --- 50 wincmd | --- endif ---- <For getting the terminal or screen size, see the 'columns' ---- option. +--- < +--- To get the buffer "viewport", use |getwininfo()|: >vim +--- :echo getwininfo(win_getid())[0].width - getwininfo(win_getid())[0].textoff +--- < +--- To get the Nvim screen size, see the 'columns' option. --- --- @param nr integer --- @return integer |