kovidgoyal/kitty · info

%s %s %u

Error message

%s %s %u

What it means

The application sent CSI N T (tab clear / TBC) with an invalid parameter 'how' (not 0, 2, or 3); kitty logs the value and ignores the sequence.

Source

Thrown at kitty/screen.c:2399

                self->cursor->x = i;
                break;
            }
        }
        if (i <= 0) self->cursor->x = 0;
    }
}

void
screen_clear_tab_stop(Screen *self, unsigned int how) {
    switch (how) {
        case 0:
            if (self->cursor->x < self->columns) self->tabstops[self->cursor->x] = false;
            break;
        case 2: break; // no-op
        case 3:
            for (unsigned int i = 0; i < self->columns; i++) self->tabstops[i] = false;
            break;
        default: log_error("%s %s %u", ERROR_PREFIX, "Unsupported clear tab stop mode: ", how); break;
    }
}

void
screen_set_tab_stop(Screen *self) {
    if (self->cursor->x < self->columns) self->tabstops[self->cursor->x] = true;
}

void
screen_reset_tab_stops(Screen *self) {
    init_tabstops(self->tabstops, self->columns);
}

void
screen_cursor_move(Screen *self, unsigned int count /*=1*/, int move_direction /*=-1*/, bool allow_move_to_previous_line) {
    if (count == 0) count = 1;
    bool in_margins = cursor_within_margins(self);
    if (move_direction > 0) {

View on GitHub (pinned to 6d5d0c4406)

Solutions

  1. Ignore - the sequence is discarded
  2. Fix the emitting program to use 0 (clear current), 2 (line, no-op in kitty), or 3 (clear all)

Example fix

# before
printf '\033[5T'
# after
printf '\033[3T'  # clear all tab stops
Defensive patterns

Strategy: validation

Validate before calling

# only emit valid TBC parameters
assert how in (0, 2, 3)
sys.stdout.write(f'\033[{how}T')

Prevention

When it happens

Trigger: Malformed tab-clear escape sequence such as CSI 5 T from a buggy terminal client or TUI library.

Common situations: Bugs in TUI libraries emitting nonstandard TBC parameters; harmless.

Related errors


AI-assisted analysis of kovidgoyal/kitty@6d5d0c4406 (2026-08-27). Data as JSON: /api/errors/e7c3bd792919446a. Report an issue: GitHub.