Skip to content

Commit

Permalink
fix(lualine.nvim): remove extra paddings for git branch in lualine (#708
Browse files Browse the repository at this point in the history
)
  • Loading branch information
linrongbin16 authored Feb 17, 2025
1 parent 6331273 commit d617dfd
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lua/configs/nvim-lualine/lualine-nvim/config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,17 @@ local function GitBranch()
-- return ""
-- end

local branch = " " .. git_branch_name_cache .. " "
local branch = "" .. git_branch_name_cache

if type(git_branch_status_cache) == "table" then
if git_branch_status_cache["changed"] ~= nil then
branch = branch .. "* "
branch = branch .. " *"
end
if type(git_branch_status_cache["ahead"]) == "number" then
branch = branch .. string.format("↑[%d] ", git_branch_status_cache["ahead"])
branch = branch .. string.format(" ↑[%d]", git_branch_status_cache["ahead"])
end
if type(git_branch_status_cache["behind"]) == "number" then
branch = branch .. string.format("↓[%d] ", git_branch_status_cache["behind"])
branch = branch .. string.format(" ↓[%d]", git_branch_status_cache["behind"])
end
end

Expand Down

0 comments on commit d617dfd

Please sign in to comment.