The remain-on-exit failed option in tmux causes the pane to remain open when exit code isn't 0, to allow me to inspect what happened. In interactive mode, I would expect zsh to always return 0 unless it crashes or is killed. However, this is not what happens.
Example: If I press Ctrl+C to cancel inputting the current line, and subsequently press Ctrl+D, zsh exits with error code 130 instead of 0.
Doing an echo $? and experimenting confirms that after pressing Ctrl+D, zsh is simply returning the exit code of the last command executed, fooling tmux into thinking that it crashed, which is not the case.
How can I change this behavior, and- should I? Would doing so break anything?