We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a720490 commit a11b930Copy full SHA for a11b930
autoload/health/floaterm.vim
lua/floaterm/health.lua
@@ -12,11 +12,8 @@ local get_nvim_info = function()
12
end
13
14
local get_plugin_info = function()
15
- local home = vim.fn.fnamemodify(vim.fn.resolve(vim.fn.expand('<sfile>:p')), ':h:h:h')
16
- local save_cwd = vim.fn.getcwd()
17
- vim.fn.execute('cd ' .. home, 'silent!')
18
- local result = vim.fn.system('git rev-parse --short HEAD')
19
- vim.fn.execute('cd ' .. save_cwd, 'silent!')
+ local home = string.sub(debug.getinfo(1).source, 2, string.len('/health.lua') * -1)
+ local result = vim.fn.system('cd ' .. home .. ' ; git rev-parse --short HEAD')
20
return result
21
22
0 commit comments