Commit Graph

18278 Commits

Author SHA1 Message Date
Kovid Goyal
5ed2c0cfd9 Make mypy happy 2026-05-20 12:07:09 +05:30
Kovid Goyal
13fc98d7ec Update changelog
Fixes #10040
2026-05-20 11:58:57 +05:30
Kovid Goyal
8651d8b5c4 Merge branch 'fix/copy-or-noop-passthrough' of https://github.com/M-Hassan-Raza/kitty 2026-05-20 11:58:01 +05:30
Hassan Raza
f413f528af Preserve copy_or_noop passthrough 2026-05-20 11:15:49 +05:00
Kovid Goyal
8243a3d3b8 Merge branch 'fix/ssh-login-shell-argv' of https://github.com/M-Hassan-Raza/kitty 2026-05-20 08:15:24 +05:30
Hassan Raza
d77c94e3aa Avoid shell quoting in ssh login fallback 2026-05-19 23:14:08 +05:00
Kovid Goyal
8eb76cd315 Fix #10037 2026-05-19 21:11:55 +05:30
Kovid Goyal
1011bb0459 Merge branch 'fix/ssh-copy-archive-safety' of https://github.com/M-Hassan-Raza/kitty 2026-05-19 19:02:47 +05:30
Hassan Raza
c0db371afe Quote ssh bootstrap symlink moves 2026-05-19 16:54:02 +05:00
Kovid Goyal
cf5c180a01 Merge branch 'clear-font-caches-on-reload' of https://github.com/zzhaolei/kitty 2026-05-19 11:55:45 +05:30
Kovid Goyal
eadec09d49 version 0.47.0 v0.47.0 2026-05-19 11:22:14 +05:30
zhaolei
a76bb0829b Clear font caches on config reload so newly installed fonts are picked up without restart 2026-05-19 13:51:53 +08:00
Kovid Goyal
4cef90d4c7 Merge branch 'fix-ssh-cmd-mutation' of https://github.com/cwelsys/kitty 2026-05-19 08:45:09 +05:30
Connor Welsh
d50d1bba65 ssh kitten: avoid in-place mutation of cmd by slices.Insert
slices.Insert(cmd, 1, "-O", "check") writes into cmd's backing array
when there is spare capacity (cap(cmd) >= len(cmd)+2). check_cmd points
at the shifted array, but cmd's slice header is unchanged: reading
cmd[:insertion_point] later returns "-O", "check", ... where the
original prefix used to be. run_control_master, forward_remote_control,
and the final ssh exec all build their argvs from this corrupted prefix.

Repro: share_connections=yes, forward_remote_control=yes, and enough
ssh_args to push cmd past Go's slice-growth threshold (kitten ssh -v
host does it). With the ControlMaster already up you'll see
"Multiplexing command already specified"; otherwise it fails with
"Failed to start SSH ControlMaster" and a stray -O check left in the
cmdline.
2026-05-18 23:08:33 -04:00
Kovid Goyal
656af81cfb ... 2026-05-19 08:06:39 +05:30
Kovid Goyal
01c1f7df7e Merge branch 'copilot/remove-duplicates-mimetypes' of https://github.com/kovidgoyal/kitty 2026-05-19 07:48:14 +05:30
copilot-swe-agent[bot]
9ef08fd865 glfw/input.c: fix dedup to swap duplicates to end instead of overwriting pointers
Agent-Logs-Url: https://github.com/kovidgoyal/kitty/sessions/071dfd57-73e7-4daa-8d35-955bec8b1c4b

Co-authored-by: kovidgoyal <1308621+kovidgoyal@users.noreply.github.com>
2026-05-19 02:12:29 +00:00
copilot-swe-agent[bot]
1aaae286a8 glfw/input.c: remove duplicate mimetypes in _glfwInputDropEvent using verstable
Agent-Logs-Url: https://github.com/kovidgoyal/kitty/sessions/2d7a111f-7d98-4cb0-b085-823736cbf5db

Co-authored-by: kovidgoyal <1308621+kovidgoyal@users.noreply.github.com>
2026-05-19 02:00:12 +00:00
Kovid Goyal
8c6e77b800 Merge branch 'copilot/refactor-dnd-kitten-tracking' of https://github.com/kovidgoyal/kitty 2026-05-18 14:19:11 +05:30
copilot-swe-agent[bot]
858c453ae9 Simplify message formatting in render.go
Agent-Logs-Url: https://github.com/kovidgoyal/kitty/sessions/84513fee-68de-4504-b41b-e8643e0ea585

