Commit graph

3852 commits

Author SHA1 Message Date
Kovid Goyal
237a598cae
Fix heap buffer overflow in unicode_in_range()
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
When growing the buffer, realloc was passed the element count instead of
the byte count, shrinking the buffer while capacity was set to the larger
value. Lines with more than 4096 codepoints (e.g. many combining chars)
would then write past the end of the allocation.
2026-10-08 23:51:48 +05:30
Kovid Goyal
e81c993ce2
Cleanup previous PR
Fix dangling text pointer in buffered key events and test CSI param overflow

Key events buffered while waiting for an overlay to become ready stored
the text pointer from the GLFWkeyevent, which is only valid for the
duration of the key callback. Make the buffered events own a copy of
the text and free it in a single place.

Also add a test for the out of bounds write of is_sub_param when a
separator follows the last allowed CSI parameter.
2026-10-08 23:34:30 +05:30
Kovid Goyal
f021526205
Fix #10628 2026-10-08 22:08:13 +05:30
Kovid Goyal
e4187643a6
Fix #10625
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-10-08 07:23:45 +05:30
Kovid Goyal
24f7369bb6
Drop Unicode placeholder cell images scrolled off the bottom of the screen
A full screen reverse scroll (ESC M at the top, CSI T) moves every image
ref down a row. scroll_filter_func() only removed refs that left through
the top, so a cell image on the bottom line ended up at row `lines`, off
screen, while its line was discarded. The next forward scroll brought it
back onto the bottom row, where the line has no placeholders.
screen_render_line_graphics() returns early for such lines, so nothing
removed the ref and a slice of the old image was drawn over the new text.
tmux and pagers send ESC M when scrolling down, so this shows up in
practice. Fix it by dropping cell image refs that move below the bottom
margin, the same way the margins scroll path drops refs that leave the
region.

This replaces PR #10623, which was not merged for these reasons:

- It does not find the cause. It removes cell image refs at render time
  for every line without placeholders, so the stale ref still exists and
  is still seen by anything that reads refs before the next render, such
  as graphics query and delete commands and the paused rendering path,
  which returns before the new code.
- It costs time on every frame. Whenever any image is loaded, even with
  no placeholders at all, each clean visible line and each visible
  history line triggers a walk over all images and refs. Before, such
  lines cost nothing. This fix adds one comparison to a loop that only
  runs when the screen scrolls.

Close #10623
2026-10-07 20:19:23 +05:30
Hassan Raza
35c9a02018
Use launch in the remote control example 2026-10-06 16:04:16 +05:00
Hassan Raza
f8470df186
Correct the documentation dependency install command 2026-10-06 16:04:16 +05:00
Kovid Goyal
a73c7cbc0a
Fix #10618 2026-10-06 15:29:26 +05:30
Kovid Goyal
c168e31801
Use binary XDG shared MIME database for mimetype lookups
Fixes #3056
2026-10-06 08:27:55 +05:30
Kovid Goyal
51aa327be1
Fix momentum scroll scale not being set for negative deltas
The scale between scaled and unscaled offsets was only calculated for
positive deltas, so when scrolling up or left it stayed at zero (or stale from
a previous scroll), causing momentum events to have zero offsets.

