Commit graph

284 commits

Author SHA1 Message Date
Kovid Goyal
a3dfe2b55a
Make sticky_header default to yes 2026-04-19 12:14:39 +05:30
Petar Dobrev
4f5698a5a2 fix overlap with the next file's header 2026-04-19 09:24:44 +03:00
Petar Dobrev
7729e6e1ae kitten diff: add support for sticky header 2026-04-18 18:26:30 +03:00
Павел Мешалкин
8ffdf7d7ee feat: add per-mapping --allow-fallback for layout-independent shortcuts
Add --allow-fallback option to the map command that controls shifted
and ascii (alternate_key) fallback for individual key mappings.

For non-Latin keyboard layouts, when the current layout key is
non-ascii (codepoint > 127 and < 0xE000), the alternate_key from
the base layout is used for matching if the mapping opts in via
--allow-fallback=shifted,ascii.

Default kitty bindings use --allow-fallback=shifted,ascii so they
work out of the box with non-Latin layouts. User custom mappings
default to --allow-fallback=shifted (preserving existing shifted_key
behavior without ascii fallback).

--allow-fallback=none disables all fallback for a mapping.

Python side: parse_options_for_map() in options/utils.py handles flag
parsing, ShortcutMapping uses it in __init__. get_shortcut() filters
candidates by per-mapping allow_fallback.

Go side: ParseMap() handles --allow-fallback, KeyAction stores
AllowFallback, ShortcutTracker.Match passes it to matching.
MatchesParsedShortcut defaults to shifted,ascii for hardcoded shortcuts.

Migrated kittens (themes, command_palette, diff, choose_files) to
use ShortcutTracker with configurable map entries.

