iterm2 switches desktops if handed the focus
Bug report
Thanks for filing an issue! Please answer the questions below so I can help you.
- iTerm2 version: Build 3.5.20230927-nightly
- OS version: 13.5.1 (22G90)
- Attach
~/Library/Preferences/com.googlecode.iterm2.plist
here (drag-drop from finder into this window) com.googlecode.iterm2.plist - Attach a debug log)
- Attach a screen capture video if it would make reproduction steps clearer.
PLEASE ATTACH YOUR PLIST FILE FOR BUG REPORTS! Seriously! I'll probably ask you for it if you don’t.
Detailed steps to reproduce the problem
- Have a few spaces (I've got 10 routinely).
- Open iterm2 windows on several spaces. Make sure one such space has only iterm2 on it, no other apps.
- Open another app in a space (usually firefox in my case, but I've just reproduced it using Calendar) and have focus in this app.
- use Ctrl-n (eg Ctrl-5) to switch to the space with only an iterm2 window and without the currently focused app
What happened
When I do this:
- the desktop switches to the target space
- I infer that iterm2 is given the focus because there's no firefox windows in that space
- iterm2 then switches to another desktop, I think because the iterm2 window which most recently had the keyboard focus was on that desktop - unconfirmed
- and then can switch spaces back and forth a bit, until something settles; I'm not sure what the end state finally is and maybe it depends on my current collection of windows
To make things harder to reproduce, I think it takes a while before this kind of thing happens - maybe some accrual of state inside iterm2 over time? Hopefully the debug log will provide some clues.
What should have happened
Edited by George Nachman