Closes #10610
2026-10-05 20:42:16 +05:30
Kovid Goyal
007e61a59e
Fix #10609 2026-10-05 20:34:59 +05:30
Kovid Goyal
dedb3701fc
...
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-10-05 17:10:58 +05:30
Hassan Raza
c15b077b6b
Set cursor text blinking without inverting it 2026-10-05 15:24:21 +05:00
Kovid Goyal
78d5892e26
Speed up northern lights
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-10-05 11:01:48 +05:30
Kovid Goyal
643f18f292
Fix #10604
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-10-05 04:49:44 +05:30
Kovid Goyal
033674afea
Fix #10603 2026-10-05 04:16:54 +05:30
Kovid Goyal
83e5692817
Fix #10602 2026-10-05 03:50:54 +05:30
Kovid Goyal
b493a637b0
Graphics protocol: Fix no response for animation chunks when a=f specified in continuations
Fixes #10599
Fixes #10600
2026-10-05 03:23:27 +05:30
Kovid Goyal
79f687dc5c
...
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-10-04 14:33:12 +05:30
Kovid Goyal
a7c64b5b09
Wayland: Fix frame callbacks accumulating in the compositor for occluded windows
Fixes #10597
2026-10-04 14:14:36 +05:30
Kovid Goyal
1553a26310
...
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-10-04 07:59:52 +05:30
Kovid Goyal
9939c7b471
Improve time uniforms available to custom shaders. Fixes #10591
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-10-03 23:25:52 +05:30
Kovid Goyal
8bd3a03009
Fix #10591
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-10-03 08:14:12 +05:30
Kovid Goyal
be024e78e5
...
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-10-02 11:29:08 +05:30
Kovid Goyal
3f0af8942e
Wayland: Support touchscreens
Turn glfw touch events into mouse and scroll events. A tap is a left
click where the finger landed, a finger that moves scrolls through the
glfw momentum scroller so it coasts like touchpad scrolling, and a
finger held still before it moves drags the left button, selecting
text. Only the first finger of a sequence is used. Touch events are
printed by --debug-input.
2026-10-02 11:28:30 +05:30
Kovid Goyal
79c2efd8ce
Particle effects for cursor trail shaders
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
Fixes #10587
2026-10-02 10:05:57 +05:30
Kovid Goyal
62c73ac988
Fix #10581
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-10-01 19:29:33 +05:30
Kovid Goyal
8a390c5062
X11: Support wheel events from sources without smooth scrolling when smooth scrolling sources are also present
Fixes #10575
2026-10-01 19:02:59 +05:30
Kovid Goyal
9cfdfcfdc8 Merge branch 'pr10574' 2026-10-01 17:28:36 +05:30
Kovid Goyal
c343c997b7
Fix #10577 2026-10-01 17:23:37 +05:30
Kovid Goyal
291efa7dba
Fix padding beside window title bars not being drawn with neighboring_cell fill
The compensatory padding at the left and right of a window extends alongside
its title bar, but the padding shader only drew it alongside the rows of the
terminal screen, leaving the strips beside the title bar unpainted. Draw them
when rendering the title bar, colored to match the neighboring title bar cell.
2026-10-01 17:13:26 +05:30
Kovid Goyal
b1395fd25e
Align window frames and make gaps between windows uniform
Draw the compensatory padding (the pixels left over after fitting whole
cells) inside the window border instead of outside it, so the border is
always exactly one margin inside the area allocated to the window. Windows
that share an allocation edge now share a frame edge and all gaps are the
sum of the neighboring margins. Cell counts and content positions are
unchanged. Mouse hit testing includes the compensatory padding.

Move the compensatory padding away from the window title bar so the title
bar is always flush with the border, computing blank rects from the final
window geometries at the end of a layout pass.

Add the collapse_window_margins option to have the margins of neighboring
windows collapse into each other.

Fix the Grid layout not recording compensatory padding and ignoring
vertical placement_strategy values.

Based on #10508 without needing a constraint solver.
2026-10-01 17:12:52 +05:30
Kovid Goyal
b4d43249b0
Fix focus changing when closing non focused window before the focused one 2026-10-01 15:54:20 +05:30
Kovid Goyal
cbc5382bbe
Add support for docked windows
Allow creating docked windows with percentage or fixed sizes at any edge of a
window or tab. Fixes #2391

Also close #10506 and close #10508
The approach in #10506 was not used for several reasons.

