Skip to content

Commit 57b2cc8

Browse files
author
Github
committed
update vim plugins
1 parent c34cb0d commit 57b2cc8

File tree

9 files changed

+43
-22
lines changed

9 files changed

+43
-22
lines changed

config/vim/pack/plugins/start/fzf/CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
CHANGELOG
22
=========
33

4+
0.61.3
5+
------
6+
- Reverted #4351 as it caused `tmux run-shell 'fzf --tmux'` to fail (#4559 #4560)
7+
- More environment variables for child processes (#4356)
8+
49
0.61.2
510
------
611
- Fixed panic when using header border without pointer/marker (@phanen)

config/vim/pack/plugins/start/fzf/install

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
set -u
44

5-
version=0.61.2
5+
version=0.61.3
66
auto_completion=
77
key_bindings=
88
update_config=2

config/vim/pack/plugins/start/fzf/install.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
$version="0.61.2"
1+
$version="0.61.3"
22

33
$fzf_base=Split-Path -Parent $MyInvocation.MyCommand.Definition
44

config/vim/pack/plugins/start/fzf/man/man1/fzf-tmux.1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
2121
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
2222
THE SOFTWARE.
2323
..
24-
.TH fzf\-tmux 1 "Apr 2025" "fzf 0.61.2" "fzf\-tmux - open fzf in tmux split pane"
24+
.TH fzf\-tmux 1 "Apr 2025" "fzf 0.61.3" "fzf\-tmux - open fzf in tmux split pane"
2525

2626
.SH NAME
2727
fzf\-tmux - open fzf in tmux split pane

config/vim/pack/plugins/start/fzf/man/man1/fzf.1

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
2121
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
2222
THE SOFTWARE.
2323
..
24-
.TH fzf 1 "Apr 2025" "fzf 0.61.2" "fzf - a command-line fuzzy finder"
24+
.TH fzf 1 "Apr 2025" "fzf 0.61.3" "fzf - a command-line fuzzy finder"
2525

2626
.SH NAME
2727
fzf - a command-line fuzzy finder
@@ -1279,10 +1279,20 @@ fzf exports the following environment variables to its child processes.
12791279
.br
12801280
.BR FZF_PROMPT " Prompt string"
12811281
.br
1282+
.BR FZF_GHOST " Ghost string"
1283+
.br
1284+
.BR FZF_POINTER " Pointer string"
1285+
.br
12821286
.BR FZF_PREVIEW_LABEL " Preview label string"
12831287
.br
12841288
.BR FZF_BORDER_LABEL " Border label string"
12851289
.br
1290+
.BR FZF_LIST_LABEL " List label string"
1291+
.br
1292+
.BR FZF_INPUT_LABEL " Input label string"
1293+
.br
1294+
.BR FZF_HEADER_LABEL " Header label string"
1295+
.br
12861296
.BR FZF_ACTION " The name of the last action performed"
12871297
.br
12881298
.BR FZF_KEY " The name of the last key pressed"

config/vim/pack/plugins/start/fzf/src/core.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ func (r revision) compatible(other revision) bool {
3939
// Run starts fzf
4040
func Run(opts *Options) (int, error) {
4141
if opts.Filter == nil {
42-
if opts.Tmux != nil && len(os.Getenv("TMUX")) > 0 && len(os.Getenv("TMUX_PANE")) > 0 && opts.Tmux.index >= opts.Height.index {
42+
if opts.Tmux != nil && len(os.Getenv("TMUX")) > 0 && opts.Tmux.index >= opts.Height.index {
4343
return runTmux(os.Args, opts)
4444
}
4545

config/vim/pack/plugins/start/fzf/src/proxy.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,7 @@ func runProxy(commandPrefix string, cmdBuilder func(temp string, needBash bool)
9898
validIdentifier := regexp.MustCompile(`^[a-zA-Z_][a-zA-Z0-9_]*$`)
9999
for _, pairStr := range os.Environ() {
100100
pair := strings.SplitN(pairStr, "=", 2)
101-
// TMUX_PANE is never set inside a tmux popup, and should not be set so as to not be detected as a regular tmux pane
102-
if validIdentifier.MatchString(pair[0]) && pair[0] != "TMUX_PANE" {
101+
if validIdentifier.MatchString(pair[0]) {
103102
exports = append(exports, fmt.Sprintf("export %s=%s", pair[0], escapeSingleQuote(pair[1])))
104103
} else if strings.HasPrefix(pair[0], "BASH_FUNC_") && strings.HasSuffix(pair[0], "%%") {
105104
name := pair[0][10 : len(pair[0])-2]

config/vim/pack/plugins/start/fzf/src/terminal.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1091,9 +1091,13 @@ func (t *Terminal) environImpl(forPreview bool) []string {
10911091
env = append(env, "FZF_ACTION="+t.lastAction.Name())
10921092
env = append(env, "FZF_KEY="+t.lastKey)
10931093
env = append(env, "FZF_PROMPT="+string(t.promptString))
1094+
env = append(env, "FZF_GHOST="+string(t.ghost))
1095+
env = append(env, "FZF_POINTER="+string(t.pointer))
10941096
env = append(env, "FZF_PREVIEW_LABEL="+t.previewLabelOpts.label)
10951097
env = append(env, "FZF_BORDER_LABEL="+t.borderLabelOpts.label)
10961098
env = append(env, "FZF_LIST_LABEL="+t.listLabelOpts.label)
1099+
env = append(env, "FZF_INPUT_LABEL="+t.inputLabelOpts.label)
1100+
env = append(env, "FZF_HEADER_LABEL="+t.headerLabelOpts.label)
10971101
if len(t.nthCurrent) > 0 {
10981102
env = append(env, "FZF_NTH="+RangesToString(t.nthCurrent))
10991103
}

config/vim/pack/plugins/start/fzf/test/test_core.rb

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1632,14 +1632,16 @@ def test_change_nth
16321632
end
16331633

16341634
def test_env_vars
1635-
def to_vars(lines)
1636-
lines.select { it.start_with?('FZF_') }.to_h do
1637-
key, val = it.split('=', 2)
1635+
def env_vars
1636+
return {} unless File.exist?(tempname)
1637+
1638+
File.readlines(tempname).select { it.start_with?('FZF_') }.to_h do
1639+
key, val = it.chomp.split('=', 2)
16381640
[key.to_sym, val]
16391641
end
16401642
end
16411643

1642-
tmux.send_keys %(seq 100 | #{FZF} --multi --reverse --preview-window up,99%,noborder --preview 'env | grep ^FZF_ | sort' --no-input --bind enter:show-input+refresh-preview,space:disable-search+refresh-preview), :Enter
1644+
tmux.send_keys %(seq 100 | #{FZF} --multi --reverse --preview-window 0 --preview 'env | grep ^FZF_ | sort > #{tempname}' --no-input --bind enter:show-input+refresh-preview,space:disable-search+refresh-preview), :Enter
16431645
expected = {
16441646
FZF_TOTAL_COUNT: '100',
16451647
FZF_MATCH_COUNT: '100',
@@ -1648,31 +1650,32 @@ def to_vars(lines)
16481650
FZF_KEY: '',
16491651
FZF_POS: '1',
16501652
FZF_QUERY: '',
1651-
FZF_PROMPT: '>',
1653+
FZF_POINTER: '>',
1654+
FZF_PROMPT: '> ',
16521655
FZF_INPUT_STATE: 'hidden'
16531656
}
1654-
tmux.until do |lines|
1655-
assert_equal expected, to_vars(lines).slice(*expected.keys)
1657+
tmux.until do
1658+
assert_equal expected, env_vars.slice(*expected.keys)
16561659
end
16571660
tmux.send_keys :Enter
1658-
tmux.until do |lines|
1661+
tmux.until do
16591662
expected.merge!(FZF_INPUT_STATE: 'enabled', FZF_ACTION: 'show-input', FZF_KEY: 'enter')
1660-
assert_equal expected, to_vars(lines).slice(*expected.keys)
1663+
assert_equal expected, env_vars.slice(*expected.keys)
16611664
end
16621665
tmux.send_keys :Tab, :Tab
1663-
tmux.until do |lines|
1666+
tmux.until do
16641667
expected.merge!(FZF_ACTION: 'toggle-down', FZF_KEY: 'tab', FZF_POS: '3', FZF_SELECT_COUNT: '2')
1665-
assert_equal expected, to_vars(lines).slice(*expected.keys)
1668+
assert_equal expected, env_vars.slice(*expected.keys)
16661669
end
16671670
tmux.send_keys '99'
1668-
tmux.until do |lines|
1671+
tmux.until do
16691672
expected.merge!(FZF_ACTION: 'char', FZF_KEY: '9', FZF_QUERY: '99', FZF_MATCH_COUNT: '1', FZF_POS: '1')
1670-
assert_equal expected, to_vars(lines).slice(*expected.keys)
1673+
assert_equal expected, env_vars.slice(*expected.keys)
16711674
end
16721675
tmux.send_keys :Space
1673-
tmux.until do |lines|
1676+
tmux.until do
16741677
expected.merge!(FZF_INPUT_STATE: 'disabled', FZF_ACTION: 'disable-search', FZF_KEY: 'space')
1675-
assert_equal expected, to_vars(lines).slice(*expected.keys)
1678+
assert_equal expected, env_vars.slice(*expected.keys)
16761679
end
16771680
end
16781681

0 commit comments

Comments
 (0)