echasnovski / mini.nvim

Library of 40+ independent Lua modules improving overall Neovim (version 0.8 and higher) experience with minimal effort
MIT License
4.47k stars 175 forks source link

mini.completion float window stays open after exiting #924

Closed gsuuon closed 1 month ago

gsuuon commented 1 month ago

Contributing guidelines

Module(s)

mini.completion

Description

The float window with additional info is staying after exiting from completion, I see this happening with both <esc> and <ctrl-c>.

mini-completion-float.webm

Neovim version

NVIM v0.10.0-dev-2889+gf064e72b9

Steps to reproduce

  1. install mini.completion with all default options
  2. <c-x><c-u> to start completion
  3. <c-c> or <esc> to leave completion

Expected behavior

Float window also goes away

Actual behavior

Float window sticks around

echasnovski commented 1 month ago

Thanks for the issue!

I can reproduce this with <C-c>, but not with <Esc>. It should work with <Esc> but can be an undefined behavior with <C-c>.

It seems to be an issue with 'InsertLeavePre' event not being triggered with <C-c>. I'll take a look.

gsuuon commented 1 month ago

Thanks for the fast response (and the plugins)! The fix on backlog looks good. I couldn't repro with <esc> again either, though it was happening consistently when I filed the issue (I hit <esc> in the video). Not sure if maybe that buffer just got in a weird state.

echasnovski commented 1 month ago

Thanks for the confirmation!

I plan to revisit the backlog branch tomorrow and hopefully merge into main.

echasnovski commented 1 month ago

This should now be fixed on latest main.