Skip to content

Commit

Permalink
Formatting, gsub
Browse files Browse the repository at this point in the history
  • Loading branch information
CKolkey committed Nov 20, 2023
1 parent d3dbebb commit 7eccfc4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lua/neogit/lib/graph.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ local M = {}

local graph_error = "flog: internal error drawing graph"

-- styleua: ignore
-- stylua: ignore start
local current_commit_str = ""
local commit_branch_str = ""
local commit_empty_str = " "
Expand All @@ -27,6 +27,7 @@ local merge_empty_str = " "
local missing_parent_str = ""
local missing_parent_branch_str = ""
local missing_parent_empty_str = " "
-- stylua: ignore end

function M.build(commits)
commits = require("neogit.lib.util").filter_map(commits, function(item)
Expand All @@ -51,7 +52,6 @@ function M.build(commits)

-- Draw graph
for _, commit in ipairs(commits) do

-- Get commit data
local commit_hash = commit.oid
local parents = vim.split(commit.parent, " ")
Expand Down Expand Up @@ -509,9 +509,9 @@ function M.build(commits)
local graph = {}
for _, line in ipairs(vim_out) do
local g = {}
for _, c in ipairs(vim.split(line.text, "")) do
line.text:gsub(".", function(c)
table.insert(g, { text = c, color = line.color, oid = line.oid })
end
end)

table.insert(graph, g)
end
Expand Down

0 comments on commit 7eccfc4

Please sign in to comment.