aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean Dewar <seandewar@users.noreply.github.com>2023-08-24 13:29:40 +0100
committerGitHub <noreply@github.com>2023-08-24 13:29:40 +0100
commitdaf7abbc4238dc269e22dd431bc4b1627ef9b6a1 (patch)
tree2f4c1c126c012adb16fd4eabf36a6dda00c60268
parent53170579ce14ccbd777ab36a25a230a27aa4f7bd (diff)
downloadrneovim-daf7abbc4238dc269e22dd431bc4b1627ef9b6a1.tar.gz
rneovim-daf7abbc4238dc269e22dd431bc4b1627ef9b6a1.tar.bz2
rneovim-daf7abbc4238dc269e22dd431bc4b1627ef9b6a1.zip
docs(builtin): small fixes (#24861)
Also make gen_eval_files.lua render vimdoc helpExamples properly if the line begins with the `>` marker.
-rw-r--r--runtime/doc/builtin.txt9
-rw-r--r--runtime/lua/vim/_meta/vimfn.lua5
-rwxr-xr-xscripts/gen_eval_files.lua2
-rw-r--r--src/nvim/eval.lua5
4 files changed, 10 insertions, 11 deletions
diff --git a/runtime/doc/builtin.txt b/runtime/doc/builtin.txt
index 75f6cd4313..67a6b8df9c 100644
--- a/runtime/doc/builtin.txt
+++ b/runtime/doc/builtin.txt
@@ -3211,7 +3211,7 @@ has({feature}) *has()*
clipboard |clipboard| provider is available.
fname_case Case in file names matters (for Darwin and MS-Windows
this is not present).
- gui_running Nvim has a GUI.
+ gui_running Nvim has a GUI.
iconv Can use |iconv()| for conversion.
linux Linux system.
mac MacOS system.
@@ -4950,7 +4950,7 @@ pathshorten({path} [, {len}]) *pathshorten()*
letters). Leading '~' and '.' characters are kept. Examples: >vim
echo pathshorten('~/.config/nvim/autoload/file1.vim')
< ~/.c/n/a/file1.vim ~
- >vim
+>vim
echo pathshorten('~/.config/nvim/autoload/file2.vim', 2)
< ~/.co/nv/au/file2.vim ~
It doesn't matter if the path exists or not.
@@ -7219,7 +7219,7 @@ sort({list} [, {how} [, {dict}]]) *sort()* *E70
language collate en_US.UTF8
echo sort(['n', 'o', 'O', 'ö', 'p', 'z'], 'l')
< ['n', 'o', 'O', 'ö', 'p', 'z'] ~
- >vim
+>vim
" ö is sorted after z with Swedish locale.
language collate sv_SE.UTF8
echo sort(['n', 'o', 'O', 'ö', 'p', 'z'], 'l')
@@ -7390,7 +7390,7 @@ state([{what}]) *state()*
added. E.g, this checks if the screen has scrolled: >vim
if state('s') == ''
" screen has not scrolled
-
+<
These characters indicate the state, generally indicating that
something is busy:
m halfway a mapping, :normal command, feedkeys() or
@@ -7958,7 +7958,6 @@ synconcealed({lnum}, {col}) *synconcealed()*
synconcealed(lnum, 4) [1, 'X', 2]
synconcealed(lnum, 5) [1, 'X', 2]
synconcealed(lnum, 6) [0, '', 0]
-<
synstack({lnum}, {col}) *synstack()*
Return a |List|, which is the stack of syntax items at the
diff --git a/runtime/lua/vim/_meta/vimfn.lua b/runtime/lua/vim/_meta/vimfn.lua
index 255f49ba3f..0ac8985274 100644
--- a/runtime/lua/vim/_meta/vimfn.lua
+++ b/runtime/lua/vim/_meta/vimfn.lua
@@ -3853,7 +3853,7 @@ function vim.fn.globpath(path, expr, nosuf, list, allinks) end
--- clipboard |clipboard| provider is available.
--- fname_case Case in file names matters (for Darwin and MS-Windows
--- this is not present).
---- gui_running Nvim has a GUI.
+--- gui_running Nvim has a GUI.
--- iconv Can use |iconv()| for conversion.
--- linux Linux system.
--- mac MacOS system.
@@ -8765,7 +8765,7 @@ function vim.fn.srand(expr) end
--- added. E.g, this checks if the screen has scrolled: >vim
--- if state('s') == ''
--- " screen has not scrolled
----
+--- <
--- These characters indicate the state, generally indicating that
--- something is busy:
--- m halfway a mapping, :normal command, feedkeys() or
@@ -9446,7 +9446,6 @@ function vim.fn.synIDtrans(synID) end
--- synconcealed(lnum, 4) [1, 'X', 2]
--- synconcealed(lnum, 5) [1, 'X', 2]
--- synconcealed(lnum, 6) [0, '', 0]
---- <
---
--- @param lnum integer
--- @param col integer
diff --git a/scripts/gen_eval_files.lua b/scripts/gen_eval_files.lua
index e41054ed65..f8d69ce313 100755
--- a/scripts/gen_eval_files.lua
+++ b/scripts/gen_eval_files.lua
@@ -437,6 +437,8 @@ local function render_eval_doc(f, fun, write)
l = l:gsub('^ ', '')
if vim.startswith(l, '<') and not l:match('^<[^ \t]+>') then
write('<\t\t' .. l:sub(2))
+ elseif l:match('^>[a-z0-9]*$') then
+ write(l)
else
write('\t\t' .. l)
end
diff --git a/src/nvim/eval.lua b/src/nvim/eval.lua
index 6d12e14f3c..d5dff3d70d 100644
--- a/src/nvim/eval.lua
+++ b/src/nvim/eval.lua
@@ -4730,7 +4730,7 @@ M.funcs = {
clipboard |clipboard| provider is available.
fname_case Case in file names matters (for Darwin and MS-Windows
this is not present).
- gui_running Nvim has a GUI.
+ gui_running Nvim has a GUI.
iconv Can use |iconv()| for conversion.
linux Linux system.
mac MacOS system.
@@ -10482,7 +10482,7 @@ M.funcs = {
added. E.g, this checks if the screen has scrolled: >vim
if state('s') == ''
" screen has not scrolled
-
+ <
These characters indicate the state, generally indicating that
something is busy:
m halfway a mapping, :normal command, feedkeys() or
@@ -11255,7 +11255,6 @@ M.funcs = {
synconcealed(lnum, 4) [1, 'X', 2]
synconcealed(lnum, 5) [1, 'X', 2]
synconcealed(lnum, 6) [0, '', 0]
- <
]=],
name = 'synconcealed',
params = { { 'lnum', 'integer' }, { 'col', 'integer' } },