1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-02-02 21:00:03 +08:00

fix(git): fix wrong remote line number

This commit is contained in:
Eric Wong 2024-02-23 13:26:54 +08:00
parent 42ed861445
commit f791f5bbd8

View File

@ -131,7 +131,7 @@ local function get_cursor_info()
elseif vim.startswith(l, '') then
local remote_line = vim.fn.search('^ ▼ ', 'bnW')
if remote_line > 0 then
c.branch = string.gsub(string.sub(vim.fn.getline('.'), 7), updating_extra_text, '') .. string.sub(l, 12)
c.branch = string.gsub(string.sub(vim.fn.getline(remote_line), 7), updating_extra_text, '') .. string.sub(l, 12)
end
end