Commit Graph

18546 Commits

Author SHA1 Message Date
dependabot[bot]
ed28c3b202 Bump the all-go-deps group with 3 updates
Bumps the all-go-deps group with 3 updates: [github.com/klauspost/compress](https://github.com/klauspost/compress), [golang.org/x/sys](https://github.com/golang/sys) and [golang.org/x/text](https://github.com/golang/text).


Updates `github.com/klauspost/compress` from 1.18.6 to 1.19.0
- [Release notes](https://github.com/klauspost/compress/releases)
- [Commits](https://github.com/klauspost/compress/compare/v1.18.6...v1.19.0)

Updates `golang.org/x/sys` from 0.46.0 to 0.47.0
- [Commits](https://github.com/golang/sys/compare/v0.46.0...v0.47.0)

Updates `golang.org/x/text` from 0.38.0 to 0.39.0
- [Release notes](https://github.com/golang/text/releases)
- [Commits](https://github.com/golang/text/compare/v0.38.0...v0.39.0)

---
updated-dependencies:
- dependency-name: github.com/klauspost/compress
  dependency-version: 1.19.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: all-go-deps
- dependency-name: golang.org/x/sys
  dependency-version: 0.47.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: all-go-deps
- dependency-name: golang.org/x/text
  dependency-version: 0.39.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: all-go-deps
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-07-13 03:42:57 +00:00
Kovid Goyal
45a97ee5af macOS: Disable macOS one time code autofill popups
Fixes #10250
2026-07-13 09:06:24 +05:30
Kovid Goyal
e966528a14 Update changelog 2026-07-13 09:00:26 +05:30
Kovid Goyal
2b7ac118fb Merge branch 'jq/bugfix-img-xyoff-scrolling' of https://github.com/jquast/kitty 2026-07-13 08:42:24 +05:30
Kovid Goyal
0bf176be5c Make latest version of ty happy 2026-07-13 08:21:56 +05:30
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
Kovid Goyal
7ab90de166 Merge branch 'fix/text-cache-gc' of https://github.com/Sinity/kitty 2026-07-12 20:07:45 +05:30
Sinity
ed51a3e97c Benchmark unique multi-codepoint Unicode cells
Add a benchmark stream containing 262,144 distinct base-plus-combining-mark cells per repetition so TextCache collection cost remains visible instead of collapsing into cache hits.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-07-12 15:27:24 +02:00
Sinity
b8da20444e Run TextCache GC before drawing text
Move the periodic collection check to PREPARE_FOR_DRAW_TEXT so ordinary and fixed-width text share one safe integration point, while tab handling no longer initiates collection.

Reset the additions counter only after the live-cell remap completes successfully.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-07-12 15:27:24 +02:00
Kovid Goyal
3d64df7492 Update changelog 2026-07-12 12:16:01 +05:30
Kovid Goyal
faec5206d4 Merge branch 'master' of https://github.com/pakhromov/kitty 2026-07-12 12:14:44 +05:30
Kovid Goyal
e0f08269f8 Update changelog 2026-07-12 10:27:56 +05:30
Kovid Goyal
e71c49a17e Merge branch 'fix/historybuf-mmap' of https://github.com/Sinity/kitty 2026-07-12 10:24:14 +05:30
Kovid Goyal
368753682d scroll-window remote control command: Fix a regression that broke scrolling by pages
Fixes #10253
2026-07-12 09:59:34 +05:30
Kovid Goyal
f935258394 Ignore inapplicable CVE 2026-07-12 09:58:05 +05:30
Kovid Goyal
95ded6817b Merge branch 'fix/wayland-egl-failure-crash' of https://github.com/Sinity/kitty 2026-07-12 09:21:07 +05:30
Pavel
edcb87a0de Do not animate cursor trail while the cursor is hidden
Programs that hide the cursor with DECTCEM but keep moving it causes
the trail to run a full animation after every cursor move, which is
unnecessary since the cursor is invisible.

When the cursor is hidden and the trail has fully faded out, snap the
trail corners to the cursor position instead of animating them. The
trail still tracks the hidden cursor, so switching focus to or away
from such a window still animates the trail.
2026-07-12 02:45:44 +02:00
Sinity
d96752e0f1 Allocate history buffer segments with mmap
glibc can raise its dynamic mmap threshold above these MB-scale allocations, routing later scrollback segments through brk. Closing windows then leaves the freed segments stranded in allocator bins and grows the long-lived kitty process.

Back the existing batched segment layout with anonymous mappings instead. This preserves zero-initialization and pointer layout while ensuring the memory is returned to the OS when a history buffer is cleared or destroyed.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-07-11 21:46:30 +02:00
Sinity
0dc74cd93b Wayland: fail window creation cleanly when the OpenGL context cannot be created
_glfwPlatformCreateWindow() ignored the return value of
attach_opengl_context_to_window(), so when EGL is unavailable (for
example libEGL cannot be loaded) it reported success with
window->context left zeroed. glfwCreateWindow() then proceeded to
_glfwRefreshContextAttribs() -> glfwMakeContextCurrent(), which calls
the NULL context.makeCurrent pointer: kitty crashes with SIGSEGV
instead of reporting "Failed to create GLFWwindow. This usually
happens because of old/broken OpenGL drivers." as intended. The X11
backend already propagates these failures.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-07-11 21:04:38 +02:00
Sinity
b2d5a36283 Garbage collect the text cache periodically so unique cell texts do not grow memory without bound
The TextCache interns every unique multi-codepoint cell text for the
lifetime of the window with no eviction, so a stream of unique texts
(for example random combining mark sequences) grows memory without
bound, several hundred MB/hour at moderate throughput.

Mirror the existing hyperlink pool garbage collection: every 8192
newly interned entries, steal the cache contents and have the Screen
remap the index in every live cell (history buffer, main and alt line
buffers, paused rendering snapshot and overlay line), re-interning
only entries still referenced by some cell. Entries whose last
reference scrolled out of the history buffer are freed.

See #10249

Co-Authored-By: Claude <noreply@anthropic.com>
2026-07-11 20:40:02 +02:00
Kovid Goyal
2607d22ac3 Merge branch 'copilot/fix-cursor-trail-start-threshold' of https://github.com/kovidgoyal/kitty
Fix #10248
2026-07-10 07:55:51 +05:30
copilot-swe-agent[bot]
7906e0b96b Make cursor_trail_start_threshold accept two values for x and y dimensions independently 2026-07-10 02:05:57 +00:00
Kovid Goyal
996714cff7 Merge branch 'fix-wayland-ime-popup-position' of https://github.com/lsdhophora/kitty 2026-07-09 07:56:39 +05:30
Kovid Goyal
d453586b9c Bump go version for stdlib CVEs 2026-07-09 07:46:27 +05:30
Kovid Goyal
15a44edefc Clean up previous PR 2026-07-09 07:01:18 +05:30
Kovid Goyal
8d6e855480 Merge branch 'feat/quick-access-terminal-layer-config' of https://github.com/qo0u0op/kitty 2026-07-09 06:58:46 +05:30
lsdhophora
00029d0a6f Fix IME popup position after text_input re-enters on Wayland
When a kitty window regains text-input focus (e.g. switching back to a
workspace in sway, unminimizing, or unlocking the screen), the
zwp_text_input_v3::enter event is fired. However, text_input_enter()
only called enable + set_content_type without restoring the cursor
rectangle. If the compositor does not re-send wl_keyboard.enter at the
same time, kitty never updates the IME position, causing the popup to
appear at the top-left corner.

Restore the last known cursor rectangle in text_input_enter() so the
IME popup immediately appears at the correct position.
2026-07-09 08:22:06 +08:00
qo0u0op
ead0836c5d feat(quick-access-terminal): make --layer configurable 2026-07-09 02:18:03 +08:00
Kovid Goyal
efc31d9de8 note that bspwm does not support the needed NET_WM protocols for the panel kitten 2026-07-08 20:12:41 +05:30
Kovid Goyal
5d0c976018 Merge branch 'fix-smooth-scroll-timers' of https://github.com/ivaradi/kitty 2026-07-08 19:28:54 +05:30
István Váradi
18abd21a9f Remove timer when scroll finished
If smooth scrolling has reached its target, scroll_animation_tick()
clears the timer ID in the animation object. However, the timer
was not removed, which resulted in the timers potentially accumulating
and preventing the creation of new timers eventually. This caused smooth
scrolling to stop working in the terminal.
2026-07-08 15:47:55 +02:00
Kovid Goyal
5879199d4a Update changelog 2026-07-07 20:05:03 +05:30
Kovid Goyal
b161786253 Merge branch 'follow-cocoa-platform' of https://github.com/zzhaolei/kitty 2026-07-07 20:01:42 +05:30
Kovid Goyal
46ed64782c Merge branch 'master' of https://github.com/tellezhector/kitty 2026-07-07 15:02:12 +05:30
Hector Tellez
501f28acdf Fixes bug where hints starting with the first alphabet's character are _almost never_ generated.
* Switches to "positional notation" to fix the bug.
* Consolidates `encode_hint` and `generate_prefix_free_hint` into `encode_hint`.
* Moves prefix_free_hints.go to hints_generator.go; `encode_hint` and `decode_hint` were moved here too.
* The "prefix-free" logic was made 0-index based instead of 1-index based for two reasons:
  1. To simplify 1-off discrepancies.
  2. To keep backwards compatibility with the old usage of `encode_hint`.
* Slight perfomance improvement added by reusing the runt-to-index map instead of rebuilding for each call to `decode_hint`.
* Unit tests added; for all new logic and old affected logic.

Fixes #10231
2026-07-07 02:07:51 -07:00
Kovid Goyal
1543831a1c Get rid of some obsolete TypeVar usages 2026-07-07 14:01:30 +05:30
Kovid Goyal
8860f1a0a7 ty does not enforce existence of type signatures on functions, so use ruff to do it 2026-07-07 13:56:54 +05:30
zhaolei
e7a7362d54 Make first mouse clicks activate and pass through
Allow the first mouse click on an inactive Cocoa OS window to be delivered to kitty instead of only activating the window.

Make the matching kitty-internal behavior consistent by forwarding clicks that switch focus to another kitty window in the currently focused OS window. This lets the same first click both focus the target kitty window and perform the click action, including forwarding to mouse-tracking applications.
2026-07-07 15:51:20 +08:00
Kovid Goyal
cc95fccc8d Merge branch 'fix-freebsd-wayland-dnd' of https://github.com/MiguelRegueiro/kitty 2026-07-07 06:40:10 +05:30
MiguelRegueiro
0b95d43833 Fix Wayland drag source startup on FreeBSD 2026-07-06 21:07:08 +02:00
MiguelRegueiro
aedb75d4f3 Fix FreeBSD Wayland build 2026-07-06 21:07:01 +02:00
Kovid Goyal
fab7ce90db Agent neutral instructions 2026-07-06 11:18:16 +05:30
Kovid Goyal
4e01ab48cc ... 2026-07-06 09:35:04 +05:30
Kovid Goyal
a16ee94f12 Merge branch 'dependabot/github_actions/actions-0faa7b25e7' of https://github.com/kovidgoyal/kitty 2026-07-06 09:32:54 +05:30
Kovid Goyal
a97243613e Merge branch 'dependabot/go_modules/all-go-deps-8549c3adfb' of https://github.com/kovidgoyal/kitty 2026-07-06 09:32:43 +05:30
Kovid Goyal
93552eba08 Fix race between starting talk thread and calling wakeup_talk_thread 2026-07-06 09:31:46 +05:30
dependabot[bot]
8e9f335012 Bump the actions group with 3 updates
Bumps the actions group with 3 updates: [actions/setup-python](https://github.com/actions/setup-python), [actions/setup-go](https://github.com/actions/setup-go) and [actions/cache](https://github.com/actions/cache).


Updates `actions/setup-python` from 6.2.0 to 6.3.0
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/v6.2.0...v6.3.0)

Updates `actions/setup-go` from 6.4.0 to 6.5.0
- [Release notes](https://github.com/actions/setup-go/releases)
- [Commits](https://github.com/actions/setup-go/compare/v6.4.0...v6.5.0)

Updates `actions/cache` from 5.0.5 to 6.1.0
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](https://github.com/actions/cache/compare/v5.0.5...v6.1.0)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-version: 6.3.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: actions
- dependency-name: actions/setup-go
  dependency-version: 6.5.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: actions
- dependency-name: actions/cache
  dependency-version: 6.1.0
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: actions
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-07-06 03:45:02 +00:00
dependabot[bot]
20f7bdb4e0 Bump the all-go-deps group with 2 updates
Bumps the all-go-deps group with 2 updates: [github.com/emmansun/base64](https://github.com/emmansun/base64) and [github.com/shirou/gopsutil/v4](https://github.com/shirou/gopsutil).


Updates `github.com/emmansun/base64` from 0.9.0 to 0.10.0
- [Release notes](https://github.com/emmansun/base64/releases)
- [Commits](https://github.com/emmansun/base64/compare/v0.9.0...v0.10.0)

Updates `github.com/shirou/gopsutil/v4` from 4.26.5 to 4.26.6
- [Release notes](https://github.com/shirou/gopsutil/releases)
- [Commits](https://github.com/shirou/gopsutil/compare/v4.26.5...v4.26.6)

---
updated-dependencies:
- dependency-name: github.com/emmansun/base64
  dependency-version: 0.10.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: all-go-deps
- dependency-name: github.com/shirou/gopsutil/v4
  dependency-version: 4.26.6
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: all-go-deps
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-07-06 03:42:57 +00:00
Kovid Goyal
d348fbc17a ... 2026-07-06 09:09:43 +05:30
Kovid Goyal
d5cac0100e Fix remote_control_script not working in a kitty instance run from inside another kitty instance 2026-07-06 09:08:43 +05:30