Commit graph

19076 commits

Author SHA1 Message Date
Kovid Goyal
5bdbf2676b
Graphics: clipping against page margins on scroll
Fixes #10377
2026-08-21 09:16:22 +05:30
Kovid Goyal
2db805c71e
Wayland: Workaround clipboard managers that restore application private MIME types. Fixes #10376 2026-08-21 08:14:38 +05:30
Kovid Goyal
9b29654e90
clarify behavior of leading and trailing commas in the graphics protocol 2026-08-20 15:49:38 +05:30
Kovid Goyal
4fd834a5e7
... 2026-08-20 08:07:21 +05:30
Kovid Goyal
b71e5dfb3b
Cleanup previous PR 2026-08-20 07:53:47 +05:30
Kovid Goyal
1c6603bdb7
Merge branch 'go-kitten-ports' of https://github.com/KodeLoad/kitty 2026-08-20 07:31:03 +05:30
Kovid Goyal
406a92fc69
handle unknown pointer names in OSC 22 more gracefully
Also, allow using beam and arrow as aliases of text and default when
setting pointer shapes. These are the names kitty itself reports, so
they should be allowed in addition to the canonical list from the spec.

Fixes #10372
2026-08-19 04:56:27 +05:30
OBrutus
19a0bf0670 Merge origin/master into go-kitten-ports
Reconcile the three ported kittens with 529 upstream commits. Only conflicts
were in the shrunk resize_window/broadcast/remote_file main.py stubs (upstream
reformatted their OPTIONS strings); resolved by keeping upstream's formatting
plus the Go-port stubs (shrunk main, remote_file handle_result shim, dropped
-h alias). Go build + kitten tests pass; dev build regenerates CLI cleanly;
Python suite at baseline (1 pre-existing unrelated failure).
2026-08-18 16:18:54 +05:30
Kovid Goyal
0ecb10d158
Add AVX 512 implementations for remaining SIMD functions 2026-08-18 09:03:29 +05:30
Kovid Goyal
acadec4a70
Remove trailing whitespace from generated APC parsers 2026-08-18 08:30:12 +05:30
Kovid Goyal
db36f6b9b6
Increase default number of reps for benchmarking 2026-08-18 08:22:46 +05:30
Kovid Goyal
b381d2eb65
Cleanup OSC/APC number parsing 2026-08-18 08:15:34 +05:30
Kovid Goyal
5e2660143f
Update changelog 2026-08-18 08:04:48 +05:30
Kovid Goyal
d63e99e17f
Update changelog 2026-08-18 07:41:42 +05:30
Kovid Goyal
80b4e90933
Merge branch 'macos-fullscreen-tiling' of https://github.com/agmitron/kitty 2026-08-18 07:39:05 +05:30
Aleksei Gmitron
241ee9c4d1 macos: allow OS windows to participate in Split View tiling 2026-08-17 22:17:15 +04:00
OBrutus
49c0117339 remote_file/broadcast/resize_window: untrack generated CLI files, drop dead ToLower, document -h removal 2026-08-17 15:16:50 +05:30
Kovid Goyal
e7ccaa429d
Merge branch 'dependabot/github_actions/actions-24edcfd16d' of https://github.com/kovidgoyal/kitty 2026-08-17 09:23:00 +05:30
Kovid Goyal
fc1e06ca66
Merge branch 'dependabot/go_modules/all-go-deps-6f41e48654' of https://github.com/kovidgoyal/kitty 2026-08-17 09:22:40 +05:30
dependabot[bot]
3bd66222f5
Bump github/codeql-action from 4.37.5 to 4.37.6 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.37.5 to 4.37.6
- [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.37.5...v4.37.6)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-version: 4.37.6
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: actions
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-08-17 03:45:03 +00:00
dependabot[bot]
53b39c786e
Bump the all-go-deps group with 2 updates
Bumps the all-go-deps group with 2 updates: [github.com/klauspost/compress](https://github.com/klauspost/compress) and [github.com/seancfoley/ipaddress-go](https://github.com/seancfoley/ipaddress-go).


Updates `github.com/klauspost/compress` from 1.19.1 to 1.19.2
- [Release notes](https://github.com/klauspost/compress/releases)
- [Commits](https://github.com/klauspost/compress/compare/v1.19.1...v1.19.2)

Updates `github.com/seancfoley/ipaddress-go` from 1.7.1 to 1.8.1
- [Release notes](https://github.com/seancfoley/ipaddress-go/releases)
- [Commits](https://github.com/seancfoley/ipaddress-go/compare/v1.7.1...v1.8.1)

---
updated-dependencies:
- dependency-name: github.com/klauspost/compress
  dependency-version: 1.19.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: all-go-deps
- dependency-name: github.com/seancfoley/ipaddress-go
  dependency-version: 1.8.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: all-go-deps
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-08-17 03:43:04 +00:00
Kovid Goyal
46379d4e0e
Another 10% speedup for printable ascii throughput 2026-08-17 07:14:40 +05:30
Kovid Goyal
82ae858a03
Speed up CSI escape code parsing by ~30% 2026-08-16 22:08:28 +05:30
Kovid Goyal
07ea7583ac
Improve performance of SIMD UTF-8 decoding
Optimise the AVX 2 implementation reducing number of operations per block
and also add an AVX-512 implementation used when the CPU supports it at
runtime.
2026-08-16 20:25:03 +05:30
Kovid Goyal
e62ec6d540
Throughput improvements when processing large blocks of text
Mostly comes from detecting the case of runs of ASCII printable
characters and using a special fast path for them. Improves benchmarks
as per benchmark.py by 15-30% for text heavy workloads
2026-08-16 17:47:56 +05:30
Kovid Goyal
69025901b3
Dont hardcode /tmp 2026-08-16 17:01:27 +05:30
Kovid Goyal
cb32a9b950
Improve throughput for scrollback buffer by ~30% 2026-08-16 16:58:15 +05:30
Kovid Goyal
9ba59a16c1
More benchmark script improvements 2026-08-16 11:59:42 +05:30
Kovid Goyal
f5ae245f65
Switch to perf for profiling from gperftools 2026-08-16 11:24:41 +05:30
Kovid Goyal
a432ef3774
Allow controlling exactly what is benachmarked by benchmark.py 2026-08-16 10:41:30 +05:30
Kovid Goyal
ee156905c7
When expanding a window in alternate screen mode use the most common background color as the color for the newly created lines leading to less visual flicker until the application can redraw itself
Fixes #10365
2026-08-16 07:46:29 +05:30
Kovid Goyal
e2252170cc
Merge branch 'fix-x11-scroll-crossing-storm' of https://github.com/liguangsheng/kitty 2026-08-16 06:11:35 +05:30
Kovid Goyal
cc15b85c4d
Bump version of go/image 2026-08-15 14:08:26 +05:30
Kovid Goyal
82600d7e6f
Merge branch 'fix-wayland-null-output-crash' of https://github.com/browntech/kitty 2026-08-15 10:05:52 +05:30
Wes Brown
2dbe5df2d8 Wayland: fix crash when an output global is removed
surfaceHandleEnter() and surfaceHandleLeave() passed the event's output
argument straight to wl_output_get_user_data(). Wayland delivers object
arguments as NULL when the object was destroyed client-side before the
event was dispatched, even for arguments declared non-nullable, so this
segfaults whenever a wl_output global goes away while a window is open.
Easily reproduced with a hardware KVM or a monitor input switch.

Also fixes two pre-existing problems in surfaceHandleLeave():

- The removal loop stopped at monitorsCount - 1, so it never compared the
  last entry, and the trailing unconditional
  window->wl.monitors[--window->wl.monitorsCount] = NULL
  dropped the last monitor whether or not it was the one that was left.
  A leave for a monitor not in the list therefore evicted an unrelated
  one.
- That same statement ran even when monitorsCount was 0, writing to
  monitors[-1] and leaving the count negative.

Both are replaced with the remove_i_from_array() loop already used for
this array in registryHandleGlobalRemove().

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-14 19:01:11 -05:00
liguangsheng
153c93633f X11: fix scroll wheel being ignored when spurious crossing events occur
resetScrollValuators() runs on every LeaveNotify, clearing the initialized
flag of every scroll valuator. handle_xi_motion_event() then treats the next
XI_Motion event as a baseline sample and discards it.

On setups where the X server emits crossing events with mode NotifyGrab
faster than the wheel is turned, every scroll event lands in that branch and
is swallowed, so scrolling does not work at all. This is easy to hit inside a
VMware guest, where the same physical mouse is exposed as several pointer
devices: --debug-input shows a continuous leave/enter cycle and a single
Scroll event for the whole session.

Fix this in two places:

- Do not reset the baseline for crossing events generated by a grab being
  activated/released or by the pointer moving to a child window, since the
  pointer did not actually leave.

- Keep the baseline value across a reset so the next event can still compute
  a delta from it, and only discard the event when the jump is too large to
  be a genuine scroll.

Fixes #9846
2026-08-14 19:04:54 +08:00
Kovid Goyal
b71ef95ec7
Fix northern lights rendering on OS Window resize 2026-08-14 16:07:07 +05:30
Kovid Goyal
1b0c1d0a0c
Merge branch 'fix/builtin-kitten-guide' of https://github.com/M-Hassan-Raza/kitty 2026-08-14 15:48:15 +05:30
Hassan Raza
b172b487fd
Fix builtin kitten development guide 2026-08-14 12:25:02 +05:00
OBrutus
344d45d694 remote_file kitten: reset terminal before top-level error display
main()'s error path after handle_action fails (e.g. malformed
--ssh-connection-data, or a ControlMaster connect failure) was missing the
reset_terminal() call Python's equivalent except-path makes
(kittens/remote_file/main.py pre-shrink: `except Exception: print(reset_terminal(),
...); traceback.print_exc(); show_error(...)`). Without it, the error rendered
over the stale ask-menu screen instead of a clean one. Added reset_terminal()
before show_error(), matching the other four call sites already added for
this kitten.

Verified: launched `kitten remote-file --path /nonexistent --hostname x
--ssh-connection-data 'not-json'` in a disposable kitty instance, selected an
action to trigger the parse failure, and confirmed via `get-text`/`get-text
--extent=all` that only the error message is present -- no ask-menu leftovers.
2026-08-14 12:41:25 +05:30
Kovid Goyal
d9610f5e1e
Bump version of Go 2026-08-14 08:10:55 +05:30
Kovid Goyal
f29665f601
Merge branch 'fix/bash-ssh-hostname-detection' of https://github.com/M-Hassan-Raza/kitty 2026-08-14 07:58:18 +05:30
Kovid Goyal
d65382d1a6
Merge branch 'fix-remap-keymap-reload' of https://github.com/bjohas/kitty 2026-08-14 07:56:19 +05:30
OBrutus
a0978a74a2 remote_file kitten: port ask UI to Go, wrap and shrink Python to result-handler shim
Adds kittens/remote_file/main.go (ask menu, hostname-mismatch prompt,
save-path prompt with tab completion, edit/open/save actions) on top of the
ControlMaster/ssh helpers from the previous two commits, registers it in
tools/cmd/tool/main.go, and adds remote_file to shell-integration/ssh/kitty's
wrapped_kittens list so both `kitty +kitten remote_file` and ssh-session
invocations exec the Go binary directly. main.py is shrunk to option_text
(kept importable by kitty/cli_stub.py and used for --doc/--help generation),
is_ssh_kitten_sentinel (kept importable by kitty/window.py), and the
handle_result shim boss.py runs in-process to open the returned file.

Also drops the dead `-h` alias on --hostname: Python's CLI layer always
special-cases -h/--help ahead of user options, so it never worked as a
hostname shorthand, but the Go CLI layer hard-errors on the collision; removing
it is a no-op for existing behavior (boss.py only ever passes --hostname) and
unblocks `kitten remote-file --help`. Also adds the same reset_terminal()
calls Python makes between UI phases (ask menu -> action, hostname-mismatch
prompt, overwrite prompt, $EDITOR handoff) so the Go and Python screens match.

Manually verified parity against Python (ask menu, cancel, open/edit/save
download+upload round-trips, hostname-mismatch Y/N, save-path prompt and
overwrite O/A/R/N) using a fake-ssh test double, and confirmed post-wrap that
`kitty +kitten remote_file` execs the Go kitten binary.
2026-08-13 15:21:57 +05:30
bjohas
bd0a39f495 Re-apply remap_modifiers to a reloaded xkb keymap state
On X11 glfw_xkb_compile_keymap() gets its state from
xkb_x11_state_new_from_device(), which seeds it with the server's physical
modifier mask. Every other path into that state goes through
glfw_xkb_update_modifiers(), where the permutation is applied, so after a
keymap reload the state held physical modifiers until the next XkbStateNotify
happened to arrive. Any key pressed in that window was encoded with the
modifier on the keycap: with ctrl held across a reload under
`remap_modifiers ctrl:super`, Ctrl+A reached the child as a literal 0x01.

Keymap reloads are routine - switching layout causes one, and so does any
client asking X for a keysym it must bind to a spare keycode.

Re-apply the permutation to the freshly loaded state, after
glfw_xkb_update_masks() has computed the modifier indices it is expressed in.
On Wayland the new state is empty, so this is a no-op there.
2026-08-13 10:20:20 +01:00
Hassan Raza
2a67ebf7e2
Wrap get-text protocol schema 2026-08-13 13:14:04 +05:00
Kovid Goyal
5be74884c8
... 2026-08-13 09:01:38 +05:30
Hassan Raza
bf18c2b8c1
Fix Bash SSH hostname detection 2026-08-13 07:55:42 +05:00
Kovid Goyal
48625a824d
Remove incremental linking test. setup is not available in all contexts where tests run and this functionality isnt important enough to warrant a test anyway 2026-08-13 08:14:28 +05:30
Kovid Goyal
3362c47fb2
Merge branch 'fix/get-text-protocol-extent' of https://github.com/M-Hassan-Raza/kitty 2026-08-13 08:11:38 +05:30