Commit Graph

17701 Commits

Author SHA1 Message Date
copilot-swe-agent[bot]
398fb8d156 Move text width calculation into draw_window_title to avoid double CSI stripping
Refactored so text_width_for_single_line is called inside draw_window_title
after CSI stripping, avoiding stripping the same text twice. The standalone
text_width_for_single_line wrapper is removed; draw_window_title now accepts
a size_t *actual_width output parameter that, when non-NULL, triggers text
width calculation and width reduction.

Agent-Logs-Url: https://github.com/kovidgoyal/kitty/sessions/a70cccb9-332a-4f7b-81f8-8cbeb7ed2c26

Co-authored-by: kovidgoyal <1308621+kovidgoyal@users.noreply.github.com>
2026-04-06 05:43:04 +00:00
copilot-swe-agent[bot]
969562a999 Add changelog entry and fix size_t comparison in draw_single_line_of_text
Agent-Logs-Url: https://github.com/kovidgoyal/kitty/sessions/508483db-ffcd-4d43-a8ee-83fcd3ec9c01

Co-authored-by: kovidgoyal <1308621+kovidgoyal@users.noreply.github.com>
2026-04-06 05:30:05 +00:00
copilot-swe-agent[bot]
4bcfafa945 Improve draw_single_line_of_text to support max_width and return (pixels, width) tuple
- Add freetype_text_width_for_single_line() in freetype_render_ui_text.c
- Add cocoa_text_width_for_single_line() in core_text.m
- Add text_width_for_single_line() wrapper in glfw.c for both platforms
- Modify draw_single_line_of_text() to accept optional max_width parameter
- Return (pixels, width) tuple instead of just pixels
- Update all Python call sites in tabs.py and window.py

Agent-Logs-Url: https://github.com/kovidgoyal/kitty/sessions/508483db-ffcd-4d43-a8ee-83fcd3ec9c01

