Skip to content

Commit

Permalink
fix: restore float title padding for nvim 0.9 (#109)
Browse files Browse the repository at this point in the history
  • Loading branch information
stevearc committed Aug 9, 2023
1 parent c0b67f3 commit 169877d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lua/dressing/input.lua
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ local function create_or_update_win(config, prompt, opts)
end
end
if vim.fn.has("nvim-0.9") == 1 then
winopt.title = prompt:gsub("^%s*(.-)%s*$", "%1")
winopt.title = prompt:gsub("^%s*(.-)%s*$", " %1 ")
-- We used to use "prompt_align" here
winopt.title_pos = config.prompt_align or config.title_pos
end
Expand Down
2 changes: 1 addition & 1 deletion lua/dressing/select/builtin.lua
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ M.select = function(config, items, opts, on_choice)
style = "minimal",
}
if vim.fn.has("nvim-0.9") == 1 then
winopt.title = opts.prompt
winopt.title = opts.prompt:gsub("^%s*(.-)%s*$", " %1 ")
winopt.title_pos = config.title_pos or "center"
end
winopt = config.override(winopt) or winopt
Expand Down

0 comments on commit 169877d

Please sign in to comment.