Commit Graph

17751 Commits

Author SHA1 Message Date
copilot-swe-agent[bot]
9cd8558cfd Address code review feedback: improve test names and docstrings
Agent-Logs-Url: https://github.com/kovidgoyal/kitty/sessions/f9868553-29a2-48c4-85c2-b6b8f686dccc

Co-authored-by: kovidgoyal <1308621+kovidgoyal@users.noreply.github.com>
2026-04-08 15:47:31 +00:00
copilot-swe-agent[bot]
7d33569c1a Add comprehensive drag protocol tests and fix double-free bug in drag_free_built_data
- Add 37 new tests covering the drag source side of the DND protocol
- Test drag offer registration/unregistration (t=o, t=O)
- Test drag MIME type offering with various operations (copy/move/both)
- Test pre-sent data for valid/invalid indices, chunked data, multiple MIMEs
- Test image thumbnails: valid RGBA/RGB, invalid formats, dimensions, chunking
- Test drag start failures (no window, no offer, image size mismatches)
- Test drag cancellation from client (t=E:y=-1)
- Test offer replacement, cleanup, and error propagation
- Test client_id propagation for drag operations
- Test resource cleanup on window close during drag build
- Fix double-free in drag_free_built_data: set ds.items=NULL after free
- Add drag_free_offer to destroy_fake_window_contents for proper cleanup

Agent-Logs-Url: https://github.com/kovidgoyal/kitty/sessions/f9868553-29a2-48c4-85c2-b6b8f686dccc

Co-authored-by: kovidgoyal <1308621+kovidgoyal@users.noreply.github.com>
2026-04-08 15:43:37 +00:00
Kovid Goyal
3fb748e3db Add cancelling of current drag offer 2026-04-08 20:49:10 +05:30
Kovid Goyal
87381e1c2d Merge branch 'copilot/implement-drag-drop-protocol' of https://github.com/kovidgoyal/kitty 2026-04-08 20:43:11 +05:30
copilot-swe-agent[bot]
78a9727268 Use pread() for streaming reads, notify on each chunk, fix end-of-data condition
Agent-Logs-Url: https://github.com/kovidgoyal/kitty/sessions/3da92580-278b-43dc-9b75-5449fee3024f

Co-authored-by: kovidgoyal <1308621+kovidgoyal@users.noreply.github.com>
2026-04-08 14:44:30 +00:00
copilot-swe-agent[bot]
de53069c2f Address code review: handle empty file case, use EIO for tmpfile open failure
Agent-Logs-Url: https://github.com/kovidgoyal/kitty/sessions/39fe0e9c-1286-442c-8d7d-7cea5905a178

Co-authored-by: kovidgoyal <1308621+kovidgoyal@users.noreply.github.com>
2026-04-08 14:24:17 +00:00
copilot-swe-agent[bot]
054ea80e00 Implement drag source data functions: drag_free_data, drag_get_data, drag_process_item_data
Agent-Logs-Url: https://github.com/kovidgoyal/kitty/sessions/39fe0e9c-1286-442c-8d7d-7cea5905a178

Co-authored-by: kovidgoyal <1308621+kovidgoyal@users.noreply.github.com>
2026-04-08 14:21:21 +00:00
Kovid Goyal
85b13ce941 Fix compiler warnings 2026-04-08 19:43:58 +05:30
Kovid Goyal
78dfc1f940 Forgot to close drag data fd 2026-04-08 19:36:02 +05:30
Kovid Goyal
f6be9b657c ... 2026-04-08 19:33:32 +05:30
Kovid Goyal
f8d3d17b40 ... 2026-04-08 19:31:40 +05:30
Kovid Goyal
702f9905d2 More work on the DnD protocol 2026-04-08 19:19:20 +05:30
Kovid Goyal
348151c457 More work on DnD protocol 2026-04-08 19:07:15 +05:30
Kovid Goyal
390ae2efac Deny window drag start if drag gesture is not active 2026-04-08 11:57:28 +05:30
Kovid Goyal
3b018528d4 Bump go version for vulnerabilities in stdlib 2026-04-08 11:41:35 +05:30
Kovid Goyal
3f60cec587 Update changelog 2026-04-08 11:38:25 +05:30
Kovid Goyal
ff6d325341 Merge branch 'master' of https://github.com/kevinywlui/kitty 2026-04-08 11:37:47 +05:30
Kevin Lui
be7a010b9c hints: Fix trailing punctuation being included in detected URLs 2026-04-07 22:57:36 -07:00
Kovid Goyal
2e15c0117e Use correct client id when responding to drag escape codes 2026-04-08 11:25:39 +05:30
Kovid Goyal
e7a196f403 fix broken links 2026-04-08 11:23:53 +05:30
Kovid Goyal
c630e1293e Fix #9827 2026-04-08 11:09:51 +05:30
Kovid Goyal
b198a45fe8 Merge branch 'master' of https://github.com/lxcode/kitty 2026-04-07 19:56:07 +05:30
Kovid Goyal
4a1fccfc32 Send OK on drag start 2026-04-07 19:50:58 +05:30
Kovid Goyal
7e5d4f8723 Update changelog 2026-04-07 19:43:25 +05:30
Kovid Goyal
a0958a05a9 Merge branch 'action_aliases_command_palette' of https://github.com/dmgerman/kitty 2026-04-07 19:40:55 +05:30
David Thiel
faed62e993 Make focus_follows_mouse only switch on window-boundary crossings
The previous implementation reverted any keyboard-driven window switch
on the next mouse motion event because it compared the hovered window
against the active window rather than against the previously hovered
window. Move the focus-follows-mouse trigger into
set_currently_hovered_window so it fires only when the hover ID
actually transitions, which also covers OS-window-entry.
2026-04-07 14:18:54 +01:00
Kovid Goyal
1c4097edde Remove unnecessary event pump when attaching top level drag surface 2026-04-07 17:25:18 +05:30
Kovid Goyal
5c104df8f3 Merge branch 'copilot/fix-triple-click-selection-issue' of https://github.com/kovidgoyal/kitty 2026-04-07 15:24:09 +05:30
copilot-swe-agent[bot]
18fb31b416 Fix double-click word selection not extending beyond viewport edges
Add continue_word_upwards_scrollback() and continue_word_downwards_offscreen()
to extend word selection beyond viewport boundaries, mirroring the line
selection fix. Add tests for word selection wrapping into scrollback and
below viewport.

