docs(builtin): small fixes (#24861)

Also make gen_eval_files.lua render vimdoc helpExamples properly if the line
begins with the `>` marker.
This commit is contained in:
Sean Dewar
2023-08-24 13:29:40 +01:00
committed by GitHub
parent 53170579ce
commit daf7abbc42
4 changed files with 10 additions and 11 deletions

View File

@@ -7390,7 +7390,7 @@ state([{what}]) *state()*
added. E.g, this checks if the screen has scrolled: >vim added. E.g, this checks if the screen has scrolled: >vim
if state('s') == '' if state('s') == ''
" screen has not scrolled " screen has not scrolled
<
These characters indicate the state, generally indicating that These characters indicate the state, generally indicating that
something is busy: something is busy:
m halfway a mapping, :normal command, feedkeys() or m halfway a mapping, :normal command, feedkeys() or
@@ -7958,7 +7958,6 @@ synconcealed({lnum}, {col}) *synconcealed()*
synconcealed(lnum, 4) [1, 'X', 2] synconcealed(lnum, 4) [1, 'X', 2]
synconcealed(lnum, 5) [1, 'X', 2] synconcealed(lnum, 5) [1, 'X', 2]
synconcealed(lnum, 6) [0, '', 0] synconcealed(lnum, 6) [0, '', 0]
<
synstack({lnum}, {col}) *synstack()* synstack({lnum}, {col}) *synstack()*
Return a |List|, which is the stack of syntax items at the Return a |List|, which is the stack of syntax items at the

View File

@@ -8765,7 +8765,7 @@ function vim.fn.srand(expr) end
--- added. E.g, this checks if the screen has scrolled: >vim --- added. E.g, this checks if the screen has scrolled: >vim
--- if state('s') == '' --- if state('s') == ''
--- " screen has not scrolled --- " screen has not scrolled
--- --- <
--- These characters indicate the state, generally indicating that --- These characters indicate the state, generally indicating that
--- something is busy: --- something is busy:
--- m halfway a mapping, :normal command, feedkeys() or --- 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, 4) [1, 'X', 2]
--- synconcealed(lnum, 5) [1, 'X', 2] --- synconcealed(lnum, 5) [1, 'X', 2]
--- synconcealed(lnum, 6) [0, '', 0] --- synconcealed(lnum, 6) [0, '', 0]
--- <
--- ---
--- @param lnum integer --- @param lnum integer
--- @param col integer --- @param col integer

View File

@@ -437,6 +437,8 @@ local function render_eval_doc(f, fun, write)
l = l:gsub('^ ', '') l = l:gsub('^ ', '')
if vim.startswith(l, '<') and not l:match('^<[^ \t]+>') then if vim.startswith(l, '<') and not l:match('^<[^ \t]+>') then
write('<\t\t' .. l:sub(2)) write('<\t\t' .. l:sub(2))
elseif l:match('^>[a-z0-9]*$') then
write(l)
else else
write('\t\t' .. l) write('\t\t' .. l)
end end

View File

@@ -10482,7 +10482,7 @@ M.funcs = {
added. E.g, this checks if the screen has scrolled: >vim added. E.g, this checks if the screen has scrolled: >vim
if state('s') == '' if state('s') == ''
" screen has not scrolled " screen has not scrolled
<
These characters indicate the state, generally indicating that These characters indicate the state, generally indicating that
something is busy: something is busy:
m halfway a mapping, :normal command, feedkeys() or m halfway a mapping, :normal command, feedkeys() or
@@ -11255,7 +11255,6 @@ M.funcs = {
synconcealed(lnum, 4) [1, 'X', 2] synconcealed(lnum, 4) [1, 'X', 2]
synconcealed(lnum, 5) [1, 'X', 2] synconcealed(lnum, 5) [1, 'X', 2]
synconcealed(lnum, 6) [0, '', 0] synconcealed(lnum, 6) [0, '', 0]
<
]=], ]=],
name = 'synconcealed', name = 'synconcealed',
params = { { 'lnum', 'integer' }, { 'col', 'integer' } }, params = { { 'lnum', 'integer' }, { 'col', 'integer' } },