Co-authored-by: kovidgoyal <1308621+kovidgoyal@users.noreply.github.com>
2026-05-18 08:46:34 +00:00
copilot-swe-agent[bot]
7af3f4ee83 Refactor dnd kitten: track num_dropped_files instead of data_has_been_dropped
Agent-Logs-Url: https://github.com/kovidgoyal/kitty/sessions/84513fee-68de-4504-b41b-e8643e0ea585

Co-authored-by: kovidgoyal <1308621+kovidgoyal@users.noreply.github.com>
2026-05-18 08:44:07 +00:00
Kovid Goyal
6da5bae945 Cleanup previous PR 2026-05-18 13:55:48 +05:30
Kovid Goyal
6e4e1c8edf Merge branch 'copilot/add-support-for-data-uris' of https://github.com/kovidgoyal/kitty 2026-05-18 13:36:37 +05:30
copilot-swe-agent[bot]
9bb33ac25a Address code review: clarify comments and simplify mime stripping
Agent-Logs-Url: https://github.com/kovidgoyal/kitty/sessions/dd371733-fa08-484e-888a-8d0ebdadb853

Co-authored-by: kovidgoyal <1308621+kovidgoyal@users.noreply.github.com>
2026-05-18 07:59:00 +00:00
copilot-swe-agent[bot]
d5a6c072d9 Add data URI support to dnd kitten parse_uri_list
Agent-Logs-Url: https://github.com/kovidgoyal/kitty/sessions/dd371733-fa08-484e-888a-8d0ebdadb853

Co-authored-by: kovidgoyal <1308621+kovidgoyal@users.noreply.github.com>
2026-05-18 07:54:57 +00:00
Kovid Goyal
2a59bfe9a0 Dont request the same MIME type multiple times 2026-05-18 13:08:49 +05:30
Kovid Goyal
32e6e834a6 Some cleanups 2026-05-18 11:14:11 +05:30
Kovid Goyal
a74e0755bb Merge branch 'copilot/fix-dnd-kitten-drag-issue-another-one' of https://github.com/kovidgoyal/kitty 2026-05-18 10:40:56 +05:30
copilot-swe-agent[bot]
c7ded8b8fd fix: send XdndStatus(rejected) instead of XdndFinished on non-accepting window
Agent-Logs-Url: https://github.com/kovidgoyal/kitty/sessions/dc998620-35db-456d-8355-63e39f385464

Co-authored-by: kovidgoyal <1308621+kovidgoyal@users.noreply.github.com>
2026-05-18 05:02:06 +00:00
Kovid Goyal
3118901800 Add some DnD debug statements for X11 2026-05-18 10:20:16 +05:30
Kovid Goyal
7a6538ee56 Merge branch 'dependabot/github_actions/actions-8abaa2cbc6' of https://github.com/kovidgoyal/kitty 2026-05-18 10:00:24 +05:30
Kovid Goyal
01ffa63d45 Merge branch 'dependabot/go_modules/all-go-deps-b9c962a4d6' of https://github.com/kovidgoyal/kitty 2026-05-18 10:00:13 +05:30
dependabot[bot]
fa0cd87345 Bump github/codeql-action from 4.35.3 to 4.35.4 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.35.3 to 4.35.4
- [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.35.3...v4.35.4)

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

