smjonas / inc-rename.nvim

Incremental LSP renaming based on Neovim's command-preview feature.
MIT License
637 stars 8 forks source link

[bug] Ctrl+F to enter command line window breaks inc-rename when input_buffer_type = "dressing" #37

Closed fnune closed 1 year ago

fnune commented 1 year ago

I like to use dressing with insert_only = false, but that doesn't work with inc-rename.nvim (see https://github.com/smjonas/inc-rename.nvim/issues/36). As a workaround, I tried using Ctrl+F to use the command line window in order to edit my command before executing it.

I found that that works with input_buffer_type = nil, but not with input_buffer_type = "dressing".

Behavior with input_buffer_type = nil

https://github.com/smjonas/inc-rename.nvim/assets/16181067/7cda752a-a6ab-49d9-8034-a99a5066123b

Behavior with input_buffer_type = "dressing"

  1. When I exit the command line window, the Dressing input remains open
    • This happens regardless of whether I ran the IncRename <word> command or I exited the command line window without executing the command
  2. Also, inc-rename.nvim throws an error (pasted below) when exiting the command line window without running a command

https://github.com/smjonas/inc-rename.nvim/assets/16181067/5150d9c6-2b1d-437e-87c5-e02fdcfcf668

CmdlineLeave Autocommands for "*":
Vim(append):Error executing lua callback: .../share/nvim/lazy/inc-rename.nvim/lua/inc_rename/init.lua:139
Vim:E11: Invalid in command-line window; <CR> executes, CTRL-C quits^@stack traceback:^@^I[C]:
in function 'nvim_set_current_win'^@^I.../share/nvim/lazy/inc-rename.nvim/lua/inc_rename/init.lua:139:
in function <.../share/nvim/lazy/inc-rename.nvim/lua/inc_rename/init.lua:132>
smjonas commented 1 year ago

Fixed in the recent commit and https://github.com/stevearc/dressing.nvim/issues/99, thanks @stevearc!