aboutsummaryrefslogtreecommitdiff
path: root/runtime/doc
diff options
context:
space:
mode:
authorLewis Russell <lewis6991@gmail.com>2024-09-30 12:09:36 +0100
committerGitHub <noreply@github.com>2024-09-30 12:09:36 +0100
commit2c88cfcac42d0a4e0b1a1396539b5add807c336c (patch)
tree0301447a10df4021c0157e5e96738f4a6adbcc0d /runtime/doc
parent20251be15a4ad3f6e7016450ca3338d52b2f0951 (diff)
parent0fb5299e53cc0d7a5c03c333b1ed79262a0db3f9 (diff)
downloadrneovim-2c88cfcac42d0a4e0b1a1396539b5add807c336c.tar.gz
rneovim-2c88cfcac42d0a4e0b1a1396539b5add807c336c.tar.bz2
rneovim-2c88cfcac42d0a4e0b1a1396539b5add807c336c.zip
Merge pull request #30526 from lewis6991/fix/linematchnul
Diffstat (limited to 'runtime/doc')
-rw-r--r--runtime/doc/lua.txt28
1 files changed, 14 insertions, 14 deletions
diff --git a/runtime/doc/lua.txt b/runtime/doc/lua.txt
index 29b35d69a0..e793a97fe1 100644
--- a/runtime/doc/lua.txt
+++ b/runtime/doc/lua.txt
@@ -713,42 +713,42 @@ vim.diff({a}, {b}, {opts}) *vim.diff()*
Parameters: ~
• {a} (`string`) First string to compare
• {b} (`string`) Second string to compare
- • {opts} (`table`) Optional parameters:
- • {on_hunk}
- (`fun(start_a: integer, count_a: integer, start_b: integer, count_b: integer): integer`)
+ • {opts} (`table?`) Optional parameters:
+ • {on_hunk}?
+ (`fun(start_a: integer, count_a: integer, start_b: integer, count_b: integer): integer?`)
Invoked for each hunk in the diff. Return a negative number
to cancel the callback for any remaining hunks. Arguments:
• `start_a` (`integer`): Start line of hunk in {a}.
• `count_a` (`integer`): Hunk size in {a}.
• `start_b` (`integer`): Start line of hunk in {b}.
• `count_b` (`integer`): Hunk size in {b}.
- • {result_type} (`'unified'|'indices'`, default: `'unified'`)
+ • {result_type}? (`'unified'|'indices'`, default: `'unified'`)
Form of the returned diff:
• `unified`: String in unified format.
• `indices`: Array of hunk locations. Note: This option is
ignored if `on_hunk` is used.
- • {linematch} (`boolean|integer`) Run linematch on the
+ • {linematch}? (`boolean|integer`) Run linematch on the
resulting hunks from xdiff. When integer, only hunks upto
this size in lines are run through linematch. Requires
`result_type = indices`, ignored otherwise.
- • {algorithm} (`'myers'|'minimal'|'patience'|'histogram'`,
+ • {algorithm}? (`'myers'|'minimal'|'patience'|'histogram'`,
default: `'myers'`) Diff algorithm to use. Values:
• `myers`: the default algorithm
• `minimal`: spend extra time to generate the smallest
possible diff
• `patience`: patience diff algorithm
• `histogram`: histogram diff algorithm
- • {ctxlen} (`integer`) Context length
- • {interhunkctxlen} (`integer`) Inter hunk context length
- • {ignore_whitespace} (`boolean`) Ignore whitespace
- • {ignore_whitespace_change} (`boolean`) Ignore whitespace
+ • {ctxlen}? (`integer`) Context length
+ • {interhunkctxlen}? (`integer`) Inter hunk context length
+ • {ignore_whitespace}? (`boolean`) Ignore whitespace
+ • {ignore_whitespace_change}? (`boolean`) Ignore whitespace
change
- • {ignore_whitespace_change_at_eol} (`boolean`) Ignore
+ • {ignore_whitespace_change_at_eol}? (`boolean`) Ignore
whitespace change at end-of-line.
- • {ignore_cr_at_eol} (`boolean`) Ignore carriage return at
+ • {ignore_cr_at_eol}? (`boolean`) Ignore carriage return at
end-of-line
- • {ignore_blank_lines} (`boolean`) Ignore blank lines
- • {indent_heuristic} (`boolean`) Use the indent heuristic for
+ • {ignore_blank_lines}? (`boolean`) Ignore blank lines
+ • {indent_heuristic}? (`boolean`) Use the indent heuristic for
the internal diff library.
Return: ~