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
n-WN
708372f249
tests: regression for apply_selection with paused-rendering + scrollback
...
Add a regression test that exercises the code path which crashed in
v0.46.2 (#10017 ): when paused_rendering is active and a selection
extends into the scrollback, the inner loop of apply_selection iterates
with a negative y. Without the recently-added paused_y translation and
the paused_y < 0 guard, the call to linebuf_init_line treats the
negative y as a huge unsigned index_type and reads ~4GB out of bounds
in line_attrs[idx], crashing with SIGBUS.
The test reproduces the trigger deterministically via the Screen Python
bindings and asserts that current_selections() returns the expected
buffer instead of crashing.
2026-05-16 17:00:01 +08:00
Kovid Goyal
ced9a6ef97
Bump dependency for CVE
2026-05-16 13:31:32 +05:30
Kovid Goyal
12e2f80df3
Dont make temp dir world writeable
2026-05-16 13:24:45 +05:30
Kovid Goyal
c278e82ab5
Rewrite macOS drop handling code to workaround Apple's insanely limited API
2026-05-16 13:06:23 +05:30
Kovid Goyal
418ea57382
Have fire_drag_finished cleanup even if no window is present
2026-05-15 13:39:31 +05:30
Kovid Goyal
7e42ef73d3
file promise providers are anyway stored globally so no need to store them on draggingItem's user info
2026-05-15 13:34:53 +05:30
Kovid Goyal
69800d89c0
...
2026-05-15 13:31:22 +05:30
Kovid Goyal
320bd90ebb
macOS: Pass drop intent to OS
2026-05-15 12:58:53 +05:30
Kovid Goyal
fe4f4953fa
Fix failing tests
2026-05-15 11:56:02 +05:30
Kovid Goyal
ef6539d697
Propagate error when requesting drop data
2026-05-15 11:33:33 +05:30
Kovid Goyal
35cd3d37f2
Fix dnd from remote to finder on macOS
2026-05-15 10:00:38 +05:30
Kovid Goyal
2a903c724c
Fix missing Block_copy
2026-05-15 08:22:30 +05:30
Kovid Goyal
74323694f5
Merge branch 'copilot/implement-todo-line-1723' of https://github.com/kovidgoyal/kitty
2026-05-14 20:44:42 +05:30
copilot-swe-agent[bot]
d3b12031bd
replace C11 atomics with dispatch_group_t to fix undeclared identifier errors
...
Agent-Logs-Url: https://github.com/kovidgoyal/kitty/sessions/2f0107b0-a6e4-447c-8178-60d65038df4b
Co-authored-by: kovidgoyal <1308621+kovidgoyal@users.noreply.github.com >
2026-05-14 11:38:44 +00:00
copilot-swe-agent[bot]
983185cc62
use atomic counter and url.absoluteString in file-promise uri-list implementation
...
Agent-Logs-Url: https://github.com/kovidgoyal/kitty/sessions/c28b23d9-b2b8-42d8-914c-85a253d34b12
Co-authored-by: kovidgoyal <1308621+kovidgoyal@users.noreply.github.com >
2026-05-14 11:16:44 +00:00
copilot-swe-agent[bot]
71dbfcd7ff
implement TODO: receive file promises into temp dir for text/uri-list DnD on macOS
...
Agent-Logs-Url: https://github.com/kovidgoyal/kitty/sessions/c28b23d9-b2b8-42d8-914c-85a253d34b12
Co-authored-by: kovidgoyal <1308621+kovidgoyal@users.noreply.github.com >
2026-05-14 11:12:51 +00:00
Kovid Goyal
e9b41513d4
...
2026-05-14 16:32:35 +05:30
Kovid Goyal
1ff9165335
Store uri-list items as promises correctly
2026-05-14 16:25:29 +05:30
Kovid Goyal
61ea2b4a38
...
2026-05-14 15:27:26 +05:30
Kovid Goyal
307717213b
Set the correct filename for uri-list items
2026-05-14 14:42:52 +05:30
Kovid Goyal
7b30364bfd
Allow setting filename for file promise provider
2026-05-14 14:37:11 +05:30