enhancement: show diff when component is loaded (#234)

This commit is contained in:
JL Bas 2021-05-13 06:24:51 -04:00 committed by GitHub
parent 33aaabe672
commit 1ee99e0473
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -62,6 +62,10 @@ Diff.new = function(self, options, child)
} }
end end
-- call update functions so git diff is present when component is loaded
Diff.update_git_diff_getter()
Diff.update_git_diff()
vim.api.nvim_exec([[ vim.api.nvim_exec([[
autocmd lualine BufEnter * lua require'lualine.components.diff'.update_git_diff_getter() autocmd lualine BufEnter * lua require'lualine.components.diff'.update_git_diff_getter()
autocmd lualine BufEnter * lua require'lualine.components.diff'.update_git_diff() autocmd lualine BufEnter * lua require'lualine.components.diff'.update_git_diff()