fix(tui): prevent dialog keymaps from being swallowed (#782)
Uri Gorelik
created
This change checks for the presence of a dialog before checking for
other handlers.
Now when pressing ctrl+p when a dialog is visible it will correctly
navigate up the list. This restores the standard terminal behavior of
using ctrl+n and ctrl+p.
How to reproduce:
1. ctrl+p to open for the command launcher
2. ctrl+n (or down) to move down one item
3. ctrl+p - command dialog closed
With this fix, step 3. will now correctly select the previous item in
the dialog.