/* Support for adjoining display (if terminal is wide enough) */
#ifdef TOG4_OFF_SEP
-static char Adjoin_sp[] = " ";
+static char Adjoin_sp[] = " ";
#define ADJOIN_space (sizeof(Adjoin_sp) - 1) // 1 for null
#else
-static char Adjoin_sp[] = " ~1 ~6 ";
+static char Adjoin_sp[] = " ~6 ~1";
#define ADJOIN_space (sizeof(Adjoin_sp) - 5) // 1 for null + 4 unprintable
#endif
#define ADJOIN_limit 8
int num = (Curwin->rc.double_up + 1);
int pfx = (Curwin->rc.double_up < 2) ? GRAPH_prefix_std : GRAPH_prefix_abv;
Graph_len = (Screen_cols - (ADJOIN_space * Curwin->rc.double_up) - (num * (pfx + GRAPH_suffix))) / num;
- Graph_len += (Screen_cols % num) ? 0 : 1;
} else {
Graph_len = Screen_cols - (GRAPH_prefix_std + GRAPH_length_max + GRAPH_suffix);
if (Graph_len >= 0) Graph_len = GRAPH_length_max;
break;
case '4':
w->rc.double_up += 1;
- if (w->rc.double_up >= ADJOIN_limit) w->rc.double_up = 0;
+ if ((w->rc.double_up >= ADJOIN_limit)
+ || ((w->rc.double_up >= Cpu_cnt)))
+ w->rc.double_up = 0;
OFFw(w, (View_CPUSUM | View_CPUNOD));
break;
case 'C':
}
snprintf(buf3, sizeof(buf3), "%s%s", buf1, buf2);
// 'width' has accounted for any show_special directives embedded above
- snprintf(rx.graph, sizeof(rx.graph), "[~1%-*.*s]~1", width, width, buf3);
+ snprintf(rx.graph, sizeof(rx.graph), "[~1%-*.*s] ~1", width, width, buf3);
return ℞
} // end: sum_rx
, rx->graph);
}
Msg_row += sum_see(row, mem2UP);
+
rx = sum_rx(MEM_VAL(swp_TOT), 0, MEM_VAL(swp_USE), Curwin->rc.graph_mems);
if (Curwin->rc.double_up > 1)
snprintf(row, sizeof(row), "%s %s~3%3.0f%s"