Agent-Logs-Url: https://github.com/kovidgoyal/kitty/sessions/58191e45-d925-4996-b0d5-8b1bd4baa8d5

Co-authored-by: kovidgoyal <1308621+kovidgoyal@users.noreply.github.com>
2026-04-07 09:49:50 +00:00
copilot-swe-agent[bot]
82bf8923cc Fix triple-click line selection not extending wrapped lines beyond viewport bottom
Similar to commit 625e984 which fixed extending into scrollback (above viewport),
this fix extends line selection below the viewport when a wrapped line continues
past the bottom edge. Adds continue_line_downwards_offscreen() and applies it
in both the initial selection and extending selection code paths.

Agent-Logs-Url: https://github.com/kovidgoyal/kitty/sessions/e548ce84-fdb7-4fd1-b3df-e1166b45f5bd

Co-authored-by: kovidgoyal <1308621+kovidgoyal@users.noreply.github.com>
2026-04-07 09:31:17 +00:00
Kovid Goyal
114cd5cbc4 Handle drag source finished event arriving before drop event when doing self drops on some wayland compositors 2026-04-07 14:32:40 +05:30
Kovid Goyal
837f55fe21 ... 2026-04-07 13:47:47 +05:30
copilot-swe-agent[bot]
a90b8470ac Fix drag icon not visible under GNOME Wayland
Fixes #9823
2026-04-07 13:31:04 +05:30
Kovid Goyal
69f24c503f When leaving OS window clear it from drop state 2026-04-07 12:12:06 +05:30
Kovid Goyal
cd3860817b ... 2026-04-07 11:47:58 +05:30
Kovid Goyal
9fbb079ad6 Add logging for DnD events on Wayland 2026-04-07 11:32:12 +05:30
Kovid Goyal
c0647c8906 Merge branch 'document_command_palette' of https://github.com/dmgerman/kitty 2026-04-07 11:26:42 +05:30
Daniel M German
cb297c52c4 Document how command palette search computes candidates
Replace the brief Searching section with a structured user-facing
explanation covering: multi-word queries, per-word matching (exact,
prefix, and typo tolerance), compound names with delimiter characters,
and the five-level ranking order.
2026-04-06 22:42:47 -07:00
Kovid Goyal
dc55052f0c Wayland: set drop accepted operations 2026-04-07 10:40:14 +05:30
Kovid Goyal
7fd0475c20 Merge branch 'fix/fg-override-blue-channel' of https://github.com/z3rco/kitty 2026-04-07 06:56:40 +05:30
Daniel M German
640225315a Fix ruff E731: replace lambda assignment with def 2026-04-06 09:54:56 -07:00
z3rco
dc2bebd89e Fix blue channel ignored in fg_override contrast check
diff.g was used twice instead of diff.g + diff.b, causing the
same-color detection to miss blue-only differences. This meant
the HSLuv contrast override could skip adjustment for color pairs
differing primarily in blue.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 17:51:02 +01:00
Daniel M German
3d89cb267c Add alias and combine support to the command palette
Users who define action_alias or kitten_alias in kitty.conf had no way
to discover or trigger these custom commands from the command palette.
Aliased keybindings were miscategorized (landing in "Miscellaneous"
with no help text), and combine bindings had the same problem.

Changes:

- Resolve aliases via opts.alias_map to get correct action names,
  categories, and help text for aliased keybindings
- Add dedicated "Action aliases" and "Kitten aliases" sections that
  list all user-defined aliases, with bound aliases showing their key
  and unbound aliases browsable as unmapped entries
- Add a "Combined actions" section for combine keybindings
- Make alias names searchable in the Go TUI so users can find
  bindings by typing the alias name
- Fix action column highlight positions to match the scored text,
  preventing visual corruption when searching for alias names

Also refactors collect_keys_data into focused single-responsibility
functions and reduces nesting depth across both Python and Go.
2026-04-06 09:45:39 -07:00
Kovid Goyal
aceaef8a1d ... 2026-04-06 11:39:18 +05:30
Kovid Goyal
7036b10326 Padding at the sides of rendered dragged URL 2026-04-06 11:37:10 +05:30
Kovid Goyal
de3eda67d3 Merge branch 'copilot/update-draw-single-line-text-function' of https://github.com/kovidgoyal/kitty 2026-04-06 11:36:32 +05:30
Kovid Goyal
e8e227aa42 ... 2026-04-06 11:35:45 +05:30
copilot-swe-agent[bot]
9a878c9edc Accept keyword arguments in draw_single_line_of_text, use max_width=True in window.py, remove changelog entry
Agent-Logs-Url: https://github.com/kovidgoyal/kitty/sessions/9a89a6c8-4bc2-4f11-9947-55b713b15348

Co-authored-by: kovidgoyal <1308621+kovidgoyal@users.noreply.github.com>
2026-04-06 06:01:59 +00:00
Kovid Goyal
6206d0b1df Update changelog entry generation instructions 2026-04-06 11:30:44 +05:30
Kovid Goyal
27114c9703 DRYer 2026-04-06 11:28:12 +05:30