You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When using dressing in place of vim.ui.input, if you have your "prompt" object be multiple lines, dressing forces everything onto one line and truncates its length.
System information
OS: Linux
Neovim version: NVIM v0.9.0-dev-506+g090048bec
Is this related to a specific vim.ui.select backend? If so, which one? I don't think so?
Dressing config:
-- Paste your call to require("dressing").setup(...) in hererequire("dressing").setup()
To Reproduce
Steps to reproduce the behavior:
See below min file
If possible, provide a minimal file that will trigger the issue (see tests/manual
for examples of short ways to call vim.ui.*):
vim.ui.input({
prompt="Do the thing\n 1) Yes\n 2) Maybe\n 3) No\n\nPlease select all that apply",
default="*"
}, function(choice)
print(choice)
end
)
Screenshots
If applicable, add screenshots to help explain your problem.
Screenshot without Dressing
Screenshot with Dressing
Additional context
While this maybe addressable with configuration, IMO this should not be something that needs to be configured to rectify. Dressing is (usually) a plugin that is used by other plugins, not by end users. Which IMO means that it would be unfair to expect users to fix this issue via configuring a dependent plugin of a plugin they are using.
I do note that :h dressing-format seems to call out a way to correct this, but that is then reliant on plugin authors to properly configure dressing to properly handle newlines in an "expected" format.
I suppose the long short, I would expect that newlines be handled as newlines when added to the title of either the select or input functions, as they are handled in an expected manner when using standard neovim ui elements.
The text was updated successfully, but these errors were encountered:
Hmmm...this is interesting because it is technically something that is supported by the default vim.ui.input function, but empirically not many people need multi-line prompts for vim.ui.input. Even the use case you outline is more suited for something like the possibly-upcoming vim.ui.confirm (though for multi-select, that would require the still-in-discussion vim.ui.select_many).
To display this properly, we would have to have a significantly different UI. The current implementation relies on being able to put the entire prompt into the title on a single line. For this to work properly, we would probably have to create two floating windows: one to display the multiline prompt, and one below it for the actual input.
Given the relative rarity of this and my lack of available time, I'm going to sit on this. I'll review PRs, but can't make any promises about working on this myself.
Describe the bug
When using dressing in place of
vim.ui.input
, if you have your "prompt" object be multiple lines, dressing forces everything onto one line and truncates its length.System information
Linux
NVIM v0.9.0-dev-506+g090048bec
vim.ui.select
backend? If so, which one?I don't think so?
To Reproduce
Steps to reproduce the behavior:
If possible, provide a minimal file that will trigger the issue (see
tests/manual
for examples of short ways to call
vim.ui.*
):Screenshots
If applicable, add screenshots to help explain your problem.
Screenshot without Dressing
Screenshot with Dressing
Additional context
While this maybe addressable with configuration, IMO this should not be something that needs to be configured to rectify. Dressing is (usually) a plugin that is used by other plugins, not by end users. Which IMO means that it would be unfair to expect users to fix this issue via configuring a dependent plugin of a plugin they are using.
I do note that
:h dressing-format
seems to call out a way to correct this, but that is then reliant on plugin authors to properly configure dressing to properly handle newlines in an "expected" format.I suppose the long short, I would expect that newlines be handled as newlines when added to the title of either the
select
orinput
functions, as they are handled in an expected manner when using standard neovim ui elements.The text was updated successfully, but these errors were encountered: