Commit Graph

18213 Commits

Author SHA1 Message Date
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
Kovid Goyal
938c3956bd ... 2026-05-14 14:03:44 +05:30
Kovid Goyal
a061e0782e Fix is_remote_client not being passed along 2026-05-14 13:48:18 +05:30
Kovid Goyal
d44a11a4a8 ... 2026-05-14 13:28:44 +05:30
Kovid Goyal
b7c11166f5 Merge branch 'copilot/finish-source-actions-implementation' of https://github.com/kovidgoyal/kitty 2026-05-14 11:24:36 +05:30
copilot-swe-agent[bot]
344fa2bc5f Extract update_drop_source_actions helper in cocoa backend to avoid duplication
Agent-Logs-Url: https://github.com/kovidgoyal/kitty/sessions/91dbd1d2-ae9d-4816-b710-7d6f3147cda6

Co-authored-by: kovidgoyal <1308621+kovidgoyal@users.noreply.github.com>
2026-05-14 05:49:20 +00:00
copilot-swe-agent[bot]
077f402bee Implement source_actions for X11 and cocoa DnD backends
Agent-Logs-Url: https://github.com/kovidgoyal/kitty/sessions/91dbd1d2-ae9d-4816-b710-7d6f3147cda6

Co-authored-by: kovidgoyal <1308621+kovidgoyal@users.noreply.github.com>
2026-05-14 05:46:21 +00:00
Kovid Goyal
6d4371f596 Properly pass source actions to drop events
Implemented for Wayland. Needs implementation for X11 and macOS
2026-05-14 11:07:52 +05:30
Kovid Goyal
0c6c387312 Modify spec to add allowed operations to drop events 2026-05-14 09:09:05 +05:30
Kovid Goyal
96b07602f0 Merge branch 'copilot/fix-drag-drop-validation' of https://github.com/kovidgoyal/kitty 2026-05-14 09:06:49 +05:30
Kovid Goyal
5eee2c54ce Bloody Apple native apps refuse to accept drops if a private MIME type is present. Sigh. Back to the drawing board. 2026-05-14 08:25:58 +05:30
copilot-swe-agent[bot]
8acb6e7ecb Address review comments: rename variable and improve comments
Agent-Logs-Url: https://github.com/kovidgoyal/kitty/sessions/41b8254d-fc79-4f41-9775-67d1ddfceb5b

Co-authored-by: kovidgoyal <1308621+kovidgoyal@users.noreply.github.com>
2026-05-14 02:53:15 +00:00
copilot-swe-agent[bot]
66dca3cde1 Fix dnd kitten: restrict drop to boxes matching drag source allowed operations
Agent-Logs-Url: https://github.com/kovidgoyal/kitty/sessions/41b8254d-fc79-4f41-9775-67d1ddfceb5b

Co-authored-by: kovidgoyal <1308621+kovidgoyal@users.noreply.github.com>
2026-05-14 02:49:17 +00:00
Kovid Goyal
f2c79ed7c7 Add debug logging for NSDraggingSession 2026-05-14 08:16:03 +05:30
Kovid Goyal
bfc3646868 Fix spurious drag start on initial click 2026-05-14 07:59:53 +05:30
Kovid Goyal
5064608879 Fix dragging from one kitty window to another in the same kitty instance not working 2026-05-14 07:10:57 +05:30
Kovid Goyal
afe9493990 ... 2026-05-14 07:04:29 +05:30
Kovid Goyal
9b27f095c8 A couple more places to expand ~ 2026-05-14 06:21:07 +05:30
Kovid Goyal
a771b1d7e5 Expand ~ when processing args for dnd kitten 2026-05-14 06:13:53 +05:30
Kovid Goyal
a28abf1573 Ignore inapplicable CVE 2026-05-13 15:03:17 +05:30
Kovid Goyal
5b8d8b9f43 Merge branch 'fix-hints-utf8-rune-slicing' of https://github.com/gogongxt/kitty 2026-05-13 14:53:45 +05:30
gogongxt
56f276580f Fix hints kitten breaking multi-byte UTF-8 characters when overlaying hint labels
In highlight_mark(), mark_text was sliced using byte-based indexing
(mark_text[:len(hint)] and mark_text[len(hint):]). Since len(hint)
equals the rune count (hint is always ASCII), but len(mark_text) is a
byte count, this could slice in the middle of a multi-byte UTF-8
sequence (e.g. CJK characters), producing an invalid byte sequence
rendered as the Unicode replacement character (�).

Fix by converting mark_text to []rune first, then slicing at rune
boundaries. The hint is ASCII so len(hint) == rune count, requiring
no conversion on the hint side.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-13 17:09:42 +08:00
Kovid Goyal
8b17088b58 dnd fix remote drag source premature removal of remote file data
Instead the remote data is removed from the cache on:
1) new drag start
2) window destruction
3) application exit
2026-05-13 12:35:10 +05:30
Kovid Goyal
8b85bc3440 Cleanup previous PR 2026-05-13 11:51:18 +05:30
Kovid Goyal
7cd9ba03a3 Merge branch 'read-fc-matrix' of https://github.com/Strykar/kitty 2026-05-13 11:50:13 +05:30
Kovid Goyal
572b14f994 Merge branch 'pr-single-instance-background-overrides' of https://github.com/oxysoft/kitty 2026-05-13 11:20:04 +05:30
Kovid Goyal
c2a7225657 Ensure drag finish timer doesnt fire will waiting for remote item data 2026-05-13 10:59:44 +05:30
Kovid Goyal
9c29c612a5 Merge branch 'copilot/finish-promised-data-ready-function' of https://github.com/kovidgoyal/kitty 2026-05-13 10:44:04 +05:30