Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add trim_prompt setting for vim.ui.input #134

Merged
merged 1 commit into from
Jan 14, 2024
Merged

feat: add trim_prompt setting for vim.ui.input #134

merged 1 commit into from
Jan 14, 2024

Conversation

chrisgrieser
Copy link
Contributor

Give input the same trim_prompt setting select already has.

Context

What is the problem you are trying to solve?
It's really only a minor aesthetic improvement. Also makes input and select more consistent, as they both now have a trim_prompt setting.

Description

Describe how the changes add the functionality or fix the issue under "Context"
The gist of it: if input.trim_only then title = title:gsub(":$", "").

Test Plan

list the steps you took to test this functionality. Steps should be
reproducible by others.

confirm that it works correctly:

require("dressing").setup { input = { trim_prompt = true } }
vim.ui.input({ prompt = "Input: " }, function () end)
require("dressing").setup { input = { trim_prompt = false } }
vim.ui.input({ prompt = "Input: " }, function () end)

@stevearc stevearc merged commit 48b7134 into stevearc:master Jan 14, 2024
7 checks passed
@stevearc
Copy link
Owner

LGTM thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants