Commit graph

19464 commits

Author SHA1 Message Date
rudolf-blue
3a294df4da Round up poll timeout in the I/O loop
Truncating to ms made the loop spin with a zero timeout until the deadline.
2026-10-08 12:00:20 -04:00
rudolf-blue
7468112c0b Fix leak when growing buffered keys 2026-10-08 12:00:20 -04:00
Kovid Goyal
24f7369bb6
Drop Unicode placeholder cell images scrolled off the bottom of the screen
A full screen reverse scroll (ESC M at the top, CSI T) moves every image
ref down a row. scroll_filter_func() only removed refs that left through
the top, so a cell image on the bottom line ended up at row `lines`, off
screen, while its line was discarded. The next forward scroll brought it
back onto the bottom row, where the line has no placeholders.
screen_render_line_graphics() returns early for such lines, so nothing
removed the ref and a slice of the old image was drawn over the new text.
tmux and pagers send ESC M when scrolling down, so this shows up in
practice. Fix it by dropping cell image refs that move below the bottom
margin, the same way the margins scroll path drops refs that leave the
region.

This replaces PR #10623, which was not merged for these reasons:

- It does not find the cause. It removes cell image refs at render time
  for every line without placeholders, so the stale ref still exists and
  is still seen by anything that reads refs before the next render, such
  as graphics query and delete commands and the paused rendering path,
  which returns before the new code.
- It costs time on every frame. Whenever any image is loaded, even with
  no placeholders at all, each clean visible line and each visible
  history line triggers a walk over all images and refs. Before, such
  lines cost nothing. This fix adds one comparison to a loop that only
  runs when the screen scrolls.

Close #10623
2026-10-07 20:19:23 +05:30
Kovid Goyal
7e7355ccbe
make ty 85 happy
Some checks are pending
CI / Linux (python=3.14 cc=clang sanitize=1) (push) Waiting to run
CI / Linux (python=3.12 cc=gcc sanitize=0) (push) Waiting to run
CI / Linux (python=3.13 cc=gcc sanitize=1) (push) Waiting to run
CI / Linux package (push) Waiting to run
CI / Bundle test (macos-latest) (push) Waiting to run
CI / Bundle test (ubuntu-latest) (push) Waiting to run
CI / macOS Brew (push) Waiting to run
CI / Test ./dev.sh and benchmark (push) Waiting to run
CodeQL / CodeQL-Build (actions, ubuntu-latest) (push) Waiting to run
CodeQL / CodeQL-Build (c, macos-latest) (push) Waiting to run
CodeQL / CodeQL-Build (c, ubuntu-latest) (push) Waiting to run
CodeQL / CodeQL-Build (go, ubuntu-latest) (push) Waiting to run
CodeQL / CodeQL-Build (python, ubuntu-latest) (push) Waiting to run
Depscan / Scan dependencies for vulnerabilities (push) Waiting to run
2026-10-07 05:07:04 +05:30
Kovid Goyal
9f61eaf0f2
Increase notarization timeout 2026-10-07 04:32:42 +05:30
Kovid Goyal
96693f4c09
Merge branch 'fix/scroll-animation-close' of https://github.com/M-Hassan-Raza/kitty
Some checks are pending
CI / Linux (python=3.14 cc=clang sanitize=1) (push) Waiting to run
CI / Linux (python=3.12 cc=gcc sanitize=0) (push) Waiting to run
CI / Linux (python=3.13 cc=gcc sanitize=1) (push) Waiting to run
CI / Linux package (push) Waiting to run
CI / Bundle test (macos-latest) (push) Waiting to run
CI / Bundle test (ubuntu-latest) (push) Waiting to run
CI / macOS Brew (push) Waiting to run
CI / Test ./dev.sh and benchmark (push) Waiting to run
CodeQL / CodeQL-Build (actions, ubuntu-latest) (push) Waiting to run
CodeQL / CodeQL-Build (c, macos-latest) (push) Waiting to run
CodeQL / CodeQL-Build (c, ubuntu-latest) (push) Waiting to run
CodeQL / CodeQL-Build (go, ubuntu-latest) (push) Waiting to run
CodeQL / CodeQL-Build (python, ubuntu-latest) (push) Waiting to run
Depscan / Scan dependencies for vulnerabilities (push) Waiting to run
2026-10-06 19:30:29 +05:30
Hassan Raza
3142901159
Stop scroll animations when closing a window 2026-10-06 18:51:05 +05:00
Kovid Goyal
8ca3cc0d30
Merge branch 'fix/docs-command-examples' of https://github.com/M-Hassan-Raza/kitty
Some checks are pending
CI / Linux (python=3.14 cc=clang sanitize=1) (push) Waiting to run
CI / Linux (python=3.12 cc=gcc sanitize=0) (push) Waiting to run
CI / Linux (python=3.13 cc=gcc sanitize=1) (push) Waiting to run
CI / Linux package (push) Waiting to run
CI / Bundle test (macos-latest) (push) Waiting to run
CI / Bundle test (ubuntu-latest) (push) Waiting to run
CI / macOS Brew (push) Waiting to run
CI / Test ./dev.sh and benchmark (push) Waiting to run
CodeQL / CodeQL-Build (actions, ubuntu-latest) (push) Waiting to run
CodeQL / CodeQL-Build (c, macos-latest) (push) Waiting to run
CodeQL / CodeQL-Build (c, ubuntu-latest) (push) Waiting to run
CodeQL / CodeQL-Build (go, ubuntu-latest) (push) Waiting to run
CodeQL / CodeQL-Build (python, ubuntu-latest) (push) Waiting to run
Depscan / Scan dependencies for vulnerabilities (push) Waiting to run
2026-10-06 17:01:25 +05:30
Hassan Raza
35c9a02018
Use launch in the remote control example 2026-10-06 16:04:16 +05:00
Hassan Raza
f8470df186
Correct the documentation dependency install command 2026-10-06 16:04:16 +05:00
Kovid Goyal
ccd671c658
Merge branch 'toplevel_data_for_drag' of https://github.com/Safari77/kitty 2026-10-06 15:37:12 +05:30
Kovid Goyal
2932c6994a
Fix #10619 2026-10-06 15:36:13 +05:30
Kovid Goyal
a73c7cbc0a
Fix #10618 2026-10-06 15:29:26 +05:30
Sami Farin
712276412a toplevel_data_for_drag: check for NULL from as_file_url
Avoid segfault in strlen() inside finish_remote_data() if
as_file_url returns NULL.
2026-10-06 12:56:57 +03:00
Kovid Goyal
4fd2ecc2c5
autoformat 2026-10-06 15:21:45 +05:30
Kovid Goyal
5421df1cd3
Cleanup previous PR
Fix problems found while reviewing the EINTR handling changes to
safe-wrappers.h merged from PR #10615.

- safe_connect: the PR waited for POLLOUT and read SO_ERROR after an
  EINTR from connect(). That only works for sockets where an interrupted
  connect continues in the background, such as TCP. AF_UNIX stream
  sockets on Linux are left unconnected but writable, so safe_connect
  returned success on an unconnected socket. This broke the single
  instance launcher when the server's listen backlog was full. Now
  connect() is retried after EINTR, EISCONN on a retry is treated as
  success, and poll()+SO_ERROR is used only on EALREADY. While waiting,
  SO_SNDTIMEO is honored (with a monotonic deadline across EINTR from
  poll) instead of polling with an infinite timeout. The EAGAIN retry
  the PR dropped is restored.

- safe_mkstemp: rather than copying the template into a PATH_MAX buffer,
  which rejected templates longer than 1024 bytes on macOS/BSD, restore
  only the trailing X characters when mkostemp() is interrupted. Use
  mkostemp(O_CLOEXEC) on all platforms. macOS has had it since 10.12 and
  disk-cache.c already relied on it. This removes the duplicated
  platform #if blocks and the racy mkstemp+fcntl(FD_CLOEXEC) fallback.

- disk-cache: open_cache_file_without_tmpfile had its own mkostemp EINTR
  loop with the same template corruption bug. Use safe_mkstemp instead.

- Add safe_write_all() and use it in place of the hand-written write
  loops in dnd.c and the single instance launcher. Also fix
  finish_remote_data() in dnd.c, which passed -1 instead of errno to
  abrt() when writing the uri list failed.
