Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When entering copy mode in tmux, an indicator in the upper right corner shows "[0/0]". I can't find any documentation in the man page about what these numbers mean, and it's difficult to search since Google throws away the brackets and slash.

This is generated by window_copy_write_line() in window-copy.c:

if (py == 0) {
    size = xsnprintf(hdr, sizeof hdr,
        "[%u/%u]", data->oy, screen_hsize(data->backing));
    if (size > screen_size_x(s))
        size = screen_size_x(s);
    screen_write_cursormove(ctx, screen_size_x(s) - size, 0);
    screen_write_puts(ctx, &gc, "%s", hdr);

but the variable names aren't very instructive to someone who isn't familiar with the code.

Any hints as to what these numbers mean?

share|improve this question
up vote 0 down vote accepted

They are the line indicators for where you are in the buffer with respect to screen size, 0 being the last line (at the bottom) and they increase as you go back. The line number shown will always be the line at the bottom of the screen.

Using vi/vim like commands such as :50 will put you on line 50 with the cursor at the bottom of the screen, and if you had 100 lines available in the scroll back buffer it would show [50/100]

It's sort of hard to describe but if you have 120 lines of actual buffer available, but your screen height was 20 lines it would show [x/100] and when you did a :100 the cursor would put line 100 at the bottom of the screen and you would still have 20 more lines above it, yet scrolling up to line 120 would not put you at [120/120] but stay at [100/100].

share|improve this answer
So the second number is the number of lines that have scrolled off the active terminal view, and the first number is the number of lines that are newer in the buffer than the last line showing. So it basically gives you a feeling about where you are in the buffer. Thanks! – bps Apr 13 '12 at 17:55

Roughly speaking, the second number is the number of lines in the pane's history that don't fit on the screen. The first number is greater than 0 if you've scrolled up past the top of the pane in copy mode, and some number of lines are "below" the bottom of the screen.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .