Skip to content

Commit

Permalink
fix(prompt): respect hidden option when open files (#424)
Browse files Browse the repository at this point in the history
  • Loading branch information
linrongbin16 committed Nov 22, 2023
1 parent 6ea6951 commit 287ba48
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua/fzfx/ui.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ local user_cancelled_error = "cancelled."
--- @param bufnr integer
--- @param callback fun():any
local function confirm_discard_buffer_modified(bufnr, callback)
if utils.get_buf_option(bufnr, "modified") then
if not vim.o.hidden and utils.get_buf_option(bufnr, "modified") then
local ok, input = pcall(vim.fn.input, {
prompt = "[fzfx] current buffer has been modified, continue? (y/n) ",
cancelreturn = "n",
Expand Down

0 comments on commit 287ba48

Please sign in to comment.