Co-authored-by: kovidgoyal <1308621+kovidgoyal@users.noreply.github.com>
2026-04-06 05:25:38 +00:00
Kovid Goyal
c88adfba98 Allow optionally dragging URLs with the mouse
Fixes #9804
2026-04-06 10:40:11 +05:30
Kovid Goyal
69e4158259 Merge branch 'dependabot/go_modules/all-go-deps-2b207f902f' of https://github.com/kovidgoyal/kitty 2026-04-06 09:24:12 +05:30
dependabot[bot]
941a4cbcd5 Bump github.com/shirou/gopsutil/v4 in the all-go-deps group
Bumps the all-go-deps group with 1 update: [github.com/shirou/gopsutil/v4](https://github.com/shirou/gopsutil).


Updates `github.com/shirou/gopsutil/v4` from 4.26.2 to 4.26.3
- [Release notes](https://github.com/shirou/gopsutil/releases)
- [Commits](https://github.com/shirou/gopsutil/compare/v4.26.2...v4.26.3)

---
updated-dependencies:
- dependency-name: github.com/shirou/gopsutil/v4
  dependency-version: 4.26.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: all-go-deps
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-04-06 03:43:13 +00:00
Kovid Goyal
79cadf4a5f ... 2026-04-05 18:25:05 +05:30
Kovid Goyal
a29b9387fa More work on DnD protocol implementation 2026-04-04 14:27:03 +05:30
Kovid Goyal
ce041fab84 More work on DnD protocol implementation 2026-04-04 13:32:18 +05:30
Kovid Goyal
9666cf83ad Merge branch 'pr/kitty-rc-background-layouts' of https://github.com/oxysoft/kitty 2026-04-04 12:49:00 +05:30
nuck
e530a6f46b feat(rc): add cscaled and centered to set-background-image layout choices
These layout values were valid in kitty.conf but missing from remote control validation.
2026-04-04 03:01:32 -04:00
Kovid Goyal
9c8a4ad540 ... 2026-04-04 11:47:08 +05:30
Kovid Goyal
8bf1bd479b edit-in-kitty: Ignore environment variables as some editors execute code present in env vars 2026-04-04 08:42:06 +05:30
Kovid Goyal
4aa7739bdd ... 2026-04-03 23:26:39 +05:30
Kovid Goyal
0fcbd265b6 Accumulate DnD image data 2026-04-03 23:18:07 +05:30
Kovid Goyal
950497ac0c Cleanup previous PR 2026-04-03 22:25:05 +05:30
Kovid Goyal
d8f2d703d7 Merge branch 'security-hardening' of https://github.com/z3rco/kitty 2026-04-03 21:24:26 +05:30
Kovid Goyal
281cff0b60 base64 decode present dnd source data 2026-04-03 21:13:41 +05:30
z3rco
b39f88c6a2 Fix multiple security vulnerabilities across C, Python, and Go code
Timing-safe comparisons:
- crypto.c: Replace memcmp with CRYPTO_memcmp for Secret equality,
  require equal lengths before comparing
- remote_control.py: Constant-time password lookup to avoid leaking
  valid passwords via dict hash timing
- file_transmission.py: Use hmac.compare_digest for bypass token
  comparison instead of ==

Memory safety:
- child-monitor.c: Fix inverted condition in write_to_peer that
  prevented memmove from ever executing on partial writes
- ibus_glfw.c: Null-terminate IBUS_ADDRESS copy to prevent string
  overread when strlen >= PATH_MAX
- x11_window.c: Add NULL checks after realloc in clipboard/DnD
  data handling (two sites)
- dnd.c: Cap accepted_mimes at 1MB to prevent unbounded growth,
  fix realloc to not lose the original pointer on failure
- png-reader.c: Cast to size_t before multiplication to prevent
  integer overflow on 32-bit platforms

Secrets hygiene:
- disk-cache.c: Zero encryption_key with explicit_bzero before free

Tar extraction hardening:
- tar.go: Validate hardlink targets against destination prefix to
  prevent writing outside extraction directory
- tar.go: Strip setuid/setgid/sticky bits from extracted files

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-03 16:10:46 +01:00
Kovid Goyal
0619c7e435 More work on DnD protocol 2026-04-03 19:58:59 +05:30
Kovid Goyal
6cc9bd69c0 icat: Fix incorrect colors when displaying some images with an ICC profile that produces out of gamut colors 2026-04-03 19:57:43 +05:30
Kovid Goyal
d592468375 ... 2026-04-03 14:04:50 +05:30
Kovid Goyal
e09bfc0708 Update changelog 2026-04-03 13:53:26 +05:30
Kovid Goyal
c246da81cc Merge branch 'copilot/implement-todo-line-89' of https://github.com/kovidgoyal/kitty 2026-04-03 11:58:58 +05:30
copilot-swe-agent[bot]
0f4b673d02 Implement TODO in drag_add_mimes: populate ds.mimes from ds.mimes_buf
Agent-Logs-Url: https://github.com/kovidgoyal/kitty/sessions/b92ba12a-26f2-4a01-8ad9-665bbd90b98a

Co-authored-by: kovidgoyal <1308621+kovidgoyal@users.noreply.github.com>
2026-04-03 06:23:58 +00:00
Kovid Goyal
f6339d0bbf More work on the DnD protocol 2026-04-03 11:42:22 +05:30
Kovid Goyal
06d201c3a5 ... 2026-04-03 09:55:36 +05:30
Kovid Goyal
0584cbfadc Implement sending drag start message to client 2026-04-03 09:42:57 +05:30
Kovid Goyal
cf52a8289c ... 2026-04-03 08:31:42 +05:30
Kovid Goyal
c1947765f3 Fix #9799 2026-04-03 08:21:45 +05:30
Kovid Goyal
07f4d3c7ae Unify the two drag threshold settings 2026-04-02 13:49:15 +05:30
Kovid Goyal
d1d7a442b6 Merge branch 'copilot/modify-glfwstartdrag-cancel' of https://github.com/kovidgoyal/kitty 2026-04-02 12:47:55 +05:30
copilot-swe-agent[bot]
2f33460864 Add operations==-3 cancel drag support to glfwStartDrag
Agent-Logs-Url: https://github.com/kovidgoyal/kitty/sessions/eff7e2c8-ab7a-4967-95b5-e65631245701

Co-authored-by: kovidgoyal <1308621+kovidgoyal@users.noreply.github.com>
2026-04-02 07:14:36 +00:00
Kovid Goyal
e41592e3b1 More work on the DnD protocol 2026-04-02 12:03:49 +05:30
Kovid Goyal
04665db6dd Merge branch 'copilot/improve-dnd-file-reading-non-blocking' of https://github.com/kovidgoyal/kitty 2026-04-02 11:46:22 +05:30
copilot-swe-agent[bot]
e948f64dbf dnd.c: use non-blocking I/O in drop_send_file_chunks()
Agent-Logs-Url: https://github.com/kovidgoyal/kitty/sessions/472b29a5-22c7-4f25-9541-9c9fafa78518

Co-authored-by: kovidgoyal <1308621+kovidgoyal@users.noreply.github.com>
2026-04-02 06:13:23 +00:00
Kovid Goyal
5cb0df0305 Update changelog 2026-04-02 08:55:45 +05:30
Kovid Goyal
af355e78d3 Merge branch 'copilot/improve-file-url-parsing' of https://github.com/kovidgoyal/kitty 2026-04-02 08:55:06 +05:30
copilot-swe-agent[bot]
087c5c1db9 dnd.c: strip query and fragment parts from file:// URLs before path resolution
Agent-Logs-Url: https://github.com/kovidgoyal/kitty/sessions/8293fefc-4d7c-4502-9646-6270328d4a59

Co-authored-by: kovidgoyal <1308621+kovidgoyal@users.noreply.github.com>
2026-04-02 03:19:41 +00:00
Kovid Goyal
4688992d57 ... 2026-04-02 08:45:09 +05:30
Kovid Goyal
eff590ab5a Merge branch 'copilot/improve-memory-management' of https://github.com/kovidgoyal/kitty 2026-04-01 21:13:38 +05:30
copilot-swe-agent[bot]
c5afef1142 Rename file_fd to file_fd_plus_one so zero value means invalid fd
Agent-Logs-Url: https://github.com/kovidgoyal/kitty/sessions/e5f07308-d11d-43d9-9dd5-75b3a10c6e2e

Co-authored-by: kovidgoyal <1308621+kovidgoyal@users.noreply.github.com>
2026-04-01 15:29:12 +00:00
copilot-swe-agent[bot]
68cb5760b3 dnd.c: send file data in chunks instead of reading entire file into memory
Agent-Logs-Url: https://github.com/kovidgoyal/kitty/sessions/5ec2905d-2e8a-4b6a-8070-cd59921cd61d

Co-authored-by: kovidgoyal <1308621+kovidgoyal@users.noreply.github.com>
2026-04-01 15:06:06 +00:00
Kovid Goyal
15e37efd00 Fix fd leak on invalid file 2026-04-01 20:16:49 +05:30
Kovid Goyal
03cf6f9348 Fix unclosed resource warning in test 2026-04-01 20:01:28 +05:30
Kovid Goyal
1fbb10e789 Use fstat() rather than stat() 2026-04-01 19:58:04 +05:30
Kovid Goyal
78f1607bf5 Cleanup previous PR 2026-04-01 19:52:40 +05:30
Kovid Goyal
05f4c324f1 Merge branch 'copilot/implement-dnd-protocol-dropping-remote' of https://github.com/kovidgoyal/kitty 2026-04-01 19:37:17 +05:30
copilot-swe-agent[bot]
51fe3dc274 Implement DnD protocol: t=s URI file transfer and t=d directory listing with tests
Agent-Logs-Url: https://github.com/kovidgoyal/kitty/sessions/a5aee38b-1746-4699-9dcc-2138f43cabe8

Co-authored-by: kovidgoyal <1308621+kovidgoyal@users.noreply.github.com>
2026-04-01 08:55:55 +00:00
Kovid Goyal
81d0e2dc8e Cleanup previous PR 2026-04-01 13:05:56 +05:30