feat(defaults): enable diffopt "linematch" #32346

This commit is contained in:
Siddhant Agarwal
2025-02-06 17:47:36 +05:30
committed by GitHub
parent 878b3b89c3
commit 6db830e40e
6 changed files with 7 additions and 5 deletions

View File

@ -72,6 +72,7 @@ DEFAULTS
• 'number', 'relativenumber', 'signcolumn', and 'foldcolumn' are disabled in • 'number', 'relativenumber', 'signcolumn', and 'foldcolumn' are disabled in
|terminal| buffers. See |terminal-config| for an example of changing these defaults. |terminal| buffers. See |terminal-config| for an example of changing these defaults.
• 'diffopt' default includes "linematch:40".
DIAGNOSTICS DIAGNOSTICS

View File

@ -2032,7 +2032,7 @@ A jump table for the options with a short description can be found at |Q_op|.
security reasons. security reasons.
*'diffopt'* *'dip'* *'diffopt'* *'dip'*
'diffopt' 'dip' string (default "internal,filler,closeoff") 'diffopt' 'dip' string (default "internal,filler,closeoff,linematch:40")
global global
Option settings for diff mode. It can consist of the following items. Option settings for diff mode. It can consist of the following items.
All are optional. Items must be separated by a comma. All are optional. Items must be separated by a comma.

View File

@ -1739,7 +1739,7 @@ vim.go.dex = vim.go.diffexpr
--- ---
--- ---
--- @type string --- @type string
vim.o.diffopt = "internal,filler,closeoff" vim.o.diffopt = "internal,filler,closeoff,linematch:40"
vim.o.dip = vim.o.diffopt vim.o.dip = vim.o.diffopt
vim.go.diffopt = vim.o.diffopt vim.go.diffopt = vim.o.diffopt
vim.go.dip = vim.go.diffopt vim.go.dip = vim.go.diffopt

View File

@ -2152,7 +2152,7 @@ local options = {
{ {
abbreviation = 'dip', abbreviation = 'dip',
cb = 'did_set_diffopt', cb = 'did_set_diffopt',
defaults = 'internal,filler,closeoff', defaults = 'internal,filler,closeoff,linematch:40',
-- Keep this in sync with diffopt_changed(). -- Keep this in sync with diffopt_changed().
values = { values = {
'filler', 'filler',

View File

@ -438,8 +438,8 @@ describe('smoothscroll', function()
{7: }bc abc abc abc abc abc ab│{7: }bc abc abc abc abc abc ab| {7: }bc abc abc abc abc abc ab│{7: }bc abc abc abc abc abc ab|
{7: }c abc abc abc abc abc abc│{7: }c abc abc abc abc abc abc| {7: }c abc abc abc abc abc abc│{7: }c abc abc abc abc abc abc|
{7: } abc abc abc abc abc │{7: } abc abc abc abc abc | {7: } abc abc abc abc abc │{7: } abc abc abc abc abc |
{7: }{27:foo}{4: }│{7: }{27:barba^r}{4: }| {7: }{22:foo }│{7: }{23:-------------------------}|
{7: }{22:bar }│{7: }{23:-------------------------}| {7: }{4:bar }│{7: }{4:bar}{27:ba^r}{4: }|
{7: } abc abc abc abc abc abc │{7: } abc abc abc abc abc abc | {7: } abc abc abc abc abc abc │{7: } abc abc abc abc abc abc |
{7: }abc abc abc abc abc abc a│{7: }abc abc abc abc abc abc a| {7: }abc abc abc abc abc abc a│{7: }abc abc abc abc abc abc a|
{7: }bc abc abc abc abc abc ab│{7: }bc abc abc abc abc abc ab| {7: }bc abc abc abc abc abc ab│{7: }bc abc abc abc abc abc ab|

View File

@ -4,6 +4,7 @@ if exists('s:did_load')
set complete=.,w,b,u,t,i set complete=.,w,b,u,t,i
set define=^\\s*#\\s*define set define=^\\s*#\\s*define
set directory^=. set directory^=.
set diffopt=internal,filler,closeoff
set display= set display=
set fillchars=vert:\|,foldsep:\|,fold:- set fillchars=vert:\|,foldsep:\|,fold:-
set formatoptions=tcq set formatoptions=tcq