Commit graph

19951 commits

Author SHA1 Message Date
Zhizhen He
96ddbed7f6 Clamp scroll_to_prompt offsets to available scrollback
Keep the viewport within the history buffer and remember the matched prompt when it is visible so last-visited output follows the jump.
2026-11-11 21:18:20 +08:00
Kovid Goyal
bb237bf137
fix failing test
Some checks are pending
CI / Linux (python=3.14 cc=clang sanitize=1) (push) Waiting to run
CI / Linux (python=3.12 cc=gcc sanitize=0) (push) Waiting to run
CI / Linux (python=3.13 cc=gcc sanitize=1) (push) Waiting to run
CI / Linux package (push) Waiting to run
CI / Bundle test (macos-latest) (push) Waiting to run
CI / Bundle test (ubuntu-latest) (push) Waiting to run
CI / macOS Brew (push) Waiting to run
CI / Test ./dev.sh and benchmark (push) Waiting to run
CodeQL / CodeQL-Build (actions, ubuntu-latest) (push) Waiting to run
CodeQL / CodeQL-Build (c, macos-latest) (push) Waiting to run
CodeQL / CodeQL-Build (c, ubuntu-latest) (push) Waiting to run
CodeQL / CodeQL-Build (go, ubuntu-latest) (push) Waiting to run
CodeQL / CodeQL-Build (python, ubuntu-latest) (push) Waiting to run
Depscan / Scan dependencies for vulnerabilities (push) Waiting to run
2026-11-11 14:15:05 +05:30
Kovid Goyal
7e16359486
Keep everything drawn over the frozen frame aligned during synchronized output
While rendering is paused, output can change the live scroll position,
pixel scroll offset, scrollback size and active screen. Image layers,
cursor visibility and the scrollbar used those live values while the
text was drawn from the frozen snapshot, so they drifted from it.

Capture the scrollback size and active screen at pause time and add
rendered_scrolled_by, rendered_history_count and rendered_on_main_screen
macros alongside rendered_pixel_scroll_offset_y. Move image layer
updates and scrollbar visibility and geometry into screen.c so the
renderer and the tests share the same code.

Closes #10847
2026-11-11 13:29:24 +05:30
Kovid Goyal
da2a59b658
Strengthen the erase_last_command scrollback tests
Test that multicell chars not cut by the erase survive it: a wide char at
the top of the screen and a scaled char in the live prompt running from the
scrollback onto the screen. Check the full text after cutting large chars,
make the fragment check verify the parts above and below each multicell
cell, and run the standalone checks in subtests so that one failure no
longer hides the checks after it.
2026-11-11 11:31:45 +05:30
Kovid Goyal
a9147bbf01
Fix erase_last_command when the live prompt has scrolled into the scrollback
When the first lines of the live prompt were in the scrollback, an unsigned
wrap made erase_last_command delete most of the screen and the newest
scrollback lines, including the live prompt. Delete the erased lines from
the middle of the scrollback instead, with a new historybuf_delete_lines()
that removes multicell chars cut by the deletion, and also remove such
fragments from the screen. Clear selections and the wrap flag of the line
above the erased lines on every path.

Also keep the last visited prompt on the same content when lines are
inserted or deleted (CSI L/M), forget it on a hard reset, and only fill from
the scrollback when unscrolling (CSI + T) if the scroll region starts at the
top of the screen, instead of overwriting the top line of the screen.
2026-11-11 11:22:56 +05:30
Kovid Goyal
e52586d87c
Track the last visited prompt as a single content row
Store the last visited prompt as one row relative to the top of the live
screen (negative rows are in the scrollback) plus the viewport row it was
visited at, and derive the scroll offset when it is used. Previously it was
stored as a (viewport y, scrolled_by) pair that every code path moving lines
had to keep consistent by hand, which broke after erasing a command left
less scrollback than the saved offset, and when scrolling regions with
margins or reverse indexing.
2026-11-11 11:08:48 +05:30
Kovid Goyal
004fc0a6fb
Merge branch 'codex/update-go-1.26.11' of https://github.com/hezhizhen/kitty 2026-11-11 10:02:52 +05:30
Zhizhen He
ac5a0f8ac1 Bump Go toolchain to 1.26.11
Use the latest Go 1.26 patch release in CI. It fixes the standard library issue GO-2026-6859 reported by govulncheck.
2026-11-11 12:16:22 +08:00
Kovid Goyal
7f5dc2d39c
Update changelog 2026-11-11 08:51:57 +05:30
Kovid Goyal
246df5abf1
save_as_session: Cleanup previous PR
Choose the tab to focus using only the windows that were actually saved,
moving the choice into a pure function so it can be tested without
constructing a TabManager. Test the first OS window logic with simple fake
tab managers instead of patching TabManager internals. Merge the changelog
entries and mention restore after logout.
2026-11-11 08:41:17 +05:30
Kovid Goyal
5e9638d938
Merge branch 'pr/chancez/save-as-session-match' of https://github.com/chancez/kitty 2026-11-11 08:39:18 +05:30
Chance Zibolski
6234c5f99c Fix the focus_tab written by save_as_session --match
TabManager.serialize_state_as_session wrote focus_tab as the index of the
active tab among all the tabs of the OS window, but loading a session
counts only the tabs it creates. With --match the tabs of other sessions
are not saved, so a session with such tabs before its active tab came back
on the wrong tab, or on its last tab once the index was clamped.

Write the index among the saved tabs. When the active tab is not saved, as
when it belongs to another session, write the saved tab with the most
recently focused saved window. That is the tab kitty focuses when switching
to the session while it is open, as window_for_session_name picks the
session's most recently focused window, so the session comes back as it was
last seen. Leaving focus_tab out instead would focus whichever saved tab
has the last focus command, usually the last one, which is arbitrary.
2026-11-10 16:02:17 -08:00
Chance Zibolski
32c6dbd501 Do not open save_as_session --match sessions in a new OS window
Boss.serialize_state_as_session passed is_first to the first OS window it
serialized, which is any but the focused one when there are several. With
--match that OS window can have no matching windows and write nothing, and
the next one then started the file with new_os_window, so loading the
session opened it in a new OS window instead of the current one. Whether
it did depended on which OS window had focus when saving.

Pass is_first to the first OS window that writes anything.
2026-11-10 16:00:46 -08:00
Kovid Goyal
a95310e8bc
choose-files: Cleanup previous PR
Some checks are pending
CI / Linux (python=3.14 cc=clang sanitize=1) (push) Waiting to run
CI / Linux (python=3.12 cc=gcc sanitize=0) (push) Waiting to run
CI / Linux (python=3.13 cc=gcc sanitize=1) (push) Waiting to run
CI / Linux package (push) Waiting to run
CI / Bundle test (macos-latest) (push) Waiting to run
CI / Bundle test (ubuntu-latest) (push) Waiting to run
CI / macOS Brew (push) Waiting to run
CI / Test ./dev.sh and benchmark (push) Waiting to run
CodeQL / CodeQL-Build (actions, ubuntu-latest) (push) Waiting to run
CodeQL / CodeQL-Build (c, macos-latest) (push) Waiting to run
CodeQL / CodeQL-Build (c, ubuntu-latest) (push) Waiting to run
CodeQL / CodeQL-Build (go, ubuntu-latest) (push) Waiting to run
CodeQL / CodeQL-Build (python, ubuntu-latest) (push) Waiting to run
Depscan / Scan dependencies for vulnerabilities (push) Waiting to run
Always reply from the calibre worker, even when reading metadata raises or
calibre emits stray output, so that the request does not block until it
times out.

Accept cached calibre metadata generated for a different path to the same
file, as the disk cache key resolves symlinks. Otherwise a symlink and its
target keep invalidating each other's cache entry.
2026-11-10 19:29:52 +05:30
Kovid Goyal
245681507a
Merge branch 'codex/fix-calibre-preview-responses' of https://github.com/hezhizhen/kitty 2026-11-10 19:28:04 +05:30
Kovid Goyal
501c57deb5
Make scrollback anchoring more robust
Fix various code paths that dont deal with scrolled back state
correctly.

Closes #10841
2026-11-10 19:20:17 +05:30
Zhizhen He
9777edff79 choose-files: Match calibre preview replies to requests
Dispatch replies by request ID from a single reader so concurrent previews receive their own metadata and late replies cannot interfere with subsequent requests.
2026-11-10 20:53:40 +08:00
Kovid Goyal
0273bc12c3
Merge branch 't1k-keyboard-protocol' of https://github.com/erango/kitty
Some checks are pending
CI / Linux (python=3.14 cc=clang sanitize=1) (push) Waiting to run
CI / Linux (python=3.12 cc=gcc sanitize=0) (push) Waiting to run
CI / Linux (python=3.13 cc=gcc sanitize=1) (push) Waiting to run
CI / Linux package (push) Waiting to run
CI / Bundle test (macos-latest) (push) Waiting to run
CI / Bundle test (ubuntu-latest) (push) Waiting to run
CI / macOS Brew (push) Waiting to run
CI / Test ./dev.sh and benchmark (push) Waiting to run
CodeQL / CodeQL-Build (actions, ubuntu-latest) (push) Waiting to run
CodeQL / CodeQL-Build (c, macos-latest) (push) Waiting to run
CodeQL / CodeQL-Build (c, ubuntu-latest) (push) Waiting to run
CodeQL / CodeQL-Build (go, ubuntu-latest) (push) Waiting to run
CodeQL / CodeQL-Build (python, ubuntu-latest) (push) Waiting to run
Depscan / Scan dependencies for vulnerabilities (push) Waiting to run
2026-11-10 13:35:37 +05:30
erango
fa1d1b40ab Add T1K to the list of terminals implementing the keyboard protocol 2026-11-10 09:53:59 +02:00
Kovid Goyal
67c6d243c4
Fix animated mouse pointers restarting on every mouse move
The mouse-demo kitten popped and pushed the pointer shape on every mouse
event, and kitty applied each OSC 22 to the OS pointer immediately, so the
pointer briefly flipped to the default shape and back, restarting
animations. Only change the shape in the kitten when it actually changes,
and apply pointer shape stack changes to the OS pointer once per batch of
parsed child output.

Also have ApplyHoverStyles replace the current shape instead of pushing a
new one, so the shape stack does not grow as the mouse moves between
regions.

Fixes #10838
2026-11-10 08:49:23 +05:30
Kovid Goyal
bc1628d849
get-colors: Report cursor text color as cursor_text_color
ColorProfile.as_dict() used the key cursor_text instead of the kitty.conf
name cursor_text_color, so get-colors listed the window override under a
different name than the configured value, which then shadowed it.
2026-11-10 08:27:50 +05:30
Kovid Goyal
f0286492d5
set-colors: Accept cursor_text_color background in color files
The Go client rejected the value, even though kitty.conf and the old Python
client accept it and treat it as None. Fixes #10832
2026-11-10 08:24:47 +05:30
Kovid Goyal
45cd5201e9
ssh kitten: Fix remote directories being created world writable
The bootstrap script extracted the tarball with umask 000, so tar
created any directories not present in the tarball, such as ~/.terminfo
and the ssh kitten data directory, with mode 0777. Since tar is run with
-p, the permissions of entries in the tarball are already restored
exactly, so the umask override is unnecessary. Remove it so that
directories not in the tarball respect the user's umask, matching the
behavior of bootstrap.py.

Fixes #10834
Closes #10835
2026-11-10 08:15:26 +05:30
Kovid Goyal
d1fc36a613
Merge branch 'codex/remove-pre37-python-compat' of https://github.com/hezhizhen/kitty
Some checks are pending
CI / Linux (python=3.14 cc=clang sanitize=1) (push) Waiting to run
CI / Linux (python=3.12 cc=gcc sanitize=0) (push) Waiting to run
CI / Linux (python=3.13 cc=gcc sanitize=1) (push) Waiting to run
CI / Linux package (push) Waiting to run
CI / Bundle test (macos-latest) (push) Waiting to run
CI / Bundle test (ubuntu-latest) (push) Waiting to run
CI / macOS Brew (push) Waiting to run
CI / Test ./dev.sh and benchmark (push) Waiting to run
CodeQL / CodeQL-Build (actions, ubuntu-latest) (push) Waiting to run
CodeQL / CodeQL-Build (c, macos-latest) (push) Waiting to run
CodeQL / CodeQL-Build (c, ubuntu-latest) (push) Waiting to run
CodeQL / CodeQL-Build (go, ubuntu-latest) (push) Waiting to run
CodeQL / CodeQL-Build (python, ubuntu-latest) (push) Waiting to run
Depscan / Scan dependencies for vulnerabilities (push) Waiting to run
2026-11-09 22:04:13 +05:30
Zhizhen He
09e628ff94 Remove obsolete pre-3.7 Python compatibility branches 2026-11-10 00:01:50 +08:00
Kovid Goyal
62ed852f97
Cleanup patch_global_colors special color decoding
Some checks are pending
CI / Linux (python=3.14 cc=clang sanitize=1) (push) Waiting to run
CI / Linux (python=3.12 cc=gcc sanitize=0) (push) Waiting to run
CI / Linux (python=3.13 cc=gcc sanitize=1) (push) Waiting to run
CI / Linux package (push) Waiting to run
CI / Bundle test (macos-latest) (push) Waiting to run
CI / Bundle test (ubuntu-latest) (push) Waiting to run
CI / macOS Brew (push) Waiting to run
CI / Test ./dev.sh and benchmark (push) Waiting to run
CodeQL / CodeQL-Build (actions, ubuntu-latest) (push) Waiting to run
CodeQL / CodeQL-Build (c, macos-latest) (push) Waiting to run
CodeQL / CodeQL-Build (c, ubuntu-latest) (push) Waiting to run
CodeQL / CodeQL-Build (go, ubuntu-latest) (push) Waiting to run
CodeQL / CodeQL-Build (python, ubuntu-latest) (push) Waiting to run
Depscan / Scan dependencies for vulnerabilities (push) Waiting to run
Check for conversion errors per option so a failed conversion returns
immediately instead of storing the error sentinel and continuing. Document
why macos_titlebar_color stays signed. Make the test meaningful on 64-bit
platforms by asserting negative values are rejected for the unsigned
options, and restore options afterwards.
2026-11-09 19:03:53 +05:30
Kovid Goyal
4c701fcaa2
Merge branch 'codex/fix-ilp32-special-color-decoding' of https://github.com/hezhizhen/kitty 2026-11-09 19:00:21 +05:30
Zhizhen He
153a8c6295 Fix special color decoding on 32-bit platforms
RGB encodings can use the high bit of a 32-bit long. Decode the Wayland titlebar and scrollbar colors as unsigned values at runtime, matching their config converters. Keep the signed macOS titlebar sentinels.
2026-11-09 21:16:34 +08:00
Kovid Goyal
57e0fa7f30
Merge branch 'codex/remove-unused-ceil-int' of https://github.com/hezhizhen/kitty 2026-11-09 18:37:42 +05:30
Zhizhen He
401cb7ca72 Remove unused ceil_int helper 2026-11-09 20:06:40 +08:00
Kovid Goyal
d49e07db22
Merge branch 'fix-i586-build-pr' of https://github.com/Blarse/kitty 2026-11-09 17:16:18 +05:30
Egor Ignatov
51b159f990 Fix PNG dimension validation test on 32-bit platforms
Expect OverflowError for dimensions that exceed sys.maxsize, since
PyArg_ParseTuple rejects them before the PNG buffer validation runs.
Continue to expect ValueError for invalid dimensions and buffer lengths
that reach the validation code.
2026-11-09 13:01:06 +03:00
Egor Ignatov
0b1b477409 Fix special color encoding on 32-bit platforms
Use int64 for encoded special colors so RGB values shifted into the
upper three bytes remain positive on 32-bit platforms, while preserving
the negative sentinel values used for macOS titlebar colors.

Update the tests to use the same type, avoiding overflowing int constants
when compiling them on 32-bit platforms.
2026-11-09 13:01:06 +03:00
Egor Ignatov
5561bc2900 Fix NULL_COLOR_VALUE on 32-bit platforms
Export NULL_COLOR_VALUE using PyLong_FromUnsignedLong instead of
PyModule_AddIntMacro, which converts it to a signed long. On 32-bit
platforms this turns 0xffffffff into -1 and causes the generated Go
uint32 constant to overflow, preventing kitten from building.

