cycleMode method
Cycles through DebugOverlayMode values.
Preserves the selected position; composition clamps the new panel size to the terminal bounds.
Implementation
DebugOverlayModel cycleMode() {
final modes = DebugOverlayMode.values;
final next = modes[(mode.index + 1) % modes.length];
return selectMode(next);
}