Signed-off-by: dependabot[bot] <support@github.com>
2026-05-18 04:24:43 +00:00
dependabot[bot]
3dec32d130 Bump the all-go-deps group with 2 updates
Bumps the all-go-deps group with 2 updates: [golang.org/x/image](https://github.com/golang/image) and [golang.org/x/text](https://github.com/golang/text).


Updates `golang.org/x/image` from 0.39.0 to 0.40.0
- [Commits](https://github.com/golang/image/compare/v0.39.0...v0.40.0)

Updates `golang.org/x/text` from 0.36.0 to 0.37.0
- [Release notes](https://github.com/golang/text/releases)
- [Commits](https://github.com/golang/text/compare/v0.36.0...v0.37.0)

---
updated-dependencies:
- dependency-name: golang.org/x/image
  dependency-version: 0.40.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.37.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-05-18 04:19:58 +00:00
Kovid Goyal
0b56a8567d Use O_EXCL with O_CREAT for drag source files 2026-05-18 08:37:50 +05:30
Kovid Goyal
092b7504de Merge branch 'copilot/review-drag-and-drop-security' of https://github.com/kovidgoyal/kitty 2026-05-17 22:19:43 +05:30
copilot-swe-agent[bot]
0062495e96 fix drop_update_mimes: use exact MIME matching and correct sentinel value
Agent-Logs-Url: https://github.com/kovidgoyal/kitty/sessions/c41c0c3f-f9c8-4638-a4c4-64961b030f35

Co-authored-by: kovidgoyal <1308621+kovidgoyal@users.noreply.github.com>
2026-05-17 16:45:07 +00:00
Kovid Goyal
ee754bac05 ... 2026-05-17 22:00:22 +05:30
Kovid Goyal
26c1902e1e ... 2026-05-17 21:53:12 +05:30
Kovid Goyal
bd918569ba Sanitize dir entry filenames 2026-05-17 21:48:52 +05:30
Kovid Goyal
ba31e15a30 ... 2026-05-17 21:45:42 +05:30
Kovid Goyal
4dd2f54683 Merge branch 'copilot/add-dnd-command-support' of https://github.com/kovidgoyal/kitty 2026-05-17 21:31:36 +05:30
copilot-swe-agent[bot]
df9b906bc4 Fix review: simplify fmt and normalize conditionals in dnd_command
Agent-Logs-Url: https://github.com/kovidgoyal/kitty/sessions/aa0821cf-6cf1-4fe5-ad76-904dba97aefa

Co-authored-by: kovidgoyal <1308621+kovidgoyal@users.noreply.github.com>
2026-05-17 16:00:08 +00:00
copilot-swe-agent[bot]
d6886e0ccc Add dnd_command support to --dump-commands in client.py
Agent-Logs-Url: https://github.com/kovidgoyal/kitty/sessions/aa0821cf-6cf1-4fe5-ad76-904dba97aefa

Co-authored-by: kovidgoyal <1308621+kovidgoyal@users.noreply.github.com>
2026-05-17 15:57:50 +00:00
Kovid Goyal
57a94d132f When hardlink fails fallback to full copy 2026-05-17 21:12:34 +05:30
Kovid Goyal
ce68e96582 Merge branch 'copilot/fix-empty-file-drag-issue' of https://github.com/kovidgoyal/kitty 2026-05-17 21:08:35 +05:30
copilot-swe-agent[bot]
05b288e754 Address code review: use PATH_MAX buffer and move os import to top
Agent-Logs-Url: https://github.com/kovidgoyal/kitty/sessions/da8b4577-3de8-4784-afc0-c1967f605dec

Co-authored-by: kovidgoyal <1308621+kovidgoyal@users.noreply.github.com>
2026-05-17 15:34:56 +00:00
copilot-swe-agent[bot]
634c078168 Fix empty file not created when dragging from remote Linux to Finder
When dragging an empty file (or a directory containing an empty file)
from a remote Linux machine to macOS Finder, the empty file would not
be copied.

Root cause: in add_payload() in dnd.c, the file is only created with
O_CREAT when payload data arrives. For an empty file, no payload is
ever sent, so the file was never created on disk. When Finder then
tried to hard-link the (non-existent) temp file to the destination, it
failed silently.

Fix: in the "all data received" handler for type 0 (regular file),
check if the fd was ever opened. If not (empty file), create the empty
file explicitly before finishing.

Also add:
- A new test probe drag_remote_item_path:N to retrieve the filesystem
  path of a specific remote item by URI index.
- Two regression tests: test_remote_drag_empty_file (verifying the
  empty file is created on disk) and test_remote_drag_dir_with_empty_file
  (verifying an empty child file inside a directory is created on disk).

Agent-Logs-Url: https://github.com/kovidgoyal/kitty/sessions/da8b4577-3de8-4784-afc0-c1967f605dec

Co-authored-by: kovidgoyal <1308621+kovidgoyal@users.noreply.github.com>
2026-05-17 15:31:15 +00:00
Kovid Goyal
e2727d91fb Clarify handling of subdirs in drag source 2026-05-17 14:51:37 +05:30
Kovid Goyal
ec8d23258c Fix dragging folder from remote machine to Finder 2026-05-17 13:58:14 +05:30