Commit Graph

16692 Commits

Author SHA1 Message Date
Wukuyon
65890de60d Fix UTF-8 overlong and special range checks in simd-string-impl.h
Modified `start_classification` in `utf8_decode_to_esc` in `simd-string-impl.h`, which now:

Rejects `0xC0`, `0xC1` and `0xF5..0xFF` lead bytes in UTF-8 subsequences.

Enforces special ranges for the second subsequence bytes after `0xE0`, `0xED`, `0xF0` and `0xF4` bytes to prevent overlong sequences, surrogates, and code points above U+10FFFF.

Accumulates UTF-8 validation errors in a single vector to avoid many conditional branches.

Worsens unicode benchmark performance by about 4%.
2025-10-23 22:37:33 -06:00
Wukuyon
295951348c Add boundary case tests for test_utf8_simd_decode
These tests were generated from Node.js and match the WHATWG Encoding Specification's behavior (substitution of maximal subparts).
2025-10-23 21:43:20 -06:00
Wukuyon
77a3fc8dd2 Swap expected/actual variables in t function in test_utf8_simd_decode
For more useful debugging.
The expected value is what the scalar decoder returns.
The actual value is what the "which" SIMD decoder returns.
2025-10-23 21:43:20 -06:00
Kovid Goyal
0a6ed15858 ... 2025-10-22 13:53:44 +05:30
Kovid Goyal
33b9d858ad Nano-optimisation: Avoid using a block with GCD 2025-10-22 13:40:42 +05:30
Kovid Goyal
6a6b0b47a3 Micro-optimize display link callback
Use a GCD block rather than a runtime selector with a boxed number
2025-10-22 13:35:02 +05:30
Kovid Goyal
26ea343f95 Fix failing tests 2025-10-22 13:21:53 +05:30
Kovid Goyal
8e2b489eed Fix a couple more places where right/bottom edges were considered inclusive
Fixes #9132 (I hope as I cant reproduce it)
2025-10-22 12:29:26 +05:30
Kovid Goyal
77f282785c Allow resizing label to have lower background opacity if overall background opacity is low 2025-10-22 11:57:54 +05:30
Kovid Goyal
a9ad58fa78 Draw OS window contents at top left instead of bottom left during live resize
Also, since I was here, have the size display be translucent.

Fixes #9141
2025-10-22 11:53:43 +05:30
Kovid Goyal
878b502fc1 Cleanup previous PR
The locks were not being initialized, and since I was there did some
general cleanup as well, moved the locks array into displayLinks rather
than having another global namespaced variable.
2025-10-22 09:54:21 +05:30
Kovid Goyal
d07100d9b2 Merge branch 'fix-macos-displaylink-idle' of https://github.com/meghendra6/kitty 2025-10-22 09:54:16 +05:30
Scott Lee
fc8f3ca6e2 Improve macOS idle wakeups handling 2025-10-22 07:38:10 +09:00
Kovid Goyal
94f3da53aa Cleanup previous PR 2025-10-21 09:44:41 +05:30
Kovid Goyal
8630f21af1 Merge branch 'evan-goode/accumulate-value120' of https://github.com/evan-goode/kitty 2025-10-21 09:43:43 +05:30
Evan Goode
80a9bdb999 Smoothly handle VALUE120 scroll events 2025-10-20 09:32:59 -04:00
Kovid Goyal
55e8d3e38c Fix #9127
See upstream bug: https://github.com/sphinx-doc/sphinx/issues/13976
2025-10-20 08:16:48 +05:30
Kovid Goyal
1e1a1851d0 Add support for Unicode 17
This is preliminary, all tests pass, but needs more careful review.
2025-10-18 09:59:53 +05:30
Kovid Goyal
c2fb9f14b5 Only reset termios when user triggers reset action rather than in reponse to reset escape code
Fixes #9126
2025-10-18 08:53:50 +05:30
Kovid Goyal
0780eef7b1 Fix #9125 2025-10-17 20:29:20 +05:30
Kovid Goyal
d3ef27c2bc Update grype db as part of install 2025-10-17 10:59:11 +05:30
Kovid Goyal
8ff59050da Merge branch 'update-wayland-compat-matrix' of https://github.com/alex-huff/kitty 2025-10-16 23:53:18 +05:30
alex-huff
b1d4bdc019 docs: panel: update river compatibility information 2025-10-16 12:28:48 -05:00
Kovid Goyal
f19831e482 Merge branch 'update-wayland-compat-matrix' of https://github.com/alex-huff/kitty 2025-10-16 22:40:50 +05:30
alex-huff
e00cf17732 docs: panel: added xfce to compatibility matrix 2025-10-16 11:57:49 -05:00
Kovid Goyal
2e39244dfa Update changelog 2025-10-16 21:06:27 +05:30
Kovid Goyal
9be82c0f97 Merge branch 'fix-panel-center-sized' of https://github.com/alex-huff/kitty 2025-10-16 20:56:16 +05:30
alex-huff
10e0d11093 panel: use an anchor of 0 for --edge=center-sized
Fixes #9116
2025-10-16 10:04:55 -05:00
Kovid Goyal
f06f85a9e0 Cleanup previous PR 2025-10-15 09:12:32 +05:30
Kovid Goyal
6586780371 Merge branch 'draw-borders-when-focused' of https://github.com/jackielii/kitty 2025-10-15 08:56:02 +05:30
Kovid Goyal
1c2c01722b Bump version of imaging
Fixes an out of bounds error when processing opaque images
2025-10-15 08:29:23 +05:30
Kovid Goyal
284ae74201 icat: Report panics in the render function correctly
Also, only fallback to imagemagick on error when the engine is not
specified as builtin
2025-10-15 08:17:53 +05:30
Kovid Goyal
dd7caaa91b ... 2025-10-15 08:09:29 +05:30
Kovid Goyal
ee9a5386b9 When doing a reset also reset termios to its initial state 2025-10-15 07:56:45 +05:30
Jackie Li
b99a5bd7da fix comment 2025-10-14 19:50:47 +01:00
Jackie Li
6a2ee9253b set_options() in layout tests 2025-10-14 19:43:07 +01:00
Jackie Li
6db3441e29 respect draw_window_borders_for_single_window=yes in lgd.draw_minimal_borders 2025-10-14 19:23:35 +01:00
Jackie Li
05810722be use draw_window_borders_for_single_window
single window + has focus -> active border
single window + no focus -> inactive border
multiple window + regardless of focus -> active border

