the floating window would get closed when we open and returning to the original window would crash.
Context
What is the problem you are trying to solve?
Very concretely, I enabled the floating window mode of nvim-tree. When doing that, triggering a file deletion from nvim-tree will call vim.ui.select, which will trigger dressing. Dressing opens a window to confirm the deletion, closing the nvim-tree floating window. When confirming the deletion, dressing attempts to return focus to nvim-tree, but that fails since nvim-tree was closed.
Description
When returning focus to the original window, check whether that one still exists
the floating window would get closed when we open and returning to the original window would crash.
Context
What is the problem you are trying to solve?
Very concretely, I enabled the floating window mode of nvim-tree. When doing that, triggering a file deletion from nvim-tree will call vim.ui.select, which will trigger dressing. Dressing opens a window to confirm the deletion, closing the nvim-tree floating window. When confirming the deletion, dressing attempts to return focus to nvim-tree, but that fails since nvim-tree was closed.
Description
When returning focus to the original window, check whether that one still exists
Test Plan
See context.