Tests added for Python (5 test methods) and Go (ParseMap + key matching).
2026-03-25 19:34:13 +03:00
Kovid Goyal
eddaaed3e3
Modernize Go code 2026-03-21 08:41:47 +05:30
Kovid Goyal
01a70e06c4
... 2026-03-12 13:53:41 +05:30
Kovid Goyal
0614f05335
Use new SIMD function for non blank checking 2026-03-12 13:50:35 +05:30
Kovid Goyal
d8af7e2c88
Add an option to control highlighting of moved lines 2026-03-12 12:59:46 +05:30
copilot-swe-agent[bot]
f45345c7a7
Add colorMoved support to kitty diff kitten
Fixes #3241
Fixes #9644
2026-03-12 12:44:21 +05:30
Kovid Goyal
d15905c918
Change default word regexp to exclude punctuation 2026-03-04 09:20:53 +05:30
copilot-swe-agent[bot]
1785873835
diff kitten: Use a words based algorithm for intra line changed region highlighting
Fixes #9598
2026-03-04 09:06:37 +05:30
Kovid Goyal
a1927eb662
DRYer 2026-02-25 09:11:04 +05:30
Kovid Goyal
b26d0b6ac5
Add more text file types to kitten diff completion
Fixes #9556
2026-02-25 08:57:54 +05:30
Kovid Goyal
6f588a0c29
run modernize 2025-11-11 17:09:37 +05:30
Kovid Goyal
f067e9cd92
Make various goroutines panic-safe 2025-10-09 07:17:53 +05:30
Kovid Goyal
9a4b52f8b9
diff kitten: Fix wheel_scroll_multiplier not being respected
Fixes #9054
2025-10-01 17:07:47 +05:30
Kovid Goyal
ecf7f0cab0
kitten diff: Fix incorrect rendering if diff completes before terminal responds to capabilities query 2025-09-02 11:29:55 +05:30
Kovid Goyal
fd5876b94e
Use SIMD to replace C0 control codes in Go code 2025-07-21 08:54:22 +05:30
Kovid Goyal
28fce006d6
Make highlight code fully re-useable 2025-07-20 15:37:03 +05:30
Kovid Goyal
9068bbaba9
Make code to highlight file re-useable 2025-07-20 10:32:31 +05:30
Kovid Goyal
d1faccdd1c
Loop API print proper stack traces for panics in go routines 2025-06-01 12:51:59 +05:30
Kovid Goyal
c861259e3b
Rename go module from kitty -> github.com/kovidgoyal/kitty
Makes the code more easily re-useable in other projects
2025-05-16 08:43:39 +05:30
Kovid Goyal
b5cbb501a4
Use the base name of the named pipe for the created temp file 2025-05-03 16:03:06 +05:30
Kovid Goyal
7ef2fe53e0
Avoid extra stat() 2025-05-03 15:55:36 +05:30
Kovid Goyal
a59a347903
diff kitten: Allow diffing named pipes
Fixes #8597
2025-05-03 15:53:29 +05:30
Kovid Goyal
e42d410ee4
Move cli spec parsing code into simple module 2025-04-28 09:20:10 +05:30
Kovid Goyal
4b4bfca007
... 2025-04-06 09:16:42 +05:30
bilbofroggins
2d462b40b7
Update ui.go 2025-04-05 19:24:17 -04:00
bilbofroggins
fd14e103ef
Update main.py 2025-04-05 19:21:38 -04:00
Kovid Goyal
da1626090a
Update codebase to Python 3.10 using pyupgrade 2025-02-03 10:56:50 +05:30
Kovid Goyal
081c061538
Clarify prefix usage 2025-01-16 11:52:37 +05:30
Kovid Goyal
7a9e5d9dcb
... 2025-01-16 11:50:43 +05:30
Kovid Goyal
2dc6300f55
Fix #8205 2025-01-09 11:29:31 +05:30
Kovid Goyal
2d02ff1c5f
Implement using effective kitty config options for kittens
Also centralise reading of kitty options
2025-01-05 20:16:43 +05:30
Kovid Goyal
f3db7e7554
diff kitten: Automatically change colors on terminal color scheme change 2025-01-05 06:00:24 +05:30
Kovid Goyal
98c1e0f7aa
Allow reusing the token from chroma lexer 2025-01-04 17:20:08 +05:30
Kovid Goyal
e34a899ea6
diff kitten: Automatically use dark/light color scheme based on the color scheme of the parent terminal
Fixes #8170
2025-01-04 12:57:33 +05:30
Kovid Goyal
134271be93
diff kitten: Abort when run inside a terminal that does not support the kitty keyboard protocol
Fixes #8185
2025-01-03 21:34:38 +05:30
Jackie Li
2208b3be3a
diff kitten: fix mouse move down up selection 2024-10-23 19:12:25 +01:00
Kovid Goyal
8eb0b556b7
diff kitten: Fix a regression that broke diffing against remote files
Fixes #7797
2024-08-28 11:00:42 +05:30
Jackie Li
bbe29dbc7b
[diff kitten] move next/prev file 2024-07-31 16:11:38 +01:00
Kovid Goyal
405f5ce148
Use stdlib maps/slices 2024-06-24 07:54:13 +05:30
Kovid Goyal
77292a16d6
Make shebangs consistent
Follow PEP 0394 and use /usr/bin/env python so that the python in the
users venv is respected. Not that the kitty python files are meant to be
executed standalone anyway, but, whatever.

Fixes #6810
2023-11-11 08:32:05 +05:30
Kovid Goyal
627c80125b
More linter fixes 2023-09-23 10:19:46 +05:30
Kovid Goyal
1a32e62ebf
More linter fixes 2023-09-18 21:07:39 +05:30
Kovid Goyal
863adb3e8d
Go: Fix parsing of nullable colors
Fixes #6629
2023-09-15 20:36:24 +05:30
Kovid Goyal
c99d55691d
diff kitten: Add support for files that are identical apart from mode changes
Fixes #6611
2023-09-09 19:04:54 +05:30
Kovid Goyal
eb51d459ae
diff kitten: Dont panic for empty changesets 2023-09-09 18:35:32 +05:30
Kovid Goyal
bfc15cfc3f
Fix #6611 2023-09-09 18:24:26 +05:30
Kovid Goyal
4f72bb9894
Replace utils.Once with stdlib sync.OnceValue 2023-08-09 12:08:42 +05:30