a) option set:

    1) Single *visible* window in the layout - always draw a border
    border color = active if os_window is focused else inactive

    2) multiple visible windows in the layout - no change in existing
    behavior, in particular draw_minimal_borders is respected as before.

b) option unset - no changes from present behavior

option default to false.
2025-10-14 18:39:23 +01:00
Kovid Goyal
7c237dcb02 macOS: Fix progress bar on dock icon doubling speed with every indeterminate progress state without an intervening clear
Fixes #9114
2025-10-14 22:28:31 +05:30
Kovid Goyal
016bbef0b0 Merge branch 'sharp-corner' of https://github.com/bea4dev/kitty 2025-10-14 05:37:46 +05:30
Jackie Li
09e16adf8b Add draw_borders_when_focused option
Adds a new configuration option `draw_borders_when_focused` that allows
borders to be drawn around windows when the OS window is focused,
regardless of the layout or number of windows.

This is useful for:
- Seeing which terminal window has focus in layouts like stack that
  normally don't show borders
- Showing borders even when there's only a single window
- Providing visual feedback about OS window focus state

When enabled, borders use the active_border_color when the OS window is
focused and inactive_border_color when unfocused. This behavior only
applies when the option is enabled, preserving existing behavior by
default.

The implementation:
- Adds the draw_borders_when_focused config option (default: no)
- Modifies border drawing logic to check OS window focus state
- Triggers border redraw when OS window focus changes
- Only affects behavior when the option is explicitly enabled
2025-10-13 20:07:47 +01:00
bea4dev
4342cc68bd fix dhcorner & dvcorner & dcorner 2025-10-14 02:39:05 +09:00
Kovid Goyal
b628dc8310 Merge branch 'mochaa/fix-py3.14-asyncio-loop' of https://github.com/mcha-forks/kitty 2025-10-13 21:51:54 +05:30
bea4dev
7ff67b78cc fix corner 2025-10-13 22:22:32 +09:00
Zephyr Lykos
831c59996f Fix creating default event loop on Python 3.14+
Closes #9107
2025-10-13 20:09:54 +08:00
Kovid Goyal
220099a3ed Merge branch 'dependabot/github_actions/actions-1893dd32ff' of https://github.com/kovidgoyal/kitty 2025-10-13 09:17:04 +05:30
dependabot[bot]
6a6296a90f Bump github/codeql-action from 3 to 4 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 3 to 4
- [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/v3...v4)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-version: '4'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: actions
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-13 03:41:50 +00:00
Kovid Goyal
e1b2ce91ff Merge branch 'dependabot/go_modules/all-go-deps-1f98792d99' of https://github.com/kovidgoyal/kitty 2025-10-13 08:43:09 +05:30
dependabot[bot]
11905993ca Bump the all-go-deps group with 3 updates
Bumps the all-go-deps group with 3 updates: [golang.org/x/image](https://github.com/golang/image), [golang.org/x/sys](https://github.com/golang/sys) and [golang.org/x/text](https://github.com/golang/text).


Updates `golang.org/x/image` from 0.31.0 to 0.32.0
- [Commits](https://github.com/golang/image/compare/v0.31.0...v0.32.0)

Updates `golang.org/x/sys` from 0.36.0 to 0.37.0
- [Commits](https://github.com/golang/sys/compare/v0.36.0...v0.37.0)

Updates `golang.org/x/text` from 0.29.0 to 0.30.0
- [Release notes](https://github.com/golang/text/releases)
- [Commits](https://github.com/golang/text/compare/v0.29.0...v0.30.0)

---
updated-dependencies:
- dependency-name: golang.org/x/image
  dependency-version: 0.32.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: all-go-deps
- dependency-name: golang.org/x/sys
  dependency-version: 0.37.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: all-go-deps
- dependency-name: golang.org/x/text
  dependency-version: 0.30.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: all-go-deps
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-13 03:05:24 +00:00
Kovid Goyal
a072a6fd2a Dont dump commands when --dump-bytes alone is specified
dumping commands flushes and therefore is expensive and might change
timing significantly.
2025-10-13 04:16:38 +05:30