From f6cb5b17897ff0c38f60fecd4b529678bcfec259 Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Mon, 8 Jan 2024 16:43:32 +0900 Subject: [PATCH] [Helptags] Do not use 'Fatal' Fix #1506 --- autoload/fzf/vim.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autoload/fzf/vim.vim b/autoload/fzf/vim.vim index ea3d8df..61f70a0 100755 --- a/autoload/fzf/vim.vim +++ b/autoload/fzf/vim.vim @@ -1351,7 +1351,7 @@ function! fzf#vim#helptags(...) endif let s:helptags_script = tempname() - call writefile(['use Fatal qw(open close); for my $filename (@ARGV) { open(my $file,q(<),$filename); while (<$file>) { /(.*?)\t(.*?)\t(.*)/; push @lines, sprintf(qq('.s:green('%-40s', 'Label').'\t%s\t%s\t%s\n), $1, $2, $filename, $3); } close($file); } print for sort @lines;'], s:helptags_script) + call writefile(['for my $filename (@ARGV) { open(my $file,q(<),$filename) or die; while (<$file>) { /(.*?)\t(.*?)\t(.*)/; push @lines, sprintf(qq('.s:green('%-40s', 'Label').'\t%s\t%s\t%s\n), $1, $2, $filename, $3); } close($file) or die; } print for sort @lines;'], s:helptags_script) return s:fzf('helptags', { \ 'source': 'perl '.fzf#shellescape(s:helptags_script).' '.join(map(tags, 'fzf#shellescape(v:val)')), \ 'sink': s:function('s:helptag_sink'),