Add a regression check for the exported value.
2026-11-09 13:01:06 +03:00
Kovid Goyal
2db470b785
Merge branch 'dependabot/go_modules/all-go-deps-eaa0ef2624' of https://github.com/kovidgoyal/kitty
Some checks are pending
CI / Linux (python=3.14 cc=clang sanitize=1) (push) Waiting to run
CI / Linux (python=3.12 cc=gcc sanitize=0) (push) Waiting to run
CI / Linux (python=3.13 cc=gcc sanitize=1) (push) Waiting to run
CI / Linux package (push) Waiting to run
CI / Bundle test (macos-latest) (push) Waiting to run
CI / Bundle test (ubuntu-latest) (push) Waiting to run
CI / macOS Brew (push) Waiting to run
CI / Test ./dev.sh and benchmark (push) Waiting to run
CodeQL / CodeQL-Build (actions, ubuntu-latest) (push) Waiting to run
CodeQL / CodeQL-Build (c, macos-latest) (push) Waiting to run
CodeQL / CodeQL-Build (c, ubuntu-latest) (push) Waiting to run
CodeQL / CodeQL-Build (go, ubuntu-latest) (push) Waiting to run
CodeQL / CodeQL-Build (python, ubuntu-latest) (push) Waiting to run
Depscan / Scan dependencies for vulnerabilities (push) Waiting to run
2026-11-09 09:19:50 +05:30
dependabot[bot]
ae133ad0ed
Bump the all-go-deps group with 3 updates
Bumps the all-go-deps group with 3 updates: [github.com/dlclark/regexp2/v2](https://github.com/dlclark/regexp2), [github.com/ebitengine/purego](https://github.com/ebitengine/purego) and [github.com/seancfoley/ipaddress-go](https://github.com/seancfoley/ipaddress-go).


Updates `github.com/dlclark/regexp2/v2` from 2.2.1 to 2.12.0
- [Commits](https://github.com/dlclark/regexp2/compare/v2.2.1...v2.12.0)

Updates `github.com/ebitengine/purego` from 0.11.2 to 0.11.3
- [Release notes](https://github.com/ebitengine/purego/releases)
- [Commits](https://github.com/ebitengine/purego/compare/v0.11.2...v0.11.3)

Updates `github.com/seancfoley/ipaddress-go` from 1.8.4 to 1.8.5
- [Release notes](https://github.com/seancfoley/ipaddress-go/releases)
- [Commits](https://github.com/seancfoley/ipaddress-go/compare/v1.8.4...v1.8.5)

---
updated-dependencies:
- dependency-name: github.com/dlclark/regexp2/v2
  dependency-version: 2.12.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: all-go-deps
- dependency-name: github.com/ebitengine/purego
  dependency-version: 0.11.3
  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.5
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: all-go-deps
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-11-09 03:42:53 +00:00
Kovid Goyal
8e73e474b0
X11: Use a single process wide X error handler
Replace the grab/release error handler pattern with a process wide
handler that is installed for the lifetime of the display. Errors are
captured by nestable traps identified by request serial numbers, so
traps only capture errors from requests made while they are open, and
errors from requests not covered by any trap are reported rather than
exiting the process.

Requests to windows owned by other clients (selection requestors, drag
and drop peers) are trapped individually, without waiting for a round
trip to the server, and without covering calls into the application.

Also fix reading uninitialized memory when handling a MULTIPLE
selection request whose requestor window has been destroyed, trap
errors when replying to drag sources, report failure to deliver drag
data, and fix detectEWMH() leaving the error handler installed on an
early return.
2026-11-09 09:01:19 +05:30
Kovid Goyal
9e5329d52a
Merge branch 'x11-selection-badwindow' of https://github.com/jwueller/kitty 2026-11-09 08:54:36 +05:30
Kovid Goyal
64c2702c4f
Update changelog 2026-11-09 08:48:30 +05:30
Kovid Goyal
0dfd9a832e
choose-files: Cleanup handling of special files in previews
Follow up to the previous commit fixing hangs when previewing named pipes:

- Skip previewing anything that is not a regular file (or a symlink to
  one) in preview_for, before any previewer opens it. This avoids
  unblocking and then breaking writers waiting on a FIFO and covers the
  non-text previewers (images, video, archives, calibre, commands) too.
- Apply the text preview size limit to the symlink target instead of the
  symlink itself, and enforce it while reading so that files growing
  after stat() are also handled.
- Pre-allocate the read buffer based on the file size, as os.ReadFile does.
- Read ignore files during scanning with the same non-blocking reader, so
  a FIFO named .ignore or .gitignore cannot stall the scan.
- Unblock goroutines stuck on FIFOs when tests time out.
2026-11-09 08:42:30 +05:30
Kovid Goyal
319736bd99
Merge branch 'codex/avoid-fifo-text-preview' of https://github.com/hezhizhen/kitty 2026-11-09 08:36:41 +05:30
Johannes Wüller
b2f1bd6ebf X11: Don't exit when a selection requestor's window disappears
Answering a SelectionRequest writes a property on the requestor's window
and sends it a SelectionNotify. The requestor may destroy that window at
any time, for example right after issuing ConvertSelection. The reply
then fails with BadWindow, and without an error handler installed,
Xlib's default handler exits the whole process:

    X Error of failed request:  BadWindow (invalid Window parameter)
      Major opcode of failed request:  18 (X_ChangeProperty)

This happens in practice with clipboard-syncing clients such as the
Looking Glass client, which request PRIMARY while the user drag-selects
text in kitty, and takes down every window of a --single-instance kitty.

Trap X errors while replying to selection requests, for both the
synchronous path and the asynchronous drag-and-drop data reply.
2026-11-08 18:50:43 +01:00
Zhizhen He
cdd278ee63
choose-files: Avoid hanging when previewing named pipes
Open text preview files in nonblocking mode and check the type on
the opened descriptor before reading. Reuse the same read for syntax
highlighting because it can reopen a path after the file changes.
2026-11-09 00:21:45 +08:00
Kovid Goyal
de20cf35e7
Update changelog
Some checks failed
CI / Linux (python=3.14 cc=clang sanitize=1) (push) Has been cancelled
CI / Linux (python=3.12 cc=gcc sanitize=0) (push) Has been cancelled
CI / Linux (python=3.13 cc=gcc sanitize=1) (push) Has been cancelled
CI / Linux package (push) Has been cancelled
CI / Bundle test (macos-latest) (push) Has been cancelled
CI / Bundle test (ubuntu-latest) (push) Has been cancelled
CI / macOS Brew (push) Has been cancelled
CI / Test ./dev.sh and benchmark (push) Has been cancelled
CodeQL / CodeQL-Build (actions, ubuntu-latest) (push) Has been cancelled
CodeQL / CodeQL-Build (c, macos-latest) (push) Has been cancelled
CodeQL / CodeQL-Build (c, ubuntu-latest) (push) Has been cancelled
CodeQL / CodeQL-Build (go, ubuntu-latest) (push) Has been cancelled
CodeQL / CodeQL-Build (python, ubuntu-latest) (push) Has been cancelled
Depscan / Scan dependencies for vulnerabilities (push) Has been cancelled
2026-11-07 19:47:54 +05:30
Kovid Goyal
8f5c7544d1
Bash integration: Source the system startup files bash was built with
Some checks are pending
CI / Linux (python=3.14 cc=clang sanitize=1) (push) Waiting to run
CI / Linux (python=3.12 cc=gcc sanitize=0) (push) Waiting to run
CI / Linux (python=3.13 cc=gcc sanitize=1) (push) Waiting to run
CI / Linux package (push) Waiting to run
CI / Bundle test (macos-latest) (push) Waiting to run
CI / Bundle test (ubuntu-latest) (push) Waiting to run
CI / macOS Brew (push) Waiting to run
CI / Test ./dev.sh and benchmark (push) Waiting to run
CodeQL / CodeQL-Build (actions, ubuntu-latest) (push) Waiting to run
CodeQL / CodeQL-Build (c, macos-latest) (push) Waiting to run
CodeQL / CodeQL-Build (c, ubuntu-latest) (push) Waiting to run
CodeQL / CodeQL-Build (go, ubuntu-latest) (push) Waiting to run
CodeQL / CodeQL-Build (python, ubuntu-latest) (push) Waiting to run
Depscan / Scan dependencies for vulnerabilities (push) Waiting to run
bash is compiled with the paths to its system wide profile and bashrc
(SYS_PROFILE and SYS_BASHRC) and there is no way to query bash for them.
Previously kitty guessed locations in /etc, which fails on distros that
keep these files elsewhere, such as hermetic /usr distros like Clear Linux
(/usr/share/defaults/etc) or Nix (/etc/bashrc).

Now find the paths by scanning the bash executable for them, both in kitty
and in kitten run-shell (so it works on remote hosts via the ssh kitten).
The result is cached per executable in kitty. If the scan fails, or the
locations are explicitly specified via the environment, the previous
behavior is used.

Fixes #10819
2026-11-07 06:25:36 +05:30
Kovid Goyal
e4988b522d
hints: Migrate from regexp2 v1 to v2
Some checks are pending
CI / Linux (python=3.14 cc=clang sanitize=1) (push) Waiting to run
CI / Linux (python=3.12 cc=gcc sanitize=0) (push) Waiting to run
CI / Linux (python=3.13 cc=gcc sanitize=1) (push) Waiting to run
CI / Linux package (push) Waiting to run
CI / Bundle test (macos-latest) (push) Waiting to run
CI / Bundle test (ubuntu-latest) (push) Waiting to run
CI / macOS Brew (push) Waiting to run
CI / Test ./dev.sh and benchmark (push) Waiting to run
CodeQL / CodeQL-Build (actions, ubuntu-latest) (push) Waiting to run
CodeQL / CodeQL-Build (c, macos-latest) (push) Waiting to run
CodeQL / CodeQL-Build (c, ubuntu-latest) (push) Waiting to run
CodeQL / CodeQL-Build (go, ubuntu-latest) (push) Waiting to run
CodeQL / CodeQL-Build (python, ubuntu-latest) (push) Waiting to run
Depscan / Scan dependencies for vulnerabilities (push) Waiting to run
Use Capture.ByteRange() from v2 instead of a hand-rolled rune to byte
offset mapping. The old mapping required capture offsets to be monotonic
across matches, so a capture inside a lookaround overlapping a later match
in non-ASCII text caused all matches to be silently dropped.

Also propagate match errors instead of discarding them. Drops the v1
dependency, v2 was already pulled in by chroma.
2026-11-07 05:54:16 +05:30
Kovid Goyal
01036b6caa
Merge branch 'codex/remove-unused-process-pool-helper' of https://github.com/hezhizhen/kitty
Some checks are pending
CI / Linux (python=3.14 cc=clang sanitize=1) (push) Waiting to run
CI / Linux (python=3.12 cc=gcc sanitize=0) (push) Waiting to run
CI / Linux (python=3.13 cc=gcc sanitize=1) (push) Waiting to run
CI / Linux package (push) Waiting to run
CI / Bundle test (macos-latest) (push) Waiting to run
CI / Bundle test (ubuntu-latest) (push) Waiting to run
CI / macOS Brew (push) Waiting to run
CI / Test ./dev.sh and benchmark (push) Waiting to run
CodeQL / CodeQL-Build (actions, ubuntu-latest) (push) Waiting to run
CodeQL / CodeQL-Build (c, macos-latest) (push) Waiting to run
CodeQL / CodeQL-Build (c, ubuntu-latest) (push) Waiting to run
CodeQL / CodeQL-Build (go, ubuntu-latest) (push) Waiting to run
CodeQL / CodeQL-Build (python, ubuntu-latest) (push) Waiting to run
Depscan / Scan dependencies for vulnerabilities (push) Waiting to run
2026-11-06 19:42:48 +05:30
Zhizhen He
2315a98a71 Remove unused process pool factory 2026-11-06 20:19:44 +08:00
Kovid Goyal
056b5d0812
Merge branch 'codex/reuse-test-resource-enumeration' of https://github.com/hezhizhen/kitty 2026-11-06 17:15:53 +05:30
Zhizhen He
d2ec953df7 tests: Reuse existing resource enumeration helper 2026-11-06 19:17:39 +08:00