Repository: wezterm/wezterm (language: rust)

Issue:
Window doesn't re-render gui when 'cli activate-pane-direction' is called 
### What Operating System(s) are you seeing this problem on?

Windows

### Which Wayland compositor or X11 Window manager(s) are you using?

_No response_

### WezTerm version

wezterm 20221219-220659-19b01261

### Did you try the latest nightly build to see if the issue is better (or worse!) than your current version?

Yes, and I updated the version box above to show the version of the nightly that I tried

### Describe the bug

Wezterm's gui doesn't seem to recognize that `wezterm cli activate-pane-direction` was called until something causes the gui to visually update. I ran into this trying to get this Neovim plugin working https://github.com/numToStr/Navigator.nvim/issues/20. If there is some recommended way to fix this or add something to the plugin's [provided wezterm snippet](https://github.com/numToStr/Navigator.nvim/wiki/WezTerm-Integration) to make it re-render properly I couldn't find it in Wezterm's docs.

### To Reproduce

Running `wezterm cli activate-pane-direction Right; sleep 5` moves the pane focus but you can't visually see a difference until the 5 second sleep is over. 

### Configuration

no config

### Expected Behavior

I would expect Wezterm to visually display the fact that it has successfully changed the active pane

### Logs

```
Debug Overlay
wezterm version: 20221219-220659-19b01261
OpenGL version: NVIDIA GeForce RTX 3080/PCIe/SSE2 4.5.0 NVIDIA 517.48
Enter lua statements or expressions and hit Enter.
Press ESC or CTRL-D to exit
```

### Anything else?

_No response_


Discussion / hints:

Fix patch:
diff --git a/mux/src/tab.rs b/mux/src/tab.rs
index 89a256878fd..8c0b056ef92 100644
--- a/mux/src/tab.rs
+++ b/mux/src/tab.rs
@@ -1,7 +1,7 @@
 use crate::domain::DomainId;
 use crate::pane::*;
 use crate::renderable::StableCursorPosition;
-use crate::{Mux, WindowId};
+use crate::{Mux, MuxNotification, WindowId};
 use bintree::PathBranch;
 use config::configuration;
 use config::keyassignment::PaneDirection;
@@ -1417,6 +1417,10 @@ impl TabInner {
         if let Some(panel_idx) = self.get_pane_direction(direction, false) {
             self.set_active_idx(panel_idx);
         }
+        let mux = Mux::get();
+        if let Some(window_id) = mux.window_containing_tab(self.id) {
+            mux.notify(MuxNotification::WindowInvalidated(window_id));
+        }
     }
 
     fn get_pane_direction(&mut self, direction: PaneDirection, ignore_zoom: bool) -> Option<usize> {


Test patch: