aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2025-04-05 06:01:40 -0700
committerGitHub <noreply@github.com>2025-04-05 06:01:40 -0700
commit57d99a515f57454370b6c122545ea53685d22d1b (patch)
tree5e64895a115ed130904d04ecdafb030f14f5e19b /src
parente8785c2e94508eeabf6ff63e1fe1bcaecceef946 (diff)
downloadrneovim-57d99a515f57454370b6c122545ea53685d22d1b.tar.gz
rneovim-57d99a515f57454370b6c122545ea53685d22d1b.tar.bz2
rneovim-57d99a515f57454370b6c122545ea53685d22d1b.zip
docs: clipboard, eval #33223
Diffstat (limited to 'src')
-rw-r--r--src/nvim/eval.lua36
-rw-r--r--src/nvim/options.lua8
2 files changed, 22 insertions, 22 deletions
diff --git a/src/nvim/eval.lua b/src/nvim/eval.lua
index 9f662c6457..6b4c88f071 100644
--- a/src/nvim/eval.lua
+++ b/src/nvim/eval.lua
@@ -13185,16 +13185,14 @@ M.funcs = {
args = 1,
base = 1,
desc = [=[
- 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."
<
-
]=],
name = 'winheight',
params = { { 'nr', 'integer' } },
@@ -13377,19 +13375,21 @@ M.funcs = {
args = 1,
base = 1,
desc = [=[
- 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.
]=],
name = 'winwidth',
params = { { 'nr', 'integer' } },
diff --git a/src/nvim/options.lua b/src/nvim/options.lua
index a5171ed58b..cdec78513a 100644
--- a/src/nvim/options.lua
+++ b/src/nvim/options.lua
@@ -10263,13 +10263,13 @@ local options = {
desc = [=[
Defines the default border style of floating windows. The default value
is empty, which is equivalent to "none". Valid values include:
+ - "bold": Bold line box.
+ - "double": Double-line box.
- "none": No border.
- - "single": A single line box.
- - "double": A double line box.
- "rounded": Like "single", but with rounded corners ("╭" etc.).
+ - "shadow": Drop shadow effect, by blending with the background.
+ - "single": Single-line box.
- "solid": Adds padding by a single whitespace cell.
- - "shadow": A drop shadow effect by blending with the background.
- - "bold": A bold line box.
]=],
full_name = 'winborder',
scope = { 'global' },