Skip to content

Commit

Permalink
chore: remove footer from history search, allows regular vim.ui.input
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisgrieser committed Dec 11, 2024
1 parent f685e99 commit 9b70130
Showing 1 changed file with 1 addition and 16 deletions.
17 changes: 1 addition & 16 deletions lua/tinygit/commands/history.lua
Original file line number Diff line number Diff line change
Expand Up @@ -313,25 +313,10 @@ end
local function searchHistoryForString(prefill)
if repoIsShallow() then return end

-- add backdrop and footer to input field
vim.api.nvim_create_autocmd("FileType", {
once = true,
pattern = "DressingInput",
callback = function(ctx)
backdrop.new(ctx.buf)
local winid = vim.api.nvim_get_current_win()
local footerText = "empty = all commits"
vim.api.nvim_win_set_config(winid, {
footer = { { " " .. footerText .. " ", "FloatBorder" } },
footer_pos = "right",
})
end,
})

-- prompt for a search query
local icon = require("tinygit.config").config.appearance.mainIcon
local prompt = vim.trim(icon .. " Search file history")
require("dressing.input")({ prompt = prompt, default = prefill }, function(query)
vim.ui.input({ prompt = prompt, default = prefill }, function(query)
if not query then return end -- aborted

-- GUARD loop back when unshallowing is still running
Expand Down

0 comments on commit 9b70130

Please sign in to comment.