popup.kak icon indicating copy to clipboard operation
popup.kak copied to clipboard

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

Open danr opened this issue 2 years ago • 1 comments

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

danr avatar Nov 30 '23 18:11 danr

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:

  • open up some code that starts kak-lsp.
  • I do "go-to definition", but this is put on hold since kak-lsp isn't ready yet
  • I open up a popup
  • While the popup is open, kak-lsp loads and sends me to the "definition" of whatever AST node I was at earlier
  • The popup is now ever-present, and the on-key handler is gone.

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.

enricozb avatar Nov 30 '23 19:11 enricozb