Using escape codes for dynamically setting the profile does not change background image until window resize
Thanks for filing an issue! Please answer the questions below so I can help you.
- iTerm2 version:
3.3.7
- OS version:
macOS Mojave, 10.14.6
-
Attach com.googlecode.iterm2.plist here (drag-drop from finder into this window)
-
Attach a debug log, if possible. Instructions at https://iterm2.com/debuglog
N/A
- Are you reporting a performance issue, excessive CPU usage, or a hang? Please attach a sample. Instructions at https://gitlab.com/gnachman/iterm2/wikis/HowToSample
N/A
- Are you reporting a crash? Please attach the crash log. Instructions at https://gitlab.com/gnachman/iterm2/wikis/crash-logs
N/A
- Are you reporting excessive memory usage? Please attach a heap analysis: https://gitlab.com/gnachman/iterm2/wikis/heapshot
N/A
Per the documentation, it should be possible dynamically change the profile for the active iTerm window by using the appropriate escape codes here: https://iterm2.com/documentation-escape-codes.html. However, only the colors of the text immediately change, not the background image associated with the profile. It isn't until you resize the window or fullscreen it that the background is properly redrawn with the desired background image.
Detailed steps to reproduce the problem:
- Start a default iTerm session.
- Issue
echo -e "\033]1337;SetProfile=OtherProfile\7"
where OtherProfile has a color scheme and background image associated with it that is distinct from the Default profile. - See that the colors change but the background image does not.
- Resize the window.
- Observe that now the background updates with the desired image.
What happened:
The colors change but the background image does not until resizing.
What should have happened:
Both the colors and the background image should change without needing to resize the window.