Comment 21 for bug 1301605

Revision history for this message
PreZ (prez) wrote :

Just to comment to @pandasauce, no, that's not really what this task is about. This task is about supporting tmux's Control Mode (aka. the -CC option of tmux) which allows a terminal to natively integrate with tmux, allowing for:

- Terminal rendered panes, tabs and windows (which can be detached and restored on re-attach)
- Local terminal scrollback (no ^B, page up, etc, just use the scroll bar / mouse wheel / keyboard shortcut of your terminal, same as a local non-tmux terminal). Which is also restored on attach.
- Intuitive selection - meaning that if I, say, have two panes vertically split, if I select a few lines with the mouse for copying, I get ONLY the lines in that pane, NOT the contents of both panes on those lines.

The only way to do that is if the terminal itself renders the panes/tabs/windows, and the only real way to do this is using the tmux -CC (control mode). Which iTerm2 does brilliantly, but is only available on OSX. Just putting in aliases for the ^B commands does nothing for any of those three goals, and could be done by the user themselves if that was what they wanted.

Unfortunately the tmux control mode is not very well documented, and unfortunately, the only answer otherwise is to read the source (https://github.com/tmux/tmux/issues/763). Which, I'll admit, is pretty shitty on tmux's part, however MANY people are clamoring for the native tmux (ala. iTerm2) experience outside of OSX.

That said I believe the bulk of the tmux code in question is here:
https://github.com/tmux/tmux/blob/master/control-notify.c and
https://github.com/tmux/tmux/blob/master/control.c

But I've not had a chance to look at it in depth, and my python skills (for terminator) are poor.