Commit graph

16999 commits

Author SHA1 Message Date
Kovid Goyal
fc28e7c03f
... 2026-01-08 16:50:59 +05:30
Kovid Goyal
d6cb5c367e
Remove warning about multiple cursors protocol being under discussion
It is no longer under discussion
2026-01-08 14:51:05 +05:30
Kovid Goyal
abc78f9506
Fix pixel scroll breaking top line selection when top line is partially scrolled off screen 2026-01-08 14:49:01 +05:30
Kovid Goyal
b52a9031ca
Fix selections test failing due to pixel scroll
Note this only fixes the test, there is still the actual issue of
the selection not being rendered for the top most line if that line is
partially scrolled offscreen
2026-01-08 12:40:40 +05:30
Kovid Goyal
1de5a9f0c6
Remove un-needed if statements 2026-01-08 11:30:35 +05:30
Kovid Goyal
dbef4ddd2e
We dont need blank_line since it's only used to clear GPU data we can just memset the GPU to 0 directly 2026-01-08 11:23:26 +05:30
Kovid Goyal
da45f7eeaa
Clenaup previous PR
Make pixel scrolling the default. Fix memory leak where blank line was
not being deallocated in Screen destructor.
2026-01-08 11:01:34 +05:30
Kovid Goyal
0168d19e57
Merge branch 'feat/scroll-per-pixel' of https://github.com/idelice/kitty 2026-01-08 09:12:34 +05:30
Kovid Goyal
df17142ea4
Fix #9355 2026-01-06 08:37:24 +05:30
Kovid Goyal
32f7f8d321
Remove unneeded axis event timestamp 2026-01-05 20:13:33 +05:30
Kovid Goyal
e825005861
Remove unused field 2026-01-05 20:08:09 +05:30
Kovid Goyal
e1199bcee2
Initial implementation of momentum for finger based scrolling on Wayland
Needs configuration and possibly the parameter adjustment once pixel
scrolling is merged.
2026-01-05 19:52:44 +05:30
Kovid Goyal
cd25248e08
Merge branch 'dependabot/go_modules/all-go-deps-5e103dddb9' of https://github.com/kovidgoyal/kitty 2026-01-05 08:38:26 +05:30
dependabot[bot]
0c6ccd1d2a
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.25.11 to 4.25.12
- [Release notes](https://github.com/shirou/gopsutil/releases)
- [Commits](https://github.com/shirou/gopsutil/compare/v4.25.11...v4.25.12)

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

Signed-off-by: dependabot[bot] <support@github.com>
2026-01-05 03:04:59 +00:00
Kovid Goyal
a88b15e066
While here, might as well add blink capability to terminfo as well
This was implemented in version 0.43.0
2026-01-03 00:41:54 +05:30
Kovid Goyal
e11e1ba929
... 2026-01-03 00:35:12 +05:30
Kovid Goyal
388388381d
ncurses is even worse than I thought it was 2026-01-03 00:32:43 +05:30
Kovid Goyal
ba389d68b9
macOS: Fix changes to macos_titlebar_color while in full screen not being applied after exiting fullscreen
Fixes #9350
2026-01-03 00:19:03 +05:30
Kovid Goyal
24b634ae1a
Nicer 403 error andling when downloading grype 2026-01-02 11:35:28 +05:30
Kovid Goyal
d1b9b5ac4f
themes kitten: Also underline trigger keys on confirmation page. Apparently some people use color themes where SGR 31 does not contrast with the default foreground color. 2026-01-02 11:24:11 +05:30
Kovid Goyal
5375ca671c
Update changelog 2026-01-01 23:12:38 +05:30
Kovid Goyal
6d8318818b
Merge branch 'edit-in-kitty' of https://github.com/phanen/kitty 2026-01-01 23:11:55 +05:30
phanium
0f80229468 Fix edit-in-kitty +lnum path 2026-01-01 18:28:07 +08:00
Kovid Goyal
0f1362524b
Store more information about axis events from Wayland 2026-01-01 13:25:30 +05:30
Kovid Goyal
cef2bac116
Fix building on old Apple systems 2026-01-01 07:41:03 +05:30
Kovid Goyal
ba3af8f2c3
Refactor GLFW scroll event callback to use a proper event struct 2025-12-31 23:40:34 +05:30
Kovid Goyal
573bfb688a
Move parsing of colors fully into C
Uses a perfect hash function for color name lookup
2025-12-31 14:21:45 +05:30
Kovid Goyal
e14e34948e
More cleanups for color parsing
Using rounding when converting float to uint8 for more accuracy.
Fix rgb:3 and rgbi: parsing in Go code. Various other minor cleanups.
2025-12-31 09:35:09 +05:30
Kovid Goyal
051b0ff30d
Free C locale on exit 2025-12-30 22:11:05 +05:30
Kovid Goyal
7bb8433c8b
Fix building on macOS 2025-12-30 22:01:15 +05:30
Kovid Goyal
cbadeb5e9a
Micro-optimization 2025-12-30 21:55:23 +05:30
Kovid Goyal
d519b0767b
Fix building with old C compiler 2025-12-30 21:50:27 +05:30
Kovid Goyal
7c13c04c84
Move color parsing code to C for performance 2025-12-30 21:43:57 +05:30
Kovid Goyal
a4d88beddb
Micro-optimisation 2025-12-30 13:40:49 +05:30
Kovid Goyal
2aed1c9c06
Remove unused code 2025-12-30 13:34:24 +05:30
Kovid Goyal
877d143c1a
Make mypy happy 2025-12-30 13:32:04 +05:30
Kovid Goyal
4773ac81b6
Fix warning from sphinx 2025-12-30 13:23:46 +05:30
Kovid Goyal
62d5fcc074
Merge branch 'wide-gamut-colors' of https://github.com/jokull/kitty 2025-12-30 13:19:44 +05:30
Delice0
15dbb6965f Align pixel scroll direction with OS 2025-12-29 22:58:10 +01:00
Kovid Goyal
74c67d2253
... 2025-12-29 12:12:27 +05:30
Kovid Goyal
abd1ad551b
Merge branch 'dependabot/go_modules/all-go-deps-37ed0ecc19' of https://github.com/kovidgoyal/kitty 2025-12-29 08:49:02 +05:30
dependabot[bot]
b47e099726
Bump github.com/alecthomas/chroma/v2 in the all-go-deps group
Bumps the all-go-deps group with 1 update: [github.com/alecthomas/chroma/v2](https://github.com/alecthomas/chroma).


Updates `github.com/alecthomas/chroma/v2` from 2.20.0 to 2.21.1
- [Release notes](https://github.com/alecthomas/chroma/releases)
- [Commits](https://github.com/alecthomas/chroma/compare/v2.20.0...v2.21.1)

---
updated-dependencies:
- dependency-name: github.com/alecthomas/chroma/v2
  dependency-version: 2.21.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: all-go-deps
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-29 03:05:36 +00:00
Kovid Goyal
95c1f5aca5
Ensure tabs bar visibility is updated when switching active tab as well
Visibility can change if tab_bar_filter is used and active tab is
changed. See #9328
2025-12-28 10:01:50 +05:30
Kovid Goyal
64207dc05c
Ensure tab bar visibility is updated when removing a tab 2025-12-28 09:36:49 +05:30
Kovid Goyal
25d8d9fe69
Bump max font size to 10*configured from 5*configured 2025-12-28 08:46:55 +05:30
Jökull Sólberg
64abd87a9e Add wide gamut color support with OKLCH and LAB formats
Implements modern wide gamut color formats with CSS Color Module Level 4
gamut mapping, addressing PR feedback with Go implementation, performance
benchmarks, and reorganized documentation.

Features:
- OKLCH (perceptually uniform color space)
- CIE LAB (device-independent color space)
- CSS Color 4 compliant gamut mapping algorithm
- Inline comment support in color config parsing

Addressing PR Feedback:

1. Go Implementation (tools/utils/style/):
   - Complete OKLCH and LAB parsing with gamut mapping
   - Matches Python implementation structure
   - Comprehensive test suite (all tests passing)
   - Performance benchmarks showing acceptable overhead

2. Performance Benchmarks:
   - OKLCH: ~4.6 µs/op
   - LAB: ~1.5 µs/op
   - 10 mixed colors: ~13 µs total
   - Typical config (50 colors): <0.5ms startup impact

3. Documentation Reorganization:
   - Moved detailed color docs to docs/wide-gamut-colors.rst
   - Configuration docs now link to separate documentation
   - Reduces size of main configuration documentation

Gamut Mapping:
- Binary search chroma reduction from CSS Color Module Level 4
- Preserves lightness and hue while reducing chroma for out-of-gamut colors
- Uses deltaE OK (JND threshold: 0.02) for perceptual difference
- Ensures graceful degradation on sRGB displays

Python Implementation:
- parse_oklch(): OKLCH color parsing with gamut mapping
- parse_lab(): CIE LAB parsing with gamut mapping via OKLCH conversion
- lab_to_oklch(): LAB to OKLCH conversion for consistent gamut mapping
- oklch_to_srgb_gamut_map(): CSS Color 4 gamut mapping algorithm
- srgb_to_oklab(): Reverse conversion for deltaE calculations
- deltaE_ok(): Perceptual color difference in OKLab space

Go Implementation:
- colorspaces.go: All color space conversions and gamut mapping
- wrapper.go: ParseColor() updated to support OKLCH and LAB
- Comprehensive test coverage with benchmarks
- Matches Python implementation behavior

Robustness:
- NaN and infinity validation in all color parsing functions
- Defense-in-depth with validation at parsing and gamut mapping levels
- Returns None/error for invalid input (consistent error handling)
- Validates before clamping operations to prevent NaN propagation

Files changed:
- Python: kitty/rgb.py, kitty_tests/datatypes.py (+250 lines)
- Go: tools/utils/style/colorspaces.go, wrapper.go (+350 lines, tests)
- Docs: docs/wide-gamut-colors.rst (moved from inline)
- Config: kitty/options/definition.py (simplified, links to docs)

References:
- CSS Color Module Level 4: https://www.w3.org/TR/css-color-4/
- OKLCH Color Space: https://bottosson.github.io/posts/oklab/

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-27 14:34:34 +00:00
Delice0
9331cf3596 Merge branch 'feat/scroll-per-pixel' of https://github.com/idelice/kitty into feat/scroll-per-pixel 2025-12-26 19:35:41 +01:00
Delice0
63fcebd285 Clarify pixel_scroll scrollback scope 2025-12-26 19:33:21 +01:00
Delice0
5f45abd311 Document pixel scrolling option 2025-12-26 19:33:21 +01:00
Delice0
818065a050 Add configurable pixel scrolling 2025-12-26 19:33:21 +01:00