mirror of
https://github.com/neovim/neovim.git
synced 2025-09-07 03:48:18 +00:00
refactor(lua): use vim.system #34707
This commit is contained in:

committed by
GitHub

parent
54b8c99e51
commit
35af766de6
@@ -76,7 +76,7 @@ vim.api.nvim_create_autocmd('TextYankPost', {
|
||||
vim.api.nvim_create_user_command('GitBlameLine', function()
|
||||
local line_number = vim.fn.line('.') -- Get the current line number. See `:h line()`
|
||||
local filename = vim.api.nvim_buf_get_name(0)
|
||||
print(vim.fn.system({ 'git', 'blame', '-L', line_number .. ',+1', filename }))
|
||||
print(vim.system({ 'git', 'blame', '-L', line_number .. ',+1', filename }):wait().stdout)
|
||||
end, { desc = 'Print the git blame for the current line' })
|
||||
|
||||
-- [[ Add optional packages ]]
|
||||
|
Reference in New Issue
Block a user