1) Performance: this PR costs nothing when docs are unused vs several
milliseconds for the cassowary based approach
2) Way less code (700 lines total): No complicated solver (2K lines of code) needed
3) No risk behaviour changes for without docks
2026-10-01 15:45:44 +05:30
Kovid Goyal
b2cb871254
version 0.49.2 2026-10-01 07:55:22 +05:30
powellnorma
37e22f6300 Make reverse-video cursors follow effective DIM colors 2026-09-30 15:12:52 +02:00
powellnorma
1dabaf88ef Decode the color type byte for reverse-video extra cursors 2026-09-30 11:32:45 +02:00
Kovid Goyal
929db0c07f
Store gamma LUT in per program uniforms rather than UBO to workaround bug in Apple OpenGL drivers
Fixes #10571
2026-09-30 09:19:27 +05:30
Kovid Goyal
c73326a9d8
...
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-09-28 15:06:25 +05:30
Kovid Goyal
ff3f423c79
... 2026-09-28 14:14:11 +05:30
Hassan Raza
2ef024bbab
Collect stale hyperlinks before adding new links 2026-09-28 11:34:37 +05:00
Kovid Goyal
9bb5e06853
Cleanup previous PR
Follow up to the merge of PR #10560 which skips input_delay when less
than 1 KiB of program output is pending.

Fix a data race: the I/O thread called
vt_parser_pending_input_is_interactive() which read read.pos under the
parser lock, but the main thread modifies read.pos without the lock
while parsing, so taking the lock on one side only did not protect it.
Instead, vt_parser_commit_write() now returns whether the pending input
is small, computed from read.sz and write.pending, which are only
modified with the lock held. This may overestimate while a parse is in
progress or when an incomplete escape code is retained, in which case
we simply fall back to the normal input_delay behavior. It also saves a
lock/unlock cycle per read in the I/O thread.

Bound the number of early main loop wakeups: since render() bypasses
repaint_delay whenever input was read, input_delay was the effective
cap on parse/render frequency for streaming output. Waking the main
loop on every small read removed that cap entirely for programs that
emit a continuous stream of small writes, costing CPU and increasing
the chance of drawing partial screen updates. Now an early wakeup is
only allowed if the previous wakeup was not itself early, so typed
character echo is still delivered immediately while streams of small
writes get at most two wakeups per input_delay.

Replace the magic 1024 with SMALL_PENDING_INPUT_THRESHOLD, rename
pending_input_is_interactive() to pending_input_is_small() since the
check has nothing to do with interactivity, clarify the input_delay
option documentation and add a changelog entry.
2026-09-28 11:44:03 +05:30
白鸽
ab8ef49c02 Restore active tab after same-window tab reordering 2026-09-28 12:55:26 +08:00
Kovid Goyal
132d00dd09
Workaround for AMD GPU driver bug in macOS
Fixes #10549
2026-09-28 09:34:47 +05:30
Kovid Goyal
dc37ed4c6a
macOS: Fix a regression in the previous release causing :opt:background_opacity less than one with no :opt:background_blur making the titlebar transparent
Fixes #10540
Fixes #10547
2026-09-28 08:51:38 +05:30
Kovid Goyal
6ad2a3aee7
Fix heap buffer underflow in shlex parser 2026-09-28 07:35:08 +05:30
Kovid Goyal
6cbad03446
Fix file transfer confirmation bypass with empty password configured 2026-09-28 07:18:10 +05:30
Kovid Goyal
a6afadb365 Merge branch 'hints-stdlib-regexp' of https://github.com/4RH1T3CT0R7/kitty 2026-09-28 06:53:41 +05:30
Kovid Goyal
c355c40199
Merge branch 'fix/diff-search-eol' of https://github.com/4RH1T3CT0R7/kitty 2026-09-28 06:43:01 +05:30
Artem Lytkin
f6e276c1e7 diff kitten: Fix search missing matches at the end of a line
find_matches_in_lines was passing the exclusive end offset of a match to
find_pos, so a match ending at the end of the joined screen lines mapped
to no line and was dropped. It was not highlighted, not counted and n/N
skipped it. Since screen lines are not padded, this hit any match on the
last character of a line, for example searching for foo in "x := foo".

Look up the line holding the last matched byte instead.
2026-09-27 12:39:13 +03:00