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

Rename panel doesn't get focused on rename/paste #146

Closed
benfrain opened this issue May 31, 2022 · 3 comments
Closed

Rename panel doesn't get focused on rename/paste #146

benfrain opened this issue May 31, 2022 · 3 comments
Labels
bug Something isn't working needs repro

Comments

@benfrain
Copy link

Description

When I mark a file and then yank into the same folder to rename, the rename UI appear but doesn't get focus. It is then not possible to rename the file. Video to demonstrate. I'm marking a file then trying to paste it into same location and rename.

rename.mov

The error that ultimately appears:

Error executing vim.schedule lua callback: ...pack/packer/opt/telescope.nvim/lua/telescope/pickers.lua:891: Invalid buffer id: 71
stack traceback:
        [C]: in function 'nvim_buf_set_lines'
        ...pack/packer/opt/telescope.nvim/lua/telescope/pickers.lua:891: in function 'reset_prompt'
        ...pack/packer/opt/telescope.nvim/lua/telescope/pickers.lua:921: in function 'refresh'
        ....nvim/lua/telescope/_extensions/file_browser/actions.lua:416: in function 'copy_selections'
        ....nvim/lua/telescope/_extensions/file_browser/actions.lua:408: in function 'on_confirm'
        ...e/pack/packer/start/dressing.nvim/lua/dressing/input.lua:79: in function ''
        vim/_editor.lua: in function ''
        vim/_editor.lua: in function <vim/_editor.lua:0>

Neovim version

NVIM v0.7.0
Build type: Release
LuaJIT 2.1.0-beta3
Compiled by brew@Monterey

Features: +acl +iconv +tui
See ":help feature-compile"

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "/usr/local/Cellar/neovim/0.7.0/share/nvim"

Run :checkhealth for more info

Operating system and version

macOS 12.4

Steps to reproduce

  1. open file browser
  2. mark a file
  3. paste file into same folder for rename

Expected behavior

rename box focused ready for rename.

Actual behavior

rename UI is not focused

Minimal config

vim.cmd [[set runtimepath=$VIMRUNTIME]]
vim.cmd [[set packpath=/tmp/nvim/site]]
local package_root = '/tmp/nvim/site/pack'
local install_path = package_root .. '/packer/start/packer.nvim'
local function load_plugins()
  require('packer').startup {
    {
      'wbthomason/packer.nvim',
      {
        'nvim-telescope/telescope.nvim',
        requires = {
          'nvim-lua/plenary.nvim',
          'nvim-telescope/telescope-file-browser.nvim',
        },
      },
      -- ADD PLUGINS THAT ARE _NECESSARY_ FOR REPRODUCING THE ISSUE
    },
    config = {
      package_root = package_root,
      compile_path = install_path .. '/plugin/packer_compiled.lua',
      display = { non_interactive = true },
    },
  }
end
_G.load_config = function()
  require('telescope').setup()
  require('telescope').load_extension('file_browser')
  -- ADD INIT.LUA SETTINGS THAT ARE _NECESSARY_ FOR REPRODUCING THE ISSUE
end
if vim.fn.isdirectory(install_path) == 0 then
  print("Installing Telescope and dependencies.")
  vim.fn.system { 'git', 'clone', '--depth=1', 'https://github.com/wbthomason/packer.nvim', install_path }
end
load_plugins()
require('packer').sync()
vim.cmd [[autocmd User PackerComplete ++once echo "Ready!" | lua load_config()]]
@benfrain benfrain added the bug Something isn't working label May 31, 2022
@fdschmidt93
Copy link
Member

Seems to work for me if I understand it correctly. Also, you don't need to have the element multi-selected, i.e. just selecting suffices as you can just copy in-place if it's a single file/folder (which also works appropriately for me). I guess something about your config intervenes.

symbols-.2.mp4

@benfrain
Copy link
Author

Thanks for the quick response.

This will be fun to find :D, only have dressing in there alongside the File Browser defaults to best of my knowledge.

Works fine without Dressing so maybe something there although looks like you have it working.... 🤔

@benfrain
Copy link
Author

benfrain commented May 31, 2022

As advised on stevearc/dressing.nvim#43 (comment) I have tried a heavily reduced config but still see the same issue.

@fdschmidt93 could this be OS specific or is that highly unlikely? On macOS here.

At a high level, does this plugin do anything to allow Dressing to work with it, or does dressing just intercept and dress up standard neovim things??

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs repro
Projects
None yet
Development

No branches or pull requests

2 participants