If you live in the terminal, kitty is made for you! Cross-platform, fast, feature-rich, GPU based. https://sw.kovidgoyal.net/kitty/
Find a file
Jeff Quast efeb4aead0 Fix erroneous scroll when using X/Y offsets in images
Problem
-------

In update_dest_rect() when both num_cols and num_rows are 0
(auto-computed, ``a=T``), the first block computes num_cols with
cell_x_offset, but, then the second block mismatches num_cols, causing
it to compute width_px from num_cols and adds cell_x_offset a second
time. The returned value is large enough that it often causes scrolling,
depending on size and location of the screen.

A sample visual program:

```python
import zlib, base64, time
from functools import partial
echo = partial(print, end='', flush=True)

echo('\033[H\033[J')

base = bytes([0, 128, 0, 255]) * 640 * 576
k = zlib.compress(keyframe, 3)
echo(f'\033[8;60H\033_Ga=T,i=1,q=1,f=32,s=640,v=576,o=z,N=1;{base64.b64encode(k).decode()}\033\\')
time.sleep(1)

delta = bytes([200, 0, 0, 255]) * 32 * 512
d = zlib.compress(delta, 3)
echo(f'\033[9;67H\033_Ga=T,i=100,q=1,f=32,s=32,v=512,o=z,N=1,X=9,Y=25;{base64.b64encode(d).decode()}\033\\')

time.sleep(1)
print()
```

Solution
--------

Add 'auto_cols' and 'auto_rows' to remember the original read-only
values before exercising their auto-calculated size. 'auto_rows' isn't
technically necessary given the logic branching but it describes in code
better.

Before and After video
----------------------

A video will be attached shortly, here.
2026-07-12 18:22:40 -04:00
.github Ignore inapplicable CVE 2026-07-12 09:58:05 +05:30
3rdparty
bypy ty does not enforce existence of type signatures on functions, so use ruff to do it 2026-07-07 13:56:54 +05:30
docs Update changelog 2026-07-12 12:16:01 +05:30
gen Migrate type checker to ty 2026-07-04 09:18:00 +05:30
glad ty does not enforce existence of type signatures on functions, so use ruff to do it 2026-07-07 13:56:54 +05:30
glfw Wayland: fail window creation cleanly when the OpenGL context cannot be created 2026-07-11 21:04:38 +02:00
kittens Clean up previous PR 2026-07-09 07:01:18 +05:30
kitty Fix erroneous scroll when using X/Y offsets in images 2026-07-12 18:22:40 -04:00
kitty_tests Fix erroneous scroll when using X/Y offsets in images 2026-07-12 18:22:40 -04:00
logo
shell-integration Do not try to auto install kitten when generating completions 2026-07-03 23:30:59 +05:30
terminfo
tools Benchmark unique multi-codepoint Unicode cells 2026-07-12 15:27:24 +02:00
.editorconfig
.gitattributes
.gitignore Agent neutral instructions 2026-07-06 11:18:16 +05:30
__main__.py
benchmark.py
Brewfile
build-terminfo
CHANGELOG.rst
CONTRIBUTING.md
count-lines-of-code
dev.sh
embeds.go
go.mod Bump go version for stdlib CVEs 2026-07-09 07:46:27 +05:30
go.sum Bump the all-go-deps group with 2 updates 2026-07-06 03:42:57 +00:00
INSTALL.md
key_encoding.json
LICENSE
local-agent.md Agent neutral instructions 2026-07-06 11:18:16 +05:30
Makefile
publish.py
pyproject.toml ty does not enforce existence of type signatures on functions, so use ruff to do it 2026-07-07 13:56:54 +05:30
README.asciidoc
rsync-and-build.sh
SECURITY.md
session.vim
setup.py ... 2026-07-05 20:03:36 +05:30
shell.nix
staticcheck.conf
test.py
update-on-ox

= kitty - the fast, feature-rich, cross-platform, GPU based terminal

If you live in the terminal, *kitty* is made for **you**!

See https://sw.kovidgoyal.net/kitty/[the kitty website].

image:https://github.com/kovidgoyal/kitty/workflows/CI/badge.svg["Build status", link="https://github.com/kovidgoyal/kitty/actions?query=workflow%3ACI"]

https://sw.kovidgoyal.net/kitty/faq/[Frequently Asked Questions]

To ask other questions about kitty usage, use either the https://github.com/kovidgoyal/kitty/discussions/[discussions on GitHub] or the
https://www.reddit.com/r/KittyTerminal[Reddit community]

Packaging status in various repositories:

image:https://repology.org/badge/vertical-allrepos/kitty-terminal.svg?columns=3&header=kitty["Packaging status", link="https://repology.org/project/kitty-terminal/versions"]