Commit graph

20010 commits

Author SHA1 Message Date
Kovid Goyal
52d33e2c82
zsh completion: Respect the descriptions format style for group headings
Previously group headings were hard-coded as %B<title>%b, ignoring the
user's zstyle ':completion:*:descriptions' format. This caused literal
%B/%b markers to appear with fzf-tab. Now the configured format is used,
falling back to bold titles when none is set.

Fixes #10748
2026-10-26 16:31:39 +05:30
Kovid Goyal
4a4bcbc3c1
Merge branch 'codex/clipboard-symlink-parent-output' of https://github.com/hezhizhen/kitty 2026-10-26 15:08:31 +05:30
Zhizhen He
4596a9baab
clipboard: Match duplicate checks to atomic write resolution 2026-10-26 13:36:01 +08:00
Zhizhen He
49e5695188
clipboard: Resolve symlinks before cleaning output paths 2026-10-26 13:12:42 +08:00
Kovid Goyal
2805c0e4e9
Merge branch 'dependabot/github_actions/actions-9adc00e088' of https://github.com/kovidgoyal/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-26 09:37:15 +05:30
Kovid Goyal
a4a096650f
Merge branch 'dependabot/go_modules/all-go-deps-88c9c10a06' of https://github.com/kovidgoyal/kitty 2026-10-26 09:37:00 +05:30
Kovid Goyal
a082d0b9ab
Fix test failure on macOS 2026-10-26 09:36:39 +05:30
dependabot[bot]
9e7abd36b2
build(deps): bump github/codeql-action
Bumps the actions group with 1 update: [github/codeql-action](https://github.com/github/codeql-action).


Updates `github/codeql-action` from 4.38.3 to 4.39.0
- [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.3...v4.39.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2026-10-26 03:45:21 +00:00
dependabot[bot]
4531f395ec
build(deps): bump the all-go-deps group with 4 updates
Bumps the all-go-deps group with 4 updates: [github.com/ebitengine/purego](https://github.com/ebitengine/purego), [github.com/emmansun/base64](https://github.com/emmansun/base64), [github.com/klauspost/compress](https://github.com/klauspost/compress) and [github.com/nwaples/rardecode/v2](https://github.com/nwaples/rardecode).


Updates `github.com/ebitengine/purego` from 0.11.1 to 0.11.2
- [Release notes](https://github.com/ebitengine/purego/releases)
- [Commits](https://github.com/ebitengine/purego/compare/v0.11.1...v0.11.2)

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

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

Updates `github.com/nwaples/rardecode/v2` from 2.4.4 to 2.4.5
- [Commits](https://github.com/nwaples/rardecode/compare/v2.4.4...v2.4.5)

---
updated-dependencies:
- dependency-name: github.com/ebitengine/purego
  dependency-version: 0.11.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: all-go-deps
- dependency-name: github.com/emmansun/base64
  dependency-version: 0.11.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: all-go-deps
- dependency-name: github.com/klauspost/compress
  dependency-version: 1.20.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: all-go-deps
- dependency-name: github.com/nwaples/rardecode/v2
  dependency-version: 2.4.5
  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-26 03:43:22 +00:00
Kovid Goyal
ddeb15b05a
clipboard: Download data once for outputs sharing a MIME type
Rather than every output sharing a remote MIME type writing its own
temporary copy of the data and decoding images separately, store the
data in a single temporary file per MIME type, decode images once and
save all outputs for that MIME type sequentially from it. The temporary
file is created in the directory of the first output where that is
possible, so a missing directory for one output does not affect others.

Also reject output files that resolve to the same path, following
symlinks as the atomic file update does, since saving to them would race
with the last write winning.
2026-10-26 08:53:47 +05:30
Kovid Goyal
3723c447aa
clipboard: Reject duplicate stream outputs for the same MIME type
Stream outputs write data as it arrives, so with fan-out to all outputs
sharing a remote MIME type, two outputs to the same stream would
interleave their data chunk by chunk, or encode two images into the
stream concurrently. Reject such duplicates with an error instead.
Also add a changelog entry for saving all outputs sharing a MIME type.
2026-10-26 08:48:06 +05:30
Kovid Goyal
f6eb49a47c
Merge PR #10744: clipboard: Save all outputs sharing a remote MIME type 2026-10-26 08:45:53 +05:30
Zhizhen He
88fc77a5d6
clipboard: Save all outputs sharing a remote MIME type 2026-10-26 11:05:55 +08:00
Kovid Goyal
8280cd4ad0
clipboard: Replace the MIME list PTY test with a Go unit test
Move writing the MIME list into Output.write_mime_list() and test it
directly. Committing, permission preservation and failure cleanup are
already covered by the existing Output commit tests, so the PTY test
that spawned the kitten only added coverage for the missing commit.
2026-10-26 07:50:36 +05:30
Kovid Goyal
5a46428a48
Merge PR #10743: clipboard: Fix saving MIME lists to files 2026-10-26 07:48:20 +05:30
Zhizhen He
bb956c7c6b
clipboard: Commit MIME list output when saving to a file 2026-10-26 10:05:45 +08:00
Kovid Goyal
6815b7a8a4
More useful error message for flaky test failure 2026-10-26 06:50:34 +05:30
Kovid Goyal
db9ae83672
macOS: Verify that the pty name from ptsname_r() matches the slave fd
Since the pty name is now obtained from the master fd, check that it
refers to the same device as the slave fd, so that a mismatched pair
passed to spawn() raises an error instead of silently giving the child
the wrong controlling terminal. Also merge the changelog entry into the
existing macOS bullet.
2026-10-26 06:42:01 +05:30
Kovid Goyal
57ce719299
Merge PR #10742: macOS: Fix kitty freezing when opening a window while a /dev entry is stuck 2026-10-26 06:40:41 +05:30
Chris Ren
b2087a7b42 macOS: Fix kitty freezing when opening a window while a /dev entry is stuck
On macOS, ttyname_r() calls devname_r(), which lstat()s every entry in
/dev until one matches. New ptys are appended to /dev, so naming the pty
of a new window looks up every older entry, and one stuck entry blocks
spawn() on the main thread with the GIL held, freezing kitty.

ptsname_r() on the master returns the same name with one ioctl() and a
stat() of that single path. Other platforms keep ttyname_r(), which does
not walk /dev there in the normal case.

Fixes #10741
2026-10-25 19:28:19 -05:00
Kovid Goyal
debcde56c0
Cleanup dangling symlink handling in atomic writes
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
Move EvalSymlinksThatExist to paths.go as it is no longer used only for
tar extraction, create the test symlinks in a deterministic order and
add a changelog entry for #10740 noting that it affects all atomically
saved files, not just clipboard output.
2026-10-25 22:23:27 +05:30
Kovid Goyal
b07019e7ad
Merge PR #10740: clipboard: Preserve dangling output symlinks 2026-10-25 22:21:52 +05:30
Zhizhen He
7fdd2af0fc
clipboard: Preserve dangling output symlinks 2026-10-25 22:21:52 +05:30
Kovid Goyal
68f242b7d9
clipboard: Cleanup atomic replacement of output files
Follow up to the merge of #10738. Use utils.AtomicUpdateFile to move
downloaded data into place instead of hand rolling the stat/chmod/rename
sequence. This fixes:

- Permissions of existing destination files not being preserved, as the
  chmod was applied to an already closed file
- An empty file being left at the destination if the rename failed, as
  the permissions probe opened the destination with O_CREATE
- Symlinks at the destination being replaced by regular files
- No fsync before the rename

Also encode converted images into memory and write them atomically, so
a failed encode no longer truncates and then deletes an existing
destination file.
2026-10-25 20:33:25 +05:30
Kovid Goyal
41ca405b98
Merge PR #10738: clipboard: Replace existing output files atomically 2026-10-25 20:31:00 +05:30
Zhizhen He
0fae8bb9bd
clipboard: Replace existing output files atomically 2026-10-25 22:40:47 +08:00
Kovid Goyal
0955567d25
Update changelog
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-25 19:17:08 +05:30
Kovid Goyal
d53ad3fd3a
ssh kitten: Resolve HOME when using --symlink-strategy=resolve
The copied paths have their symlinks resolved, so files under a HOME that is
itself reached via a symlink, such as /home -> /usr/home, were not
recognized as being in HOME and were copied to an absolute path on the
remote machine. Also add the PR reference to the changelog entry for #10737.
2026-10-25 19:09:11 +05:30
Kovid Goyal
2b39989766
Merge PR #10737: ssh: Fix HOME prefix matching for copied paths 2026-10-25 19:07:17 +05:30
Zhizhen He
814e7429ae
ssh: Fix HOME prefix matching for copied paths 2026-10-25 20:54:39 +08:00
Kovid Goyal
eb1470d483
Fix #10735
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-25 11:28:27 +05:30
Kovid Goyal
4bafcb9a7c
Graphics protocol: Add sub-feature querying
Fixes #10732
2026-10-25 09:59:12 +05:30
Kovid Goyal
617ddee75b
Remote control: Harden handling of passwords for async requests 2026-10-25 09:11:02 +05:30
Kovid Goyal
c8f8aa5344
Make the warning for --use-foreground-process more explicit 2026-10-25 08:48:15 +05:30
Kovid Goyal
165ef719c8
Fix #10731 2026-10-25 08:18:09 +05:30
Kovid Goyal
2dfaf0cc5e
Fix #10733 2026-10-25 08:07:41 +05:30
Kovid Goyal
81535d9b33
hints: Cleanup previous PR
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
- Guard against the quotes post processor producing start > end for a match
  consisting of just a single ASCII quote
- Use char_before() in the URL trailing punctuation loop and avoid computing
  the closing bracket twice
- Add PR reference to changelog entry
2026-10-24 06:36:26 +05:30
Kovid Goyal
92e9e6a038
Merge PR #10730: hints: Fix Unicode quotes not being removed from paths and URLs 2026-10-24 06:35:13 +05:30
Kovid Goyal
89db933a24
Fix #10729 2026-10-24 06:28:36 +05:30
xucian
f9b2fbb3b1 hints: Fix Unicode quotes not being removed from paths and URLs
The post-processors index the text by byte, so when looking at the
character before a position they decoded only the last byte of
multi-byte quotes such as ‘’ and “” and never matched them. URLs kept
the closing quote and paths kept both quotes. When the closing quote was
just outside the match, the start was also advanced by a single byte,
splitting the opening quote and producing invalid UTF-8, for example,
for the file name in wget's "Saving to: ‘index.html’".

This worked before the hints kitten was ported to Go.
2026-10-23 23:40:40 +03:00
Kovid Goyal
07c8731470
...
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-23 21:21:01 +05:30
Kovid Goyal
be8043235c
Merge branch 'codex/fix-ssh-macos-chmod' of https://github.com/hezhizhen/kitty 2026-10-23 21:20:44 +05:30
Zhizhen He
22c1b6b252
ssh: Fix chmod compatibility on macOS when merging directories 2026-10-23 23:43:03 +08:00
Kovid Goyal
8538e82c05
ssh kitten: Preserve permissions of copied directories
The archive reused the metadata of the top level directory for all nested
directories and both bootstrap implementations recreated directories with
the remote umask.

Stat every directory when building the archive, passing the stat result
explicitly to the header callback and skipping directories that vanish or
are replaced by something else while being copied.

When deploying, move directories not present at the destination intact,
replacing any dangling symlink or file in the way, and merge into existing
directories keeping their permissions. The shell implementation falls back
to creating the directory and merging if the move fails. Make the
temporary directory deletable before removing it as copied directories can
lack write or search permission.

Closes #10727
2026-10-23 20:44:23 +05:30
Kovid Goyal
3867ffa92b
choose-fonts: Show styles in axis value order
styles_in_family sorted every style group alphabetically, discarding the
axis value order computed by styles_with_attribute_data, so weights were
listed as, for example, Bold, Light, Regular instead of Light, Regular,
Bold. Only sort by name when falling back to the style names of the fonts.
2026-10-23 19:11:29 +05:30
Kovid Goyal
2df0dcc5e5
Cleanup previous PR 2026-10-23 19:10:14 +05:30
Kovid Goyal
edac9e3f18
Merge PR #10726: choose-fonts: Fix missing styles when a family has several font files 2026-10-23 19:08:30 +05:30
devangpratap
6ee17085ab choose-fonts: Fix missing styles when a family has several font files 2026-10-23 09:08:09 -04:00
Kovid Goyal
5cab872968
Reset link hover pointer when output clears the highlight
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
Program output can remove the highlighted link under the mouse, which
left the hand pointer and the hovered link state stale until the mouse
moved or the modifiers changed. After parsing output, if the highlight
in the hovered window was cleared, reset the hovered link and re-derive
the pointer shape, using the current mouse tracking mode.

Closes #10725
2026-10-23 17:02:12 +05:30
Kovid Goyal
34eda43194
Cleanup previous PR
Follow up fixes for link hover feedback from PR #10723:

- Recompute the cell under the mouse when modifiers change, so a stale
  cell is not highlighted when the mouse is in the window padding
- Compare against the displayed highlight rather than the old modifiers,
  so a change of mouse tracking mode without mouse motion is handled
- Update the hover in the OS window under the mouse, not only in the one
  receiving key events
- Keep the hand pointer over a highlighted link when the program changes
  the pointer shape
- Do not leave a link highlighted after opening it with a mapping that
  does not show hover feedback
- Skip marking hyperlinks that are not going to be highlighted
- Validate url_mappings in set_url_mappings() and ignore it in
  --debug-config output
- Make the update_mock_pointer test helper restore only the state it
  overrides and keep heap state owned by the mock window
2026-10-23 11:08:28 +05:30