From ef84ec69aaf8b178f90a8fc0b33b27b432199cb9 Mon Sep 17 00:00:00 2001 From: Christian Clason Date: Fri, 8 May 2026 14:21:01 +0200 Subject: [PATCH] fix(matchparen): remove redundant vimscript shim Problem: #39625 retained `matchparen.vim` as a shim that sources the new `matchparen.lua` entrypoint, which is redundant since Lua runtime/plugin files are sourced automatically and incurs startuptime cost solely for the sake of not touching the tests. Solution: Remove the shim and `source` the Lua plugin in directly in tests. --- runtime/plugin/matchparen.vim | 5 ----- test/functional/legacy/matchparen_spec.lua | 14 +++++++------- test/old/testdir/samples/matchparen.vim | 2 +- 3 files changed, 8 insertions(+), 13 deletions(-) delete mode 100644 runtime/plugin/matchparen.vim diff --git a/runtime/plugin/matchparen.vim b/runtime/plugin/matchparen.vim deleted file mode 100644 index 8175675a29..0000000000 --- a/runtime/plugin/matchparen.vim +++ /dev/null @@ -1,5 +0,0 @@ -" Vim plugin for showing matching parens -" Maintainer: The Vim Project -" Last Change: 2025 Apr 08 -" Former Maintainer: Bram Moolenaar -runtime plugin/matchparen.lua diff --git a/test/functional/legacy/matchparen_spec.lua b/test/functional/legacy/matchparen_spec.lua index 8bdffd66a2..0338313bcf 100644 --- a/test/functional/legacy/matchparen_spec.lua +++ b/test/functional/legacy/matchparen_spec.lua @@ -13,7 +13,7 @@ describe('matchparen', function() it('redraws properly after scrolling with scrolloff=1', function() local screen = Screen.new(30, 7) exec([[ - source $VIMRUNTIME/plugin/matchparen.vim + source $VIMRUNTIME/plugin/matchparen.lua set scrolloff=1 call setline(1, ['a', 'b', 'c', 'd', 'e', '', '{', '}', '{', 'f', 'g', '}']) call cursor(5, 1) @@ -50,7 +50,7 @@ describe('matchparen', function() ]] exec([[ - source $VIMRUNTIME/plugin/matchparen.vim + source $VIMRUNTIME/plugin/matchparen.lua set hidden call setline(1, ['()']) normal 0 @@ -80,7 +80,7 @@ describe('matchparen', function() } exec([[ - source $VIMRUNTIME/plugin/matchparen.vim + source $VIMRUNTIME/plugin/matchparen.lua let s:win = win_getid() call setline(1, '{}') split @@ -107,7 +107,7 @@ describe('matchparen', function() local screen = Screen.new(30, 9) exec([[ - source $VIMRUNTIME/plugin/matchparen.vim + source $VIMRUNTIME/plugin/matchparen.lua set completeopt=menuone call setline(1, ['aa', 'aaa', 'aaaa', '(a)']) call cursor(4, 3) @@ -135,7 +135,7 @@ describe('matchparen', function() } exec([[ - source $VIMRUNTIME/plugin/matchparen.vim + source $VIMRUNTIME/plugin/matchparen.lua call setline(1, ['aaaaaaaa(', 'bbbb)cc']) set matchpairs+=(:) ]]) @@ -202,7 +202,7 @@ describe('matchparen', function() local screen = Screen.new(40, 15) exec([[ syntax on - source $VIMRUNTIME/plugin/matchparen.vim + source $VIMRUNTIME/plugin/matchparen.lua set ft=sh call setline(1, [ \ '#!/bin/sh', @@ -266,7 +266,7 @@ describe('matchparen', function() it('with scrolling', function() local screen = Screen.new(30, 7) exec([[ - source $VIMRUNTIME/plugin/matchparen.vim + source $VIMRUNTIME/plugin/matchparen.lua set scrolloff=1 call setline(1, ['foobar {', '', '', '', '}']) call cursor(5, 1) diff --git a/test/old/testdir/samples/matchparen.vim b/test/old/testdir/samples/matchparen.vim index 4235a0d39b..836395fd8f 100644 --- a/test/old/testdir/samples/matchparen.vim +++ b/test/old/testdir/samples/matchparen.vim @@ -224,7 +224,7 @@ func s:NoMatchParen() endfunc func s:DoMatchParen() - runtime plugin/matchparen.vim + runtime plugin/matchparen.lua let w = winnr() silent windo doau CursorMoved exe "noau ". w . "wincmd w"