stevearc / dressing.nvim

Neovim plugin to improve the default vim.ui interfaces
MIT License
1.73k stars 32 forks source link

[Config related] `vim.ui.input` size issues #37

Closed eaxly closed 2 years ago

eaxly commented 2 years ago

Describe the bug When opening a vim.ui.input prompt via telescope, its size is way too big.

System information

  local present, dressing = pcall(require, "dressing")
  if not present then
    print("dressing not found")
    return
  end
  dressing.setup({
    input = {
      max_width = { 140, 0.9 },
      min_width = { 10, 0.1 },
    },
    select = {
      backend = { "telescope", "builtin" },
      telescope = require('telescope.themes').get_ivy(),
      builtin = {
        width = nil,
        max_width = { 140, 0.8 },
        min_width = { 40, 0.2 },
        height = nil,
        max_height = 0.9,
        min_height = { 10, 0.2 },
      },
    },

To Reproduce Steps to reproduce the behavior:

  1. Open any vim.ui.input prompt
  2. Get Eye Cancer

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("Enter stuff", function(stuff) print("Stuff: " .. stuff) end)

Screenshots

https://user-images.githubusercontent.com/62254492/164896314-97eb03e3-4d91-4829-9955-2d96bb25c34b.mp4

EDIT: I thought that vim.ui.input was handled by telescope. It's not as I just realised.

eaxly commented 2 years ago

I think this is something configuration related. When I run neovim with just a minimal configuration that installs telescope, packer and dressing only, the prompt shows up just fine.

eaxly commented 2 years ago

Found the issue. I have focus.nvim installed, a plugin that resizes windows when changing focus from one window to another.