kovidgoyal/kitty · error · ValueError
Linear easing curve must have strictly increasing points: {p
Error message
Linear easing curve must have strictly increasing points: {params} does not What it means
When kitty fills in missing x-axis values for a linear easing curve it computes a delta; if the implied/computed x points are not strictly increasing (delta <= 0), the curve is invalid and this error is raised.
Source
Thrown at kitty/options/utils.py:1676
raise ValueError('cubic-bezier easing function must have four points')
return cls(type='cubic-bezier', cubic_bezier_points=(unit_float(parts[0]), float(parts[1]), unit_float(parts[2]), float(parts[3])))
@classmethod
def linear(cls, params: str) -> 'EasingFunction':
parts = params.split(',')
if len(parts) < 2:
raise ValueError('Must specify at least two points for the linear easing function')
xaxis: list[float] = []
yaxis: list[float] = []
def balance(end: float) -> None:
extra = len(yaxis) - len(xaxis)
if extra <= 0:
return
start = xaxis[-1] if xaxis else 0.0
delta = (end - start) / max(1, extra - 1)
if delta <= 0.0:
raise ValueError(f'Linear easing curve must have strictly increasing points: {params} does not')
if xaxis:
for i in range(extra):
xaxis.append(start + (i + 1) * delta)
else:
for i in range(extra):
xaxis.append(i * delta)
def add_point(y: float, x: float | None = None) -> None:
if x is None:
yaxis.append(y)
else:
x = unit_float(x)
balance(x)
xaxis.append(x)
yaxis.append(y)
for r in parts:
points = r.strip().split()View on GitHub (pinned to 6d5d0c4406)
Solutions
- Ensure all x coordinates strictly increase from 0 toward 1
- Omit x values entirely and let kitty balance them, giving only y values
Example fix
# before cursor_blink_interval 0.5:linear(0 0, 0 1) # after cursor_blink_interval 0.5:linear(0 0, 1 1)
Defensive patterns
Strategy: validation
Validate before calling
def valid_linear_xs(parts: list[str]) -> bool:
xs = [float(p.split()[0]) for p in parts if len(p.split()) == 2]
return all(b > a for a, b in zip(xs, xs[1:])) Prevention
- Give only y values and let kitty derive strictly increasing x values
When it happens
Trigger: Supplying x-axis values in a linear() easing that repeat or decrease relative to the auto-balanced points, e.g. linear(0, 0, 1) style inputs causing delta <= 0.
Common situations: Hand-authoring linear easing with duplicate or descending x coordinates, or mixing y-only and x,y points inconsistently.
Related errors
- cubic-bezier easing function must have four points
- Must specify at least two points for the linear easing funct
- {r} has too many points for a linear easing curve parameter
- {jt} is not a valid jump type for a linear easing function
- {spec} specified more than two easing functions
AI-assisted analysis of kovidgoyal/kitty@6d5d0c4406 (2026-08-27).
Data as JSON: /api/errors/5276664f9a8b3cf9.
Report an issue: GitHub.