diff options
author | Jonathon <32371757+jwhite510@users.noreply.github.com> | 2022-11-04 05:07:22 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-04 09:07:22 +0000 |
commit | 04fbb1de4488852c3ba332898b17180500f8984e (patch) | |
tree | 3ea70069a8c2644f439f5d8ac346ec07a775741b /runtime | |
parent | cc5b7368d61cfcd775dd02803dbdb8d4d05b5d5d (diff) | |
download | rneovim-04fbb1de4488852c3ba332898b17180500f8984e.tar.gz rneovim-04fbb1de4488852c3ba332898b17180500f8984e.tar.bz2 rneovim-04fbb1de4488852c3ba332898b17180500f8984e.zip |
Enable new diff option linematch (#14537)
Co-authored-by: Lewis Russell <me@lewisr.dev>
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/doc/lua.txt | 3 | ||||
-rw-r--r-- | runtime/doc/options.txt | 10 |
2 files changed, 13 insertions, 0 deletions
diff --git a/runtime/doc/lua.txt b/runtime/doc/lua.txt index 70a28a7519..c4e139bca7 100644 --- a/runtime/doc/lua.txt +++ b/runtime/doc/lua.txt @@ -677,6 +677,9 @@ vim.diff({a}, {b}, {opts}) *vim.diff()* • "unified": (default) String in unified format. • "indices": Array of hunk locations. Note: This option is ignored if `on_hunk` is used. + • `linematch` (boolean): Run linematch on the resulting hunks + from xdiff. Requires `result_type = indices`, ignored + otherwise. • `algorithm` (string): Diff algorithm to use. Values: • "myers" the default algorithm diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt index 2c0b33425c..285e596152 100644 --- a/runtime/doc/options.txt +++ b/runtime/doc/options.txt @@ -2017,6 +2017,16 @@ A jump table for the options with a short description can be found at |Q_op|. Use the indent heuristic for the internal diff library. + linematch:{n} Enable a second stage diff on each generated + hunk in order to align lines. When the total + number of lines in a hunk exceeds {n}, the + second stage diff will not be performed as + very large hunks can cause noticeable lag. A + recommended setting is "linematch:60", as this + will enable alignment for a 2 buffer diff with + hunks of up to 30 lines each, or a 3 buffer + diff with hunks of up to 20 lines each. + algorithm:{text} Use the specified diff algorithm with the internal diff engine. Currently supported algorithms are: |