Commit graph

12 commits

Author SHA1 Message Date
Artem Lytkin
8e194d8e67 diff kitten: Don't build a full LCS table for word diffs of long lines
word_diff_center filled an (m+1)*(n+1) table of ints for the differing
middle of every changed line pair. For a 100 KB line of minified
JavaScript with a word inserted near each end that is 2.6 GB and over
two seconds, and compute_centers runs the line pairs in parallel.

Changed words are only highlighted when they pair up by position, which
needs the same number of words on both sides, so return changed_center
right away when the counts differ. The output is the same as before in
that case. Lines with equal word counts but more than 2048 words between
the first and last changed word now get the central highlight too
instead of a huge table, and the table uses int32.
2026-09-25 21:41:23 +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
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
f067e9cd92
Make various goroutines panic-safe 2025-10-09 07:17:53 +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
4f72bb9894
Replace utils.Once with stdlib sync.OnceValue 2023-08-09 12:08:42 +05:30
Kovid Goyal
e59e42a6c2
simplify API of utils.Once 2023-05-26 22:42:07 +05:30
Kovid Goyal
ff55121094
Move the kittens Go code into the kittens folder 2023-03-27 13:06:02 +05:30
Renamed from tools/cmd/diff/patch.go (Browse further)