2026-10-06 15:16:15 +05:30
Sami Farin
448aeefe5d
safe-wrappers.h fixes
- safe_mkstemp: fix template corruption and atomicity
    mkstemp mutates the template in place, causing subsequent retries on
    EINTR to fail with EINVAL. Save the template before invocation and use
    atomic mkostemp(..., O_CLOEXEC) on supported platforms.

- safe_connect and safe_accept: fix socket connection state machine
    - safe_connect: Retrying connect() on EINTR violates stream socket semantics
      (yields EISCONN/EALREADY). Poll for POLLOUT and query SO_ERROR instead.
    - safe_accept: Remove EAGAIN busy-wait loop to avoid 100% CPU spin on
      non-blocking sockets or when timeouts expire.

- safe_write: prevent stream corruption
    Comparing ret != 0 caused successful writes (> 0) to repeat whenever
    stale EINTR remained in errno, duplicating payload data across PTY and
    socket streams. Change check to ret < 0.

- safe_close: eliminate descriptor reuse race
    POSIX-compliant modern kernels (Linux, macOS, BSDs) detach and release
    file descriptors before handling signal interruptions. Looping close() on
    EINTR risks closing an unrelated file descriptor allocated concurrently
    by another thread.
2026-10-06 15:16:09 +05:30
Kovid Goyal
ce459fb1a4
Merge branch 'fix/go-test-diagnostics' of https://github.com/M-Hassan-Raza/kitty 2026-10-06 15:12:13 +05:30
Hassan Raza
c137a577d8
Retain Go diagnostics when the test process fails 2026-10-06 14:31:17 +05:00
Kovid Goyal
6732123dfb
Merge branch 'fix/test-launcher-path' of https://github.com/M-Hassan-Raza/kitty 2026-10-06 14:01:41 +05:30
Kovid Goyal
08e7488c30
Bumpversion of openssl for CVEs 2026-10-06 13:37:28 +05:30
Hassan Raza
35b4e5838b
Use the running launcher directory in test PATH 2026-10-06 12:55:31 +05:00
Kovid Goyal
affbdaea37
Merge branch 'fix/go-test-selection' of https://github.com/M-Hassan-Raza/kitty 2026-10-06 13:10:42 +05:30
Hassan Raza
e18a2e3ec6
Run all requested Go test names 2026-10-06 12:17:51 +05:00
Kovid Goyal
5466034fcf
macOS: Improve throughput when input_delay=0
Closes #10611
2026-10-06 12:10:50 +05:30
Kovid Goyal
a5c75acb7d
handle invalid UTF-8 in binary mime db
Some checks are pending
CI / Linux (python=3.14 cc=clang sanitize=1) (push) Waiting to run
CI / Linux (python=3.12 cc=gcc sanitize=0) (push) Waiting to run
CI / Linux (python=3.13 cc=gcc sanitize=1) (push) Waiting to run
CI / Linux package (push) Waiting to run
CI / Bundle test (macos-latest) (push) Waiting to run
CI / Bundle test (ubuntu-latest) (push) Waiting to run
CI / macOS Brew (push) Waiting to run
CI / Test ./dev.sh and benchmark (push) Waiting to run
CodeQL / CodeQL-Build (actions, ubuntu-latest) (push) Waiting to run
CodeQL / CodeQL-Build (c, macos-latest) (push) Waiting to run
CodeQL / CodeQL-Build (c, ubuntu-latest) (push) Waiting to run
CodeQL / CodeQL-Build (go, ubuntu-latest) (push) Waiting to run
CodeQL / CodeQL-Build (python, ubuntu-latest) (push) Waiting to run
Depscan / Scan dependencies for vulnerabilities (push) Waiting to run
2026-10-06 08:58:50 +05:30
Kovid Goyal
c168e31801
Use binary XDG shared MIME database for mimetype lookups
Fixes #3056
2026-10-06 08:27:55 +05:30
Kovid Goyal
7218cc0915
...
Some checks are pending
CI / Linux (python=3.14 cc=clang sanitize=1) (push) Waiting to run
CI / Linux (python=3.12 cc=gcc sanitize=0) (push) Waiting to run
CI / Linux (python=3.13 cc=gcc sanitize=1) (push) Waiting to run
CI / Linux package (push) Waiting to run
CI / Bundle test (macos-latest) (push) Waiting to run
CI / Bundle test (ubuntu-latest) (push) Waiting to run
CI / macOS Brew (push) Waiting to run
CI / Test ./dev.sh and benchmark (push) Waiting to run
CodeQL / CodeQL-Build (actions, ubuntu-latest) (push) Waiting to run
CodeQL / CodeQL-Build (c, macos-latest) (push) Waiting to run
CodeQL / CodeQL-Build (c, ubuntu-latest) (push) Waiting to run
CodeQL / CodeQL-Build (go, ubuntu-latest) (push) Waiting to run
CodeQL / CodeQL-Build (python, ubuntu-latest) (push) Waiting to run
Depscan / Scan dependencies for vulnerabilities (push) Waiting to run
2026-10-05 20:47:23 +05:30
Kovid Goyal
d3236c5aab
Merge branch 'fix-cell-images-after-paused-render' of https://github.com/fairyhunter13/kitty 2026-10-05 20:47:16 +05:30
Kovid Goyal
51aa327be1
Fix momentum scroll scale not being set for negative deltas
The scale between scaled and unscaled offsets was only calculated for
positive deltas, so when scrolling up or left it stayed at zero (or stale from
a previous scroll), causing momentum events to have zero offsets.

