enricozb / popup.kak

Kakoune popup plugin
21 stars 2 forks source link

Various issues with popups lingering around when they shouldn't anymore #6

Open danr opened 9 months ago

danr commented 9 months ago

Hi @enricozb, thanks for sharing this incredible plugin. Some years ago I said I wanted to put fzf in a kak modal and screwtape just rolled his eyes. I did not get very far, but you've proved that that and more is possible!

I noticed these errors:

kak -s mysession
popup bash
echo 'eval -client client0 "buffer *debug*"' | kak -p mysession

I fall outside the on-key event listener and I'm back to the editor. The poup modal is still around though!!

Continuing from this, if I do:

kill!
kak -l

Now mysession is not listed. Let's try to start a new session:

kak -s mysession

The modal is back! The kak-popup is still alive and listening at this session name!

A similar thing happens if you open two clients, client0 and client1 start popop in one of them, say client0, close that client, reopen it so it gets name client0 again. The popup is back!!

I have also managed to get errors due to the WinResize hook triggering on a popup that is not around anymore. But right now I cannot figure out how to reproduce it.

All the best! /Dan

enricozb commented 9 months ago

Hi! Thanks for trying popup.kak out. I've been aware of these "zombie" popups for a while now. They mostly appear for me when I:

I'm still thinking about how I want to resolve this, but unsure for now.

Thanks for the reproducible examples. I'll play around with them.