Skip to content

Commit

Permalink
fix: update function call in unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
stevearc committed Nov 22, 2024
1 parent 24f84b1 commit 67170e3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
6 changes: 2 additions & 4 deletions lua/oil/view.lua
Original file line number Diff line number Diff line change
Expand Up @@ -745,10 +745,8 @@ M.format_entry_cols = function(entry, column_defs, col_width, adapter, is_hidden

table.insert(cols, { name, (is_orphan and "OilOrphanLink" or "OilLink") .. hl_suffix })
if link_text then
table.insert(
cols,
{ link_text, (is_orphan and "OilOrphanLinkTarget" or "OilLinkTarget") .. hl_suffix }
)
local target_hl = (is_orphan and "OilOrphanLinkTarget" or "OilLinkTarget") .. hl_suffix
table.insert(cols, { link_text, target_hl })
end
else
table.insert(cols, { name, "OilFile" .. hl_suffix })
Expand Down
2 changes: 1 addition & 1 deletion tests/parser_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ describe("parser", function()
local file = test_adapter.test_set("/foo/a.txt", "file")
vim.cmd.edit({ args = { "oil-test:///foo/" } })
local bufnr = vim.api.nvim_get_current_buf()
local cols = view.format_entry_cols(file, {}, {}, test_adapter)
local cols = view.format_entry_cols(file, {}, {}, test_adapter, false)
local lines = util.render_table({ cols }, {})
table.insert(lines, "")
table.insert(lines, " ")
Expand Down

0 comments on commit 67170e3

Please sign in to comment.