Closes #10610
2026-10-05 20:42:16 +05:30
Kovid Goyal
007e61a59e
Fix #10609 2026-10-05 20:34:59 +05:30
fairyhunter13
36a560c3e7 Fix stale Unicode placeholder images after a synchronized update
While rendering is paused, screen_update_cell_data() rendered the line
graphics of the snapshot lines into the live graphics manager. Paused
frames draw paused_rendering.grman, so those cell image refs were never
shown during the pause, and after the pause they stayed at rows whose
live lines had since scrolled or been overwritten: the live line has no
placeholders, so screen_render_line_graphics() returns early and never
removes them.
2026-10-05 20:24:45 +07:00
Kovid Goyal
dedb3701fc
...
Some checks are pending
CI / Linux (python=3.14 cc=clang sanitize=1) (push) Waiting to run
CI / Linux (python=3.12 cc=gcc sanitize=0) (push) Waiting to run
CI / Linux (python=3.13 cc=gcc sanitize=1) (push) Waiting to run
CI / Linux package (push) Waiting to run
CI / Bundle test (macos-latest) (push) Waiting to run
CI / Bundle test (ubuntu-latest) (push) Waiting to run
CI / macOS Brew (push) Waiting to run
CI / Test ./dev.sh and benchmark (push) Waiting to run
CodeQL / CodeQL-Build (actions, ubuntu-latest) (push) Waiting to run
CodeQL / CodeQL-Build (c, macos-latest) (push) Waiting to run
CodeQL / CodeQL-Build (c, ubuntu-latest) (push) Waiting to run
CodeQL / CodeQL-Build (go, ubuntu-latest) (push) Waiting to run
CodeQL / CodeQL-Build (python, ubuntu-latest) (push) Waiting to run
Depscan / Scan dependencies for vulnerabilities (push) Waiting to run
2026-10-05 17:10:58 +05:30
Kovid Goyal
18c156dc53
Merge branch 'fix/cursor-text-blink' of https://github.com/M-Hassan-Raza/kitty 2026-10-05 17:10:39 +05:30
Hassan Raza
c15b077b6b
Set cursor text blinking without inverting it 2026-10-05 15:24:21 +05:00
Kovid Goyal
78d5892e26
Speed up northern lights
Some checks are pending
CI / Linux (python=3.14 cc=clang sanitize=1) (push) Waiting to run
CI / Linux (python=3.12 cc=gcc sanitize=0) (push) Waiting to run
CI / Linux (python=3.13 cc=gcc sanitize=1) (push) Waiting to run
CI / Linux package (push) Waiting to run
CI / Bundle test (macos-latest) (push) Waiting to run
CI / Bundle test (ubuntu-latest) (push) Waiting to run
CI / macOS Brew (push) Waiting to run
CI / Test ./dev.sh and benchmark (push) Waiting to run
CodeQL / CodeQL-Build (actions, ubuntu-latest) (push) Waiting to run
CodeQL / CodeQL-Build (c, macos-latest) (push) Waiting to run
CodeQL / CodeQL-Build (c, ubuntu-latest) (push) Waiting to run
CodeQL / CodeQL-Build (go, ubuntu-latest) (push) Waiting to run
CodeQL / CodeQL-Build (python, ubuntu-latest) (push) Waiting to run
Depscan / Scan dependencies for vulnerabilities (push) Waiting to run
2026-10-05 11:01:48 +05:30
Kovid Goyal
a038adc163
Merge branch 'dependabot/github_actions/actions-a63e66b24a' of https://github.com/kovidgoyal/kitty 2026-10-05 09:35:04 +05:30
Kovid Goyal
65b518fa5c
Merge branch 'dependabot/go_modules/all-go-deps-95a9545cca' of https://github.com/kovidgoyal/kitty 2026-10-05 09:34:38 +05:30
dependabot[bot]
f902d48aec
Bump github/codeql-action from 4.38.1 to 4.38.2 in the actions group
Bumps the actions group with 1 update: [github/codeql-action](https://github.com/github/codeql-action).


Updates `github/codeql-action` from 4.38.1 to 4.38.2
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/v4.38.1...v4.38.2)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-version: 4.38.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: actions
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-10-05 03:44:57 +00:00
dependabot[bot]
d3afb75863
Bump the all-go-deps group with 2 updates
Bumps the all-go-deps group with 2 updates: [github.com/klauspost/compress](https://github.com/klauspost/compress) and [github.com/shirou/gopsutil/v4](https://github.com/shirou/gopsutil).


Updates `github.com/klauspost/compress` from 1.20.0 to 1.20.1
- [Release notes](https://github.com/klauspost/compress/releases)
- [Commits](https://github.com/klauspost/compress/compare/v1.20.0...v1.20.1)

Updates `github.com/shirou/gopsutil/v4` from 4.26.8 to 4.26.9
- [Release notes](https://github.com/shirou/gopsutil/releases)
- [Commits](https://github.com/shirou/gopsutil/compare/v4.26.8...v4.26.9)

---
updated-dependencies:
- dependency-name: github.com/klauspost/compress
  dependency-version: 1.20.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: all-go-deps
- dependency-name: github.com/shirou/gopsutil/v4
  dependency-version: 4.26.9
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: all-go-deps
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-10-05 03:43:02 +00:00
Kovid Goyal
643f18f292
Fix #10604
Some checks are pending
CI / Linux (python=3.14 cc=clang sanitize=1) (push) Waiting to run
CI / Linux (python=3.12 cc=gcc sanitize=0) (push) Waiting to run
CI / Linux (python=3.13 cc=gcc sanitize=1) (push) Waiting to run
CI / Linux package (push) Waiting to run
CI / Bundle test (macos-latest) (push) Waiting to run
CI / Bundle test (ubuntu-latest) (push) Waiting to run
CI / macOS Brew (push) Waiting to run
CI / Test ./dev.sh and benchmark (push) Waiting to run
CodeQL / CodeQL-Build (actions, ubuntu-latest) (push) Waiting to run
CodeQL / CodeQL-Build (c, macos-latest) (push) Waiting to run
CodeQL / CodeQL-Build (c, ubuntu-latest) (push) Waiting to run
CodeQL / CodeQL-Build (go, ubuntu-latest) (push) Waiting to run
CodeQL / CodeQL-Build (python, ubuntu-latest) (push) Waiting to run
Depscan / Scan dependencies for vulnerabilities (push) Waiting to run
2026-10-05 04:49:44 +05:30
Kovid Goyal
033674afea
Fix #10603 2026-10-05 04:16:54 +05:30
Kovid Goyal
83e5692817
Fix #10602 2026-10-05 03:50:54 +05:30
Kovid Goyal
b493a637b0
Graphics protocol: Fix no response for animation chunks when a=f specified in continuations
Fixes #10599
Fixes #10600
2026-10-05 03:23:27 +05:30
Kovid Goyal
79f687dc5c
...
Some checks are pending
CI / Linux (python=3.14 cc=clang sanitize=1) (push) Waiting to run
CI / Linux (python=3.12 cc=gcc sanitize=0) (push) Waiting to run
CI / Linux (python=3.13 cc=gcc sanitize=1) (push) Waiting to run
CI / Linux package (push) Waiting to run
CI / Bundle test (macos-latest) (push) Waiting to run
CI / Bundle test (ubuntu-latest) (push) Waiting to run
CI / macOS Brew (push) Waiting to run
CI / Test ./dev.sh and benchmark (push) Waiting to run
CodeQL / CodeQL-Build (actions, ubuntu-latest) (push) Waiting to run
CodeQL / CodeQL-Build (c, macos-latest) (push) Waiting to run
CodeQL / CodeQL-Build (c, ubuntu-latest) (push) Waiting to run
CodeQL / CodeQL-Build (go, ubuntu-latest) (push) Waiting to run
CodeQL / CodeQL-Build (python, ubuntu-latest) (push) Waiting to run
Depscan / Scan dependencies for vulnerabilities (push) Waiting to run
2026-10-04 14:33:12 +05:30
Kovid Goyal
a7c64b5b09
Wayland: Fix frame callbacks accumulating in the compositor for occluded windows
Fixes #10597
2026-10-04 14:14:36 +05:30
Kovid Goyal
1553a26310
...
Some checks are pending
CI / Linux (python=3.14 cc=clang sanitize=1) (push) Waiting to run
CI / Linux (python=3.12 cc=gcc sanitize=0) (push) Waiting to run
CI / Linux (python=3.13 cc=gcc sanitize=1) (push) Waiting to run
CI / Linux package (push) Waiting to run
CI / Bundle test (macos-latest) (push) Waiting to run
CI / Bundle test (ubuntu-latest) (push) Waiting to run
CI / macOS Brew (push) Waiting to run
CI / Test ./dev.sh and benchmark (push) Waiting to run
CodeQL / CodeQL-Build (actions, ubuntu-latest) (push) Waiting to run
CodeQL / CodeQL-Build (c, macos-latest) (push) Waiting to run
CodeQL / CodeQL-Build (c, ubuntu-latest) (push) Waiting to run
CodeQL / CodeQL-Build (go, ubuntu-latest) (push) Waiting to run
CodeQL / CodeQL-Build (python, ubuntu-latest) (push) Waiting to run
Depscan / Scan dependencies for vulnerabilities (push) Waiting to run
2026-10-04 07:59:52 +05:30
Kovid Goyal
c90413f319
Ignore inapplicable CVE 2026-10-04 07:44:08 +05:30
Kovid Goyal
9939c7b471
Improve time uniforms available to custom shaders. Fixes #10591
Some checks are pending
CI / Linux (python=3.14 cc=clang sanitize=1) (push) Waiting to run
CI / Linux (python=3.12 cc=gcc sanitize=0) (push) Waiting to run
CI / Linux (python=3.13 cc=gcc sanitize=1) (push) Waiting to run
CI / Linux package (push) Waiting to run
CI / Bundle test (macos-latest) (push) Waiting to run
CI / Bundle test (ubuntu-latest) (push) Waiting to run
CI / macOS Brew (push) Waiting to run
CI / Test ./dev.sh and benchmark (push) Waiting to run
CodeQL / CodeQL-Build (actions, ubuntu-latest) (push) Waiting to run
CodeQL / CodeQL-Build (c, macos-latest) (push) Waiting to run
CodeQL / CodeQL-Build (c, ubuntu-latest) (push) Waiting to run
CodeQL / CodeQL-Build (go, ubuntu-latest) (push) Waiting to run
CodeQL / CodeQL-Build (python, ubuntu-latest) (push) Waiting to run
Depscan / Scan dependencies for vulnerabilities (push) Waiting to run
2026-10-03 23:25:52 +05:30
Kovid Goyal
7d374531f9
Bump bundled version of python for CVEs 2026-10-03 16:57:20 +05:30