Commit Graph

18261 Commits

Author SHA1 Message Date
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
Kovid Goyal
b881ed6580 Handle small reads from files correctly 2026-05-17 13:50:41 +05:30
Kovid Goyal
c5b9b7d81d ... 2026-05-17 13:45:53 +05:30
Kovid Goyal
f4463703b1 Create a placeholder directory rather than a file when we are transferring directories 2026-05-17 12:40:12 +05:30
Kovid Goyal
7e59c08fc0 Be defensive 2026-05-17 08:57:47 +05:30
Kovid Goyal
3e0850a864 Fix failing test 2026-05-17 08:52:28 +05:30
Kovid Goyal
a1b1b89feb macOS requires URLs to directories to end with a slash 2026-05-17 08:38:11 +05:30
Kovid Goyal
5669df4022 Fix drag from window 1 and drop onto non dnd window 2 not working 2026-05-17 07:54:41 +05:30
Kovid Goyal
75b99a3cbf Fix drop state update on move incorrect when transitioning between windows 2026-05-17 07:50:41 +05:30
Kovid Goyal
0fc73dd8c3 Fix extra ST being sent 2026-05-17 07:14:11 +05:30
Kovid Goyal
613e1ccbe3 ... 2026-05-16 16:58:32 +05:30
Kovid Goyal
0e3a193db6 macOS APIs are really really bonkers 2026-05-16 16:49:47 +05:30
Kovid Goyal
4584d5ce47 Code cleanup 2026-05-16 16:45:48 +05:30
Kovid Goyal
ffec9a854a macOS: Resolve file reference URLs before using them to populate text/uri-list 2026-05-16 16:28:50 +05:30
Kovid Goyal
316e07e8b8 Merge branch 'copilot/fix-drag-event-handling' of https://github.com/kovidgoyal/kitty 2026-05-16 16:04:39 +05:30
copilot-swe-agent[bot]
66e667b096 fix: send drag leave/enter events when crossing kitty window boundaries during DnD
Agent-Logs-Url: https://github.com/kovidgoyal/kitty/sessions/6aeadc64-7167-4cdb-bafd-8b680cef5d2d

Co-authored-by: kovidgoyal <1308621+kovidgoyal@users.noreply.github.com>
2026-05-16 10:29:53 +00:00
Kovid Goyal
2e8d57c1b0 Fix crash under ASAN 2026-05-16 15:46:26 +05:30
Kovid Goyal
ee4310b189 Merge branch 'regression-test-paused-rendering-selection' of https://github.com/n-WN/kitty 2026-05-16